Closed Bug 1612276 Opened 4 years ago Closed 4 years ago

Add "Reveal in Inspector" context menu entry on elements

Categories

(DevTools :: Console, enhancement, P4)

72 Branch
All
Unspecified
enhancement

Tracking

(firefox76 fixed)

RESOLVED FIXED
Firefox 76
Tracking Status
firefox76 --- fixed

People

(Reporter: jakub.g.opensource, Assigned: patricia.e.lee.work, Mentored)

References

Details

(Keywords: dev-doc-complete)

Attachments

(2 files)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:72.0) Gecko/20100101 Firefox/72.0

Steps to reproduce:

  1. Open devtools > console on any page
  2. Run document.querySelectorAll('*'). It gives you a NodeList.
  3. Right click any element on the NodeList

Actual results:

You get a menu with several items, but there's no equivalent of "Reveal in Elements Panel" from Chrome

Expected results:

There should be an item which reveals the node in Inspector

Chrome equivalent has been there for years:
https://developers.google.com/web/updates/2015/05/reveal-in-elements-panel

Component: Untriaged → Console
Product: Firefox → DevTools
Hardware: Unspecified → All

This sounds like a little thing but it's a super important feature when dealing with complex DOMs and great simplifies work.
(I'm rather surprised no one reported this yet, but it's one of things that keeps me coming back to Chrome devtools).

Attached image icon

Hello, thanks for reporting this!

There's an icon next to DOM nodes in console (and in several other places in devtools), that would take you to the inspector when clicked.
This looks quite similar to what you're asking.
Am I missing something?

Flags: needinfo?(jakub.g.opensource)

Well you're right. Now that you told me it's obvious. I think I even used this in the past on several occasions, but forgot about it.
Thanks!

Up to you to decide if menu entry could be added, or this bug should be closed.

Flags: needinfo?(jakub.g.opensource)

I guess we could have that, although it feels a bit redundant?
I'm not really sure.
What do you think Harald?

Flags: needinfo?(hkirschner)
Priority: -- → P4

I don't mind redundant context menus as they reduce surprises and allow discovery of all options.

Right-clicking a DOM element should even expose the same menu as the Inspector (does in Chrome), as removed elements otherwise can't be interacted with.

Flags: needinfo?(hkirschner)
Mentor: nchevobbe
Summary: Console: Add "Reveal in Inspector " (like Reveal in Elements panel in Chrome) → Add "Reveal in Inspector" context menu entry on elements

Hi, I would like to work on this as my first bug. Can I ask you if I have any questions?

hello Patricia, you sure can do :)

If it's your first bug, you might want to read this https://docs.firefox-dev.tools/getting-started/ to setup the work environment.
Make sure to select "Artifact builds" when asked as it speeds up the workflow quite a bit :)
Also, you can come and chat on our Slack https://devtools-html-slack.herokuapp.com/

Don't hesitate to ask anything!

If it's okay with Patricia, can I work on adding this feature?

Patricia if you're looking to contribute for the first time, this could help you out in finding good first bugs https://codetribute.mozilla.org/projects/devtools

Hi KC, I have already started working on this feature. Thanks for asking.

Assignee: nobody → patricia.e.lee.work
Pushed by nchevobbe@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/386f16b36a17
Add Reveal in Inspector context menu entry on elements. r=nchevobbe
Blocks: 1621042
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 76

Context menu options in the console were not documented at all (that I could find). So I added the general ones to the intro of Console messages and this to the Interpreter input/output subsection.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: