-
Notifications
You must be signed in to change notification settings - Fork 2.6k
fix: use node ID instead of running index for menu #12500
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
Conversation
Closes eclipse-theia#12493 Signed-off-by: Akos Kitta <[email protected]>
Can you please help with this, @tsmaeder? Thank you! |
@tsmaeder Ping? |
@kittaakos finally had time to come back to this one. The implementation here does not really reflect the discussion in #12493. How shall we proceed? |
Another bug this PR should cover is the very first non-functional context menu item. Handler IDs start from
The internal node ID is incremented here:
But it won't work here because it will be
The following DTO does not get a click handler: {
"id": "file.newFile",
"accelerator": "Cmd+Shift+N",
"label": "New Tab",
"handlerId": 0,
"checked": false,
"enabled": true,
"type": "normal",
"visible": true
} |
The very first context menu item with ID `0` has not had a click handler Ref: eclipse-theia/theia#12500 Signed-off-by: Akos Kitta <[email protected]>
The very first context menu item with ID `0` has not had a click handler Ref: eclipse-theia/theia#12500 Signed-off-by: Akos Kitta <[email protected]>
Ping? |
Thanks for the ping. I have not had time to return to this PR; it's in draft. Downstream, we use the proposed fix since |
Closing due to lack of interest. |
What it does
This PR switches from a running index (
number
) menu handler to the menu node's technical ID (string
).How to test
Start the example electron app, and once you see the
Sample Menu
popping up, clickFile
>New File
multiple times. When the app loads, the highest number ofUntitled-$NUMBER
equals the times you click on theNew File
menu during the app startup. So if you click the menu thrice, expect to seeUntitled-3
.Closes #12493
12493.mp4
Review checklist
Reminder for reviewers