-
Notifications
You must be signed in to change notification settings - Fork 8.5k
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
Bind CommandPalette to Tabs and MRU Tabs collections #8427
Conversation
New misspellings found, please review:
To accept these changes, run the following commands
✏️ Contributor please read thisBy default the command suggestion will generate a file named based on your commit. That's generally ok as long as you add the file to your commit. Someone can reorganize it later.
If the listed items are:
See the 🔬 You can test your commits without appending to a PR by creating a new branch with that extra change and pushing it to your fork. The :check-spelling action will run in response to your push -- it doesn't require an open pull request. By using such a branch, you can limit the number of typos your peers see you make. 😉
|
Hey do you mind if I hold off reviewing this PR till after #8420 merges? It's just a little hard to tease out what's new in this PR the way it's currently set up 😬 |
@zadjii-msft - absolutely! I created a PR for the diff between the branches, but the idea is in any case to merge them one by one. |
QQ: This is going to be unmarked draft when it is retargeted to your merged work in main, right? 😄 |
@DHowett - yes. Absolutely. I need to merge and improve few things. Hope to get to it on the weekend (to get some more focus time) 😊 |
@DHowett - btw.. not sure what is the best approach here.. but if the merge of the previous phase wasn't squashed the merge/rebase could be much simpler and safer. |
Yeah, our squash workflow can be a pain for stacked branches. A merge should work, though. Worst case, a rebase? |
It will work.. no worries - I was just surprised with the amount of conflicts 😄 |
New misspellings found, please review:
To accept these changes, run the following commands
✏️ Contributor please read thisBy default the command suggestion will generate a file named based on your commit. That's generally ok as long as you add the file to your commit. Someone can reorganize it later.
If the listed items are:
See the 🔬 You can test your commits without appending to a PR by creating a new branch with that extra change and pushing it to your fork. The :check-spelling action will run in response to your push -- it doesn't require an open pull request. By using such a branch, you can limit the number of typos your peers see you make. 😉
|
@DHowett, @zadjii-msft - this was meant to be a minimal step of binding the tabs manually (later on they will be bound to filterable list control). However during the testing I met few bugs.. and it ended up more code than required (it fixes the race from #8374). |
New misspellings found, please review:
To accept these changes, run the following commands
✏️ Contributor please read thisBy default the command suggestion will generate a file named based on your commit. That's generally ok as long as you add the file to your commit. Someone can reorganize it later.
If the listed items are:
See the 🔬 You can test your commits without appending to a PR by creating a new branch with that extra change and pushing it to your fork. The :check-spelling action will run in response to your push -- it doesn't require an open pull request. By using such a branch, you can limit the number of typos your peers see you make. 😉
|
New misspellings found, please review:
To accept these changes, run the following commands
✏️ Contributor please read thisBy default the command suggestion will generate a file named based on your commit. That's generally ok as long as you add the file to your commit. Someone can reorganize it later.
If the listed items are:
See the 🔬 You can test your commits without appending to a PR by creating a new branch with that extra change and pushing it to your fork. The :check-spelling action will run in response to your push -- it doesn't require an open pull request. By using such a branch, you can limit the number of typos your peers see you make. 😉
|
else | ||
{ | ||
// we need to reset the path so the CommandPalette will be updated | ||
// TODO: this could be avoided if were not resetting the Icon property upon hide. |
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.
bare TODO
winrt::com_ptr<TerminalTab> TerminalPage::_GetTerminalTabImpl(const TerminalApp::TabBase& tab) const | ||
winrt::com_ptr<TerminalTab> TerminalPage::_GetTerminalTabImpl(const TerminalApp::TabBase& tab) |
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.
Shouldn't we keep the const
?
@@ -2891,10 +2865,9 @@ namespace winrt::TerminalApp::implementation | |||
// - index: the in-order index of the tab to bump. |
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.
// - index: the in-order index of the tab to bump. | |
// - tab: the tab to bump. |
@carlos-zamora - thanks for the review! Due to #8653 it seems that I need to add some more logic here. So I guess that at this point the right thing to do is to split this PR into several stacked ones:
|
Fix `TabPaletteItem` to hold only a weak reference to a tab. This way we guarantee that the refcount of the closed tab gets to 0 immediately (and that command palette cannot "raise it from the dead"). While this seems a correct thing to do, it is still not clear why the `FilteredCommand` itself (the one holding the `TabPaletteItem`) doesn't get released until the UI is refreshed. There is an impact of not registering to PropertyChanged event: if the tab title changes during Tab Switcher navigation the Tab Switcher item won't be updated immediately (the change will apply next time the Tab Switcher is open). Due to this change we need to make sure that the tabs binding in #8427 doesn't break the title / icon update. ## Validation Steps Performed * Manual testing Closes #8651
A part of the microsoft#8415. Very technical commit to simplify the terminal page code towards additional steps of simplifying tab management. No business logic should change. A firs step in splitting microsoft#8427
Fix `TabPaletteItem` to hold only a weak reference to a tab. This way we guarantee that the refcount of the closed tab gets to 0 immediately (and that command palette cannot "raise it from the dead"). While this seems a correct thing to do, it is still not clear why the `FilteredCommand` itself (the one holding the `TabPaletteItem`) doesn't get released until the UI is refreshed. There is an impact of not registering to PropertyChanged event: if the tab title changes during Tab Switcher navigation the Tab Switcher item won't be updated immediately (the change will apply next time the Tab Switcher is open). Due to this change we need to make sure that the tabs binding in microsoft#8427 doesn't break the title / icon update. ## Validation Steps Performed * Manual testing Closes microsoft#8651
Second step towards #8415.
Closes: #8374
Introduces: