Repository navigation
fix: update label/sublabel/icon in MenuItems on open - #49678
Merged
Merged
Conversation
codebytere
force-pushed
the
allow-changing-menu-title-label-macos
branch
from
February 5, 2026 07:07
d217100 to
724df6c
Compare
codebytere
force-pushed
the
allow-changing-menu-title-label-macos
branch
from
February 9, 2026 14:40
724df6c to
3ed2b81
Compare
codebytere
force-pushed
the
allow-changing-menu-title-label-macos
branch
2 times, most recently
from
February 19, 2026 10:07
2af7f04 to
52b0ba5
Compare
ckerr
reviewed
Feb 19, 2026
| isolate, const_cast<Menu*>(this), "_getLabelForCommandId", command_id); | ||
| std::u16string label; | ||
| if (!gin::ConvertFromV8(isolate, val, &label)) | ||
| label.clear(); |
Member
There was a problem hiding this comment.
(nit) not a blocker or anything, asking more for my own understanding -- is this .clear() call ever needed? Is it possible for gin::ConvertFromV8() to populate label on 112 and still return false?
jkleinsc
requested changes
Feb 24, 2026
jkleinsc
left a comment
Member
There was a problem hiding this comment.
Overall LGTM, just needs a doc update. Also, we should add/update tests for this.
codebytere
force-pushed
the
allow-changing-menu-title-label-macos
branch
from
February 26, 2026 13:01
52b0ba5 to
1166d02
Compare
jkleinsc
approved these changes
Feb 26, 2026
|
Release Notes Persisted
|
This was referenced Feb 27, 2026
Contributor
|
I have automatically backported this PR to "41-x-y", please check out #49972 |
Contributor
|
I have automatically backported this PR to "40-x-y", please check out #49973 |
2 of 4 tasks
3 tasks done
6 of 7 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of Change
Closes #7627
Our switch to manually managing
NSMenuItemstate pre-open finally allows us to dynamically update menu items across platforms.macOS
Linux
macOS
Tested with https://gist.github.com/codebytere/47d4fe1f42fb953591500338c9846860
Checklist
npm testpassesRelease Notes
Notes: Allow dynamically updating menu item labels, sublabels, and icons.