-
Notifications
You must be signed in to change notification settings - Fork 30.2k
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
Comments
@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 - 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. |
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. |
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. |
@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'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. |
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)
The text was updated successfully, but these errors were encountered: