Skip to content

Conversation

@aiday-mar
Copy link
Contributor

@aiday-mar aiday-mar commented Sep 30, 2022

Fixes #162330.

Adding the possibility to toggle the sticky scroll line by right clicking on it. I had to modify the ClickLinkGesture in order to introduce a new parameter 'hasRightClick' which will differentiate between a normal click and a right click. Here is an example of how it currently works:

sticky-scroll-contextmenu

@aiday-mar aiday-mar changed the title Adding context menu on the sticky scroll line (Fixes https://github.com/microsoft/vscode/issues/162330) Adding context menu on the sticky scroll line (Fixes #162330) Sep 30, 2022
@aiday-mar aiday-mar added this to the On Deck milestone Sep 30, 2022
@aiday-mar aiday-mar added the feature-request Request for new features or functionality label Sep 30, 2022
@aiday-mar aiday-mar marked this pull request as ready for review September 30, 2022 08:58
@aiday-mar aiday-mar requested a review from jrieken September 30, 2022 08:58
Copy link

@Tirednfedup Tirednfedup left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there any suggestions?

Copy link
Member

@jrieken jrieken left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks really good, left a tiny nit about the name of the menu (consistency matters)

I would also suggest to add the 'Toggle Breadcrumbs' command into the command. I believe sticky scroll and breadcrumbs are closely related and configured them in a single place sounds like a good idea. You can find the command here: ToggleBreadcrumb

@gjsjohnmurray
Copy link
Contributor

I would also suggest to add the 'Toggle Breadcrumbs' command

Doing this would also act as a clue about where I might be able to go to toggle Sticky Scroll back on again. But only if right-click on breadcrumbs also gave this kind of menu. Without that I have to realize that the View menu is the place to go, or Command Palette.

Also, I wonder if the "Toggle prefix is necessary? And should other editor-view-related toggles appear here as well? For example Minimap (currently on a context menu of an editor's vertical scrollbar, as well as one from the minimap itself when visible).

@aiday-mar
Copy link
Contributor Author

I would also suggest to add the 'Toggle Breadcrumbs' command

Doing this would also act as a clue about where I might be able to go to toggle Sticky Scroll back on again. But only if right-click on breadcrumbs also gave this kind of menu. Without that I have to realize that the View menu is the place to go, or Command Palette.

Also, I wonder if the "Toggle prefix is necessary? And should other editor-view-related toggles appear here as well? For example Minimap (currently on a context menu of an editor's vertical scrollbar, as well as one from the minimap itself when visible).

I would agree that having the menu appear also on the breadcrumbs bar would be more intuitive.

@jrieken jrieken self-assigned this Sep 30, 2022
@jrieken jrieken modified the milestones: On Deck, October 2022 Sep 30, 2022
@jrieken
Copy link
Member

jrieken commented Oct 4, 2022

Also, I wonder if the "Toggle prefix is necessary? And should other editor-view-related toggles appear here as well?

That's a good point. It seems that we don't have a good story for this, we often use "Toggle XYZ" because of places that don't render the check mark, e.g the command palette. We should maybe expand on the existing toggled title so that the default label is "XYZ" (which gets rendered with the check mark_ and then have on/off labels like "Show XYZ" and "Hide XYZ" for places that don't renderer the check mark.

This is an interesting discussion but I am in favour of leaving this out of this PR.

@jrieken
Copy link
Member

jrieken commented Oct 4, 2022

There is #162672 for the toogle-title disuccsion

@jrieken jrieken merged commit db85746 into main Oct 4, 2022
@jrieken jrieken deleted the aiday/issue162330 branch October 4, 2022 16:13
@github-actions github-actions bot locked and limited conversation to collaborators Nov 18, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

editor-sticky-scroll feature-request Request for new features or functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add sticky scroll context menu

6 participants