Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow comment UI to be triggered via a clickable icon in the gutter #147251

Open
bcanzanella opened this issue Apr 11, 2022 · 6 comments
Open

Allow comment UI to be triggered via a clickable icon in the gutter #147251

bcanzanella opened this issue Apr 11, 2022 · 6 comments
Assignees
Labels
comments Comments Provider/Widget/Panel issues feature-request Request for new features or functionality
Milestone

Comments

@bcanzanella
Copy link

Following up on a conversation with @isidorn here.

We've love to be able to use the comment API, though we have some concerns about the current mechanism for initialing a comment. For our use, having a clickable icon in the editor gutter to kick off that comment would be the ideal UX (see attached image below)

Screen Shot 2022-04-11 at 3 49 06 PM

@alexr00
Copy link
Member

alexr00 commented Apr 12, 2022

@bcanzanella we're getting pretty close to having this now: #146510 (comment)

There will likely still be some changes but this is the direction we're going. Does this align with what you're thinking of?

@alexr00 alexr00 added the info-needed Issue requires more information from poster label Apr 12, 2022
@planteater
Copy link

planteater commented Apr 12, 2022

@alexr00 - Unfortunately that probably doesn't help us. The key issue is that we support a wide range of commenting scenarios, none of which are constrained to commenting on a set of diffs. Users can comment anywhere in a file/diff, and with the current implementation we'd have to display that commenting bar along the entirety of every single file. Users probably won't like that.

Ideally we'd be able to display a clickable icon in the editor gutter that would trigger the comment. The attached gif reflects how things work in our extension for IntelliJ. It would be awesome if in VS Code, we could do something similar except that when clicking the icon it triggers the native commenting functionality instead of us having to open a modal over in our webview in the sidebar.

2022-04-12 06 58 02

@alexr00
Copy link
Member

alexr00 commented Apr 12, 2022

I see your point. Maybe we need some kind of "full document" mode, where that gutter bar doesn't show and we switch over to only showing an "add comment" indicator on the line of the cursor/current-selection. Full document mode would automatically switch over when the commenting range is the whole document.

@alexr00 alexr00 added feature-request Request for new features or functionality comments Comments Provider/Widget/Panel issues and removed info-needed Issue requires more information from poster labels Apr 12, 2022
@alexr00 alexr00 added this to the Backlog milestone Apr 12, 2022
@planteater
Copy link

Something like that could work, or just a way to invoke the comment from our own UI mechanism. In that JetBrains example we control the display of that icon that appears on selection. The only reason we don't do the same in VSC is that the icons in the gutter aren't clickable, so we have to have our compose icon appear over in the sidebar. Obviously a bit of a disconnected experience. Either way though, we don't necessarily need you to provide the UI for triggering the comment. In fact it might even be preferable for us to do it, or at least to have the option to do it via our own UI mechanism.

@isidorn
Copy link
Contributor

isidorn commented Apr 13, 2022

@planteater thanks for explaining your use case a bit better.

We are thinking of exposing decoration click events to extensions in the future. This has been requested in the past and is tracked by this issue #5455 It is still not decided if we will add this, but we are aware of the request.

As for showing the commenting bar in the whole document - I agree that users might not like this if we do this all the time, but if we only do it in the commenting context it might work. For the GitHub PR extension - that means to show the commenting bar while the user is reviewing a PR.
I am not sure if CodeStream also has that context - when the user might want to comment?

@planteater
Copy link

I'm still mulling it over @isidorn. We do have a couple of scenarios that would be more analogous to the GH PR example, where the user is explicitly going into comment mode. But our main use case isn't like that, and the user can comment on any block of code at any time. For as much as I'd love to have inline commenting, I'm probably reluctant to have inconsistent commenting paradigms.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comments Comments Provider/Widget/Panel issues feature-request Request for new features or functionality
Projects
None yet
Development

No branches or pull requests

5 participants