-
Notifications
You must be signed in to change notification settings - Fork 30.1k
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
A run & debug dropdown with default button #128022
Conversation
@@ -304,14 +308,142 @@ export class SubmenuEntryActionViewItem extends DropdownMenuActionViewItem { | |||
} | |||
} | |||
|
|||
class DropdownWithDefauktActionViewItem extends BaseActionViewItem { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Defaukt is probably intended to be Default
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed - thanks for spotting this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very neat!
Maybe find a more explicit name for ISubmenuItem#storageKey
or make it a boolean, like rememberDefaultAction
, and derive the storage key from the menu identifier
Yeah, I was using the menu identifier as a storage key before but decided differently when polishing the PR... ;-) |
Incorporated @jrieken's feedback. |
This PR fixes #117722
This is my first attempt for a dropdown menu that remembers a default action.
The PR introduces an alternative UI for submenus:
If a "storageKey" attribute is specified for a submenu, the submenu is shown in the UI as a dropdown menu with a button that executes the last action run from the dropdown. The default action is persisted in workspace storage under the "storageKey".
This alternate UI is generic (independent from debug's run & debug functionality).
However, this PR configures the alternate UI for the "editor/title/run" contribution point.
The UI looks like this: