Skip to content

OnClick event on Gutter #5455

Closed
Closed

Description

How could I handle OnClick events on Gutter, similar to how breakpoints does?

The intention was to connect it with a decorator (previously created with vscode.window.createTextEditorDecorationType) so the user should Click on the Gutter and create/destroy the decorator assigned to the line where the user clicked.

Thanks in advance

Activity

  1. added
    feature-request
    on Apr 18, 2016
  2. AnneTheAgile commented on Oct 31, 2018

    @AnneTheAgile

    Cross refs;
    1.This, Right click in vscode edge, mentioned: "visual studio code - Add right click menu item inside gutter of vscode" - Stack Overflow ; ; https://stackoverflow.com/questions/41821174/add-right-click-menu-item-inside-gutter-of-vscode
    2.Right click on file in Opsys ;
    Add shortcut for file right click context menu. #15939
    3.Right click in editor:
    Custom menu entires, context menu entries, and action bar items #3192
    3.1.Within the bgse/relative-path-and-line extension , their first request;
    Feature Request: add actions to context menu #1
    4.Click in Menu Bar of editor; this appears to be the item merged as a result of [3]
    menu bar extensions #7704

  3. ThisIsABug commented on Oct 11, 2019

    @ThisIsABug

    AnneTheAgile just for clarification: the origin of this feature request wasn't the possibility to expose a whole context menu, this is already working some pixels to the right of the gutter. So the user has a very similar possibility already.
    The origin was here: alefragnani/vscode-bookmarks#24
    It is just about the mentioned decorator. It is about a single left-click feature like toggling a breakpoint.

  4. sguillia commented on Feb 7, 2020

    @sguillia

    There now is an onclick event on the gutter, when editing settings.json.

    It doesn't seem exposed through the API though.

    Capture du 2020-02-07 12-24-41

  5. sketchbuch commented on Mar 20, 2020

    @sketchbuch

    This would be really useful. Any information about if this will happen? I'm making an extension where I want to click on a gutter icon that my extension creates and run a command and/or show a drop down menu.

  6. sudhagar10 commented on May 3, 2020

    @sudhagar10

    I started working on an extension assuming this was already exposed and now I am stuck.

    I got misled by breakpoint and the edit icon appearing in the gutter of settings page.

  7. sudhagar10 commented on May 4, 2020

    @sudhagar10

    sudhagar10 can you check this https://marketplace.visualstudio.com/items?itemName=ryanluker.vscode-coverage-gutters

    Thanks Abhishek Chakraborty (@chakraborty-slx). Took a look at it.

    I was able to place icons in gutter. But click event there is not exposed and that is where I am stuck.

  8. Almenon commented on Jul 4, 2020

    @Almenon

    onHover would be useful too. For example in AREPL it would be cool if the user could hover over the error icon in the gutter to see the full exception message.

    (commenting on this issue instead of a new one because I'm assuming it would be easy to add a onHover event along with onClick)

  9. canadaduane commented on Oct 15, 2020

    @canadaduane

    Has anyone begun working on this?

  10. 14 remaining items

  11. aldanchenko commented on Jan 4, 2023

    @aldanchenko

    Hi all 👋

    I'm correctly understood that this function is still not implemented?

  12. alefragnani commented on Jan 5, 2023

    @alefragnani
    Author

    Alex Danchenko (@aldanchenko) , you are right. It isn't available yet...

  13. aldanchenko commented on Jan 9, 2023

    @aldanchenko
  14. weirane commented on Mar 2, 2023

    @weirane

    This is much easier to understand when you see it: CleanShot 2022-04-18 at 11 56 21

    Dennis Pilarinos (@dennispi) May I ask what extension is this in the GIF? I'm trying to add hover messages on the gutter decoration but can't figure out how to do it. I think it'll be helpful to see how this extension does it.

  15. joyceerhl commented on Mar 8, 2023

    @joyceerhl
    Contributor

    Alessandro Fragnani (@alefragnani) nickzhums FYI, relatedly there's an API proposal to expose a context menu in the editor gutter #175945 in order to support copying links for a line or range. You can try it out in the latest insiders but it'll only work in development until finalization. Any feedback is appreciated.

  16. alefragnani commented on Mar 9, 2023

    @alefragnani
    Author

    Joyce Er (@joyceerhl) thanks for pointing that out! I'll definitely take a look, and let you know how to fit on my scenarios 👍

  17. alefragnani commented on Nov 2, 2023

    @alefragnani
    Author

    Hi Joyce Er (@joyceerhl) ,

    I would say, at least on my side, that this issue can be closed as completed. 🎉

    As I commented on the API Proposal (#175945 (comment)), the API worked perfectly. And I'm already using on my extensions.

    Thank you!

  18. removed this from the Backlog milestone on Dec 6, 2023
  19. added
    *duplicate
    on Dec 6, 2023
  20. mcoblenz commented on Dec 6, 2023

    @mcoblenz

    I'm not sure that a context menu suffices for our purposes. Can I make it so clicking an icon causes an action? Or must the icon open a context menu?

  21. mcoblenz commented on Dec 6, 2023

    @mcoblenz

    I'm not sure that a context menu suffices for our purposes. Can I make it so clicking an icon causes an action? Or must the icon open a context menu?

    (see https://marketplace.visualstudio.com/items?itemName=Kale-Lab.salt for the use case)

  22. locked and limited conversation to collaborators on Jan 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    *duplicateapieditor-apifeature-request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions