Skip to content

Indicate click target when invoking editor line number context menu #176557

Closed

Description

@joyceerhl

In our tree and list widgets as well as in our editor breadcrumbs, we visually distinguish between:

  1. the active element
  2. the element that's being hovered
  3. the element that a context menu was invoked for via right click (and maybe ctrl+click on mac)
breadcrumb.mp4
explorer.mp4

We now have a context menu for editor line numbers, but the editor line number only reflects where the cursor currently is, so:

  1. there is no highlight when you hover over an editor line number which is different than the one relating to the editor selection
  2. there is no focus indicator when you right click on an editor line number

This makes it difficult to visually verify which line number you are right clicking on, e.g. if you are trying to copy a link.

Activity

  1. joyceerhl commented on Mar 8, 2023

    @joyceerhl
    ContributorAuthor

    Kai had the suggestion that we should select the whole line corresponding to the line number context menu target to reduce ambiguity about which line is going to be selected. This does align with what happens on github.com and is not a breaking change since we never enabled right click context menus on the line number in the first place. Looping in David Dossett (@daviddossett) for UX and Henning Dieterichs (@hediet) for editor feedback

  2. joyceerhl commented on Mar 9, 2023

    @joyceerhl
    ContributorAuthor

    Explored this, seems pretty reasonable and does address the problem of ambiguous context, the only thing I'm wondering about is whether it also makes sense to have this selection behavior when right clicking in the editor gutter, as it would be a behavior change for the debug/test context menus, and it would not preserve your in-editor selection (which could be bad if the user has multiple selections going). Any feedback Connor Peet (@connor4312)?

    right-click-select-line.mp4
  3. connor4312 commented on Mar 9, 2023

    @connor4312
    Member

    Hm, I'm honestly not a fan of selecting the line when right clicking on test decorations or working with breakpoints. In both cases you aren't "switching contexts" away from what you were doing, and selecting the line is never going to be a desired outcome of right-clicking a gutter

  4. joyceerhl commented on Mar 9, 2023

    @joyceerhl
    ContributorAuthor

    Yea maybe we have this selection behavior only for a right click on the line number specifically then.

  5. added
    feature-request
    on Mar 9, 2023
  6. added
    unreleased
    on Mar 9, 2023
  7. added
    verification-needed
    on Mar 9, 2023
  8. added
    insiders-released
    and removed
    unreleased
    on Mar 10, 2023
  9. eleanorjboyd commented on Mar 21, 2023

    @eleanorjboyd
    Contributor

    To clarify how to test this you just right-click in the gutter and an option should pull up which says : `copy vscode id"? Is this in vscode desktop and are there parameters on which types of files it works for?

  10. added
    verification-steps-needed
    on Mar 21, 2023
  11. joyceerhl commented on Mar 21, 2023

    @joyceerhl
    ContributorAuthor

    Steps:

    1. Right click on a line number with no existing selection in the editor
    2. Verify that the target line is selected
    3. Have an existing selection in the editor (test both single line and multiple line selections)
    4. Verify that the selection changes appropriately when right clicking on a line number
  12. removed
    verification-steps-needed
    on Mar 21, 2023
  13. eleanorjboyd commented on Mar 21, 2023

    @eleanorjboyd
    Contributor

    seeing this on two different file types:

    Screen.Recording.2023-03-21.at.11.39.40.AM.mov
  14. joyceerhl commented on Mar 21, 2023

    @joyceerhl
    ContributorAuthor

    Eleanor Boyd (@eleanorjboyd) are you pointing out that there's a context menu for .py but not .json? That is by design since you cannot set breakpoints in a json file so none of your available actions apply to the .json file. The active selection seems to be changing correctly based on your mp4 (which is the scope for this issue).

  15. eleanorjboyd commented on Mar 21, 2023

    @eleanorjboyd
    Contributor

    Is it supposed to have a related context menu or am I supposed to see the "open in vscode.dev" menu item come up for a json like it did in yours? If that looks correct then I just misunderstood the issue I was verifying. Sorry!

  16. joyceerhl commented on Mar 21, 2023

    @joyceerhl
    ContributorAuthor

    You'll only see the Copy vscode.dev link action in a GitHub repo. There are other actions if you install the GitHub Pull Requests extension for copying GitHub links. If this is a GitHub repo then that's a bug.

  17. added
    verified
    and removed
    verification-found
    verification-needed
    on Mar 21, 2023
  18. locked and limited conversation to collaborators on Apr 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

feature-requestinsiders-releasedverified

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions