Skip to content
This repository was archived by the owner on Mar 3, 2023. It is now read-only.
This repository was archived by the owner on Mar 3, 2023. It is now read-only.

Provide "Inspect Element" right-click menu (everywhere) #1790

Closed

Description

@izuzak

Suggested via Halp:

  • support/823f4f4aad3a11e380aec0e683f0e5c4

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.

47606715

Activity

  1. zcbenz commented on Mar 25, 2014

    @zcbenz
    Contributor

    The Inspect Element is available when in dev mode (via atom --dev or View -> Developer -> Open In Dev Mode).

  2. izuzak commented on Mar 25, 2014

    @izuzak
    ContributorAuthor

    💥 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:

    test100

    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?

  3. nathansobo commented on Mar 25, 2014

    @nathansobo
    Contributor

    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.

  4. izuzak commented on Jun 13, 2014

    @izuzak
    ContributorAuthor

    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.

  5. brettz9 commented on Mar 28, 2016

    @brettz9

    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...

  6. winstliu commented on Mar 28, 2016

    @winstliu
    Contributor

    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.

  7. brettz9 commented on Mar 28, 2016

    @brettz9

    Although I can get "Inspect Element" in dev mode, it doesn't appear in regular mode.

  8. mnquintana commented on Mar 28, 2016

    @mnquintana
    Contributor

    @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).

  9. brettz9 commented on Mar 29, 2016

    @brettz9

    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...

  10. winstliu commented on Mar 29, 2016

    @winstliu
    Contributor

    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.

  11. brettz9 commented on Mar 29, 2016

    @brettz9

    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.

  12. funkybunky commented on Sep 16, 2016

    @funkybunky

    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 ;)

  13. nathansobo commented on Sep 16, 2016

    @nathansobo
    Contributor

    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?

  14. Ben3eeE commented on Sep 16, 2016

    @Ben3eeE
    Contributor

    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.

  15. iolsen commented on Sep 16, 2016

    @iolsen
    Contributor

    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.

  16. Ben3eeE commented on Sep 16, 2016

    @Ben3eeE
    Contributor

    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.

  17. Raemon commented on Feb 7, 2018

    @Raemon

    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?

  18. Raemon commented on Feb 7, 2018

    @Raemon

    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.

  19. simurai commented on Feb 8, 2018

    @simurai
    Contributor

    @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:

    devtools

    It's a good alternative to select elements when the "Inspect Element" context menu is not available (like in stable mode).

  20. lock commented on Aug 7, 2018

    @lock

    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!

  21. locked as resolved and limited conversation to collaborators on Aug 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions