- Notifications
You must be signed in to change notification settings - Fork7.2k
CmdPal: Handle CommandItem Title changes properly and raise notification every time it changes#40513
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:main
Are you sure you want to change the base?
Uh oh!
There was an error while loading.Please reload this page.
Conversation
… changesPreviously, the `Title` property raised a change notification only when set directly. However, the `Title` getter returns a coalesced value: if `Title` is not set, it falls back to `Command.Name`. This update ensures that property change notifications for `Title` are also raised when:- The `Command` property changes- The `Name` property of the assigned `Command` changes and affects the `Title`
…ing TitleCommandItemViewModel now updates its internal _itemTitle field not only when the CommandItem model raises a property notification for Title, but also when the model’s Command or the Command’s name changes.This works around an issue in SDK versions before 0.3, where CommandItem does not raise property change notifications for Title in all effective cases.This approach is not fully correct, as it relies on knowledge of CommandItem’s internal logic and the Title property being virtual and should be sooner or later reverted.
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
Hi, better to move this from the issue directly here: I see a few possible solutions. I want to sync with you about the expected outcome, and discuss which parts we should keep and which are better reverted. Current state + reasoning
Options
|
…nd-after-changing-the-title-of-a-fallback-item-we-won-t-hide-it-correctly
Summary of the Pull Request
PR Checklist
Command
after changing theTitle
of a fallback item, we won't hide it correctly #39167Detailed Description of the Pull Request / Additional comments
Validation Steps Performed