You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 3, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Mar 3, 2023. It is now read-only.
Provide "Inspect Element" right-click menu (everywhere) #1790
For creating our own themes, would be nice to be able to select any text in a document and choose "inspect element" like in Chrome. So we know just what we are working with and need to style. Only way I can find to do this now is open dev tools and dig through.
This is a feature request, but I love it so much I had to make an issue for it. Personally, I'm super used to the right-click "Inspect element" menu in Chrome, and would love to see that in Atom.
💥 Oh wow, thanks @zcbenz -- I had no idea! That's super helpful! ❤️
Re-reading the user's email, I think I see another thing that's bothering him:
.. would be nice to be able to select any text in a document and choose "inspect element" like in Chrome...
Currently, if you right-click on any text in any line in the editor, and select "Inspect element" -- the selection is lost and the devtools focus on the overlay div with the cursor:
I believe that the user expected the devtools to focus on the DOM element for the text he selected, similar to how Chrome does. Would something like that be possible?
It's the overlayer div that consistently gives people trouble. I'm not sure how essential it is anymore. We attach views to it and cursors as well. It's possible these could go directly on the lines div instead, providing direct access to the lines.
This will be (mostly) fixed in the react editor since it doesn't have an overlayer, as far as I can tell (just an underlayer). The part that won't be fixed is that the right-click "Inspect Element" menu would still be available in dev mode only. However, selecting with the 🔍 tool in devtools is always possible and should work much better (= no overlayer), so I believe this is 🆒.
Added this issue to the list of issues which will be fixed when we flip the switch for the react editor.
Can I ask what the rationale for having a separate developer build is if one can get to some of the dev tools anyhow? Is it less performant or does it just have more distractions that regular users won't be interested in? The inspect element is a pretty basic feature for debugging and introspecting on the UI (e.g., to find a color to use for one's stylesheet) so would be nice to have that available if adding it does not compromise your goals in having a separate build...
Can I ask what the rationale for having a separate developer build is if one can get to some of the dev tools anyhow?
Think of the developer builds as similar to the Chrome release system. Beta and dev builds contain features and bug fixes that haven't been tested enough to go into the stable version yet. Other than that though all three release channels are the same.
Inspect Element is available in all release channels.
@brettz9 That's the idea – if you want to hack on a package or Atom core, you should launch an Atom window in dev mode, which enables some menu items like Inspect Element and also loads packages symlinked to the dev folder (ie. with apm link --dev), among other things. However, if you just want to open the DevTools, you can do that at anytime by going to View > Developer > Toggle Developer Tools in the app menu or entering the keybinding (Cmd-Alt-I on OS X, Ctrl-Alt-I on Win & Linux).
Ok, sure, thanks, but is there any reason why the same tool which is available in a browser is not made available in regular mode? I'm just wondering whether a request can be made to add this particular feature to the non-developer mode...
Oops, it looks like I totally misread your original comment @brettz9. Sorry about that. I assume Inspect Element isn't available on non-dev Atom since it's more likely to be used by people developing Atom :P.
Sure, and I don't mean to be stubborn here, but both Firefox and Chrome come with this ability out of the box in their normal editions. It's convenient to be able to explore one's environment without leaving the comfort of your own home. :) (Yes, I know it is not hard to launch the dev version, but just saying) And although it may be more likely to be used by people developing Atom or packages, it can also be useful for regular users who want to introspect on say a color or style that is in use by the IDE and use that in their own custom stylesheet. If it is really that complicated to change, or if there is some instability/performance reason, I could understand that, but conceptually, I think Atom is much less of an environment to freak out its regular users (who are programmers) with a little bit of developer ability if that is the concern.
Fully agree with @brettz9
Given the tagline of Atom "A hackable text editor...", I was also surprised to not see this feature as a default. The main claim of Atom is to be hackable and this feature helps a lot with hacking Atom to say it in different words.
So I also disagree with @50Wliu here. I guess users of Atom want to customize their experience with the editor. That is prolly part of the reason why they chose it in the first place (see tagline).
Well, just my 2 cents ;)
I'm not dead-set against having the option in stable mode, but today seeing the menu is as simple as opening a dev mode window though cmd-shift-pApplication: Open Dev ... it's not a separate build or anything. The idea is that in stable mode you just want to use Atom as your text editor, not necessarily hack on it in that usage scenario. Then when you want to make changes, you do them in dev mode, which is just a command away. Do people not want to use dev mode or something?
I have had times when something went wrong in stable and I wanted to inspect it quickly, those times it would be nice to have because what went wrong might not be there once you reopen in dev mode.
I have had times when something went wrong in stable and I wanted to inspect it quickly
In this instance it's still possible to open the dev tools immediately and navigate to the element from there. You can even use the button at top-left to enable clicking on the element you want to jump to.
It's a little more trouble, but available if you're afraid a restart in dev mode is going to lose the condition you want to examine.
You can even use the button at top-left to enable clicking on the element you want to jump to.
Oh I did not know this, thanks for pointing that out. Only reason I saw for enabling this was to reduce the many steps required to navigate through the entire dom.
I'm not dead-set against having the option in stable mode, but today seeing the menu is as simple as opening a dev mode window though cmd-shift-p Application: Open Dev ... it's not a separate build or anything. The idea is that in stable mode you just want to use Atom as your text editor, not necessarily hack on it in that usage scenario. Then when you want to make changes, you do them in dev mode, which is just a command away. Do people not want to use dev mode or something?
It's not that I don't want to use Dev mode - it's that I had no idea that was even a thing I was supposed to do. Making it work the exact same way as chrome is more user friendly, it just intuitively works the way you expect.
If it's less performant or something, that's one thing, but if the point is just to hide it away... I mean, it's already hidden away. Why hide it away more?
In this instance it's still possible to open the dev tools immediately and navigate to the element from there. You can even use the button at top-left to enable clicking on the element you want to jump to.
It's a little more trouble, but available if you're afraid a restart in dev mode is going to lose the condition you want to examine.
FYI, I'm still not sure what this means. I just opened my thing in dev mode, failed to reproduce the issue I was experiencing, and am trying to follow this instruction but don't know what "button at the top left" means.
@Raemon but don't know what "button at the top left" means.
It's the "Select an element in the page to inspect it" button in the top left corner of the DevTools. The one with the square + pointer icon. Here a gif:
It's a good alternative to select elements when the "Inspect Element" context menu is not available (like in stable mode).
This issue has been automatically locked since there has not been any recent activity after it was closed. If you can still reproduce this issue in Safe Mode then please open a new issue and fill out the entire issue template to ensure that we have enough information to address your issue. Thanks!
Activity
zcbenz commentedon Mar 25, 2014
The
Inspect Elementis available when in dev mode (viaatom --devorView -> Developer -> Open In Dev Mode).izuzak commentedon Mar 25, 2014
💥 Oh wow, thanks @zcbenz -- I had no idea! That's super helpful! ❤️
Re-reading the user's email, I think I see another thing that's bothering him:
Currently, if you right-click on any text in any line in the editor, and select "Inspect element" -- the selection is lost and the devtools focus on the overlay div with the cursor:
I believe that the user expected the devtools to focus on the DOM element for the text he selected, similar to how Chrome does. Would something like that be possible?
nathansobo commentedon Mar 25, 2014
It's the overlayer div that consistently gives people trouble. I'm not sure how essential it is anymore. We attach views to it and cursors as well. It's possible these could go directly on the lines div instead, providing direct access to the lines.
izuzak commentedon Jun 13, 2014
This will be (mostly) fixed in the react editor since it doesn't have an overlayer, as far as I can tell (just an underlayer). The part that won't be fixed is that the right-click "Inspect Element" menu would still be available in dev mode only. However, selecting with the 🔍 tool in devtools is always possible and should work much better (= no overlayer), so I believe this is 🆒.
Added this issue to the list of issues which will be fixed when we flip the switch for the react editor.
brettz9 commentedon Mar 28, 2016
Can I ask what the rationale for having a separate developer build is if one can get to some of the dev tools anyhow? Is it less performant or does it just have more distractions that regular users won't be interested in? The inspect element is a pretty basic feature for debugging and introspecting on the UI (e.g., to find a color to use for one's stylesheet) so would be nice to have that available if adding it does not compromise your goals in having a separate build...
winstliu commentedon Mar 28, 2016
Think of the developer builds as similar to the Chrome release system. Beta and dev builds contain features and bug fixes that haven't been tested enough to go into the stable version yet. Other than that though all three release channels are the same.
Inspect Element is available in all release channels.
brettz9 commentedon Mar 28, 2016
Although I can get "Inspect Element" in dev mode, it doesn't appear in regular mode.
mnquintana commentedon Mar 28, 2016
@brettz9 That's the idea – if you want to hack on a package or Atom core, you should launch an Atom window in dev mode, which enables some menu items like
Inspect Elementand also loads packages symlinked to the dev folder (ie. withapm link --dev), among other things. However, if you just want to open the DevTools, you can do that at anytime by going to View > Developer > Toggle Developer Tools in the app menu or entering the keybinding (Cmd-Alt-I on OS X, Ctrl-Alt-I on Win & Linux).brettz9 commentedon Mar 29, 2016
Ok, sure, thanks, but is there any reason why the same tool which is available in a browser is not made available in regular mode? I'm just wondering whether a request can be made to add this particular feature to the non-developer mode...
winstliu commentedon Mar 29, 2016
Oops, it looks like I totally misread your original comment @brettz9. Sorry about that. I assume Inspect Element isn't available on non-dev Atom since it's more likely to be used by people developing Atom :P.
brettz9 commentedon Mar 29, 2016
Sure, and I don't mean to be stubborn here, but both Firefox and Chrome come with this ability out of the box in their normal editions. It's convenient to be able to explore one's environment without leaving the comfort of your own home. :) (Yes, I know it is not hard to launch the dev version, but just saying) And although it may be more likely to be used by people developing Atom or packages, it can also be useful for regular users who want to introspect on say a color or style that is in use by the IDE and use that in their own custom stylesheet. If it is really that complicated to change, or if there is some instability/performance reason, I could understand that, but conceptually, I think Atom is much less of an environment to freak out its regular users (who are programmers) with a little bit of developer ability if that is the concern.
funkybunky commentedon Sep 16, 2016
Fully agree with @brettz9
Given the tagline of Atom "A hackable text editor...", I was also surprised to not see this feature as a default. The main claim of Atom is to be hackable and this feature helps a lot with hacking Atom to say it in different words.
So I also disagree with @50Wliu here. I guess users of Atom want to customize their experience with the editor. That is prolly part of the reason why they chose it in the first place (see tagline).
Well, just my 2 cents ;)
nathansobo commentedon Sep 16, 2016
I'm not dead-set against having the option in stable mode, but today seeing the menu is as simple as opening a dev mode window though
cmd-shift-pApplication: Open Dev... it's not a separate build or anything. The idea is that in stable mode you just want to use Atom as your text editor, not necessarily hack on it in that usage scenario. Then when you want to make changes, you do them in dev mode, which is just a command away. Do people not want to use dev mode or something?Ben3eeE commentedon Sep 16, 2016
I have had times when something went wrong in stable and I wanted to inspect it quickly, those times it would be nice to have because what went wrong might not be there once you reopen in dev mode.
iolsen commentedon Sep 16, 2016
In this instance it's still possible to open the dev tools immediately and navigate to the element from there. You can even use the button at top-left to enable clicking on the element you want to jump to.
It's a little more trouble, but available if you're afraid a restart in dev mode is going to lose the condition you want to examine.
Ben3eeE commentedon Sep 16, 2016
Oh I did not know this, thanks for pointing that out. Only reason I saw for enabling this was to reduce the many steps required to navigate through the entire dom.
Raemon commentedon Feb 7, 2018
It's not that I don't want to use Dev mode - it's that I had no idea that was even a thing I was supposed to do. Making it work the exact same way as chrome is more user friendly, it just intuitively works the way you expect.
If it's less performant or something, that's one thing, but if the point is just to hide it away... I mean, it's already hidden away. Why hide it away more?
Raemon commentedon Feb 7, 2018
FYI, I'm still not sure what this means. I just opened my thing in dev mode, failed to reproduce the issue I was experiencing, and am trying to follow this instruction but don't know what "button at the top left" means.
simurai commentedon Feb 8, 2018
It's the "Select an element in the page to inspect it" button in the top left corner of the DevTools. The one with the square + pointer icon. Here a gif:
It's a good alternative to select elements when the "Inspect Element" context menu is not available (like in stable mode).
lock commentedon Aug 7, 2018
This issue has been automatically locked since there has not been any recent activity after it was closed. If you can still reproduce this issue in Safe Mode then please open a new issue and fill out the entire issue template to ensure that we have enough information to address your issue. Thanks!