-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Introduce duplicate tab menu #9388
Conversation
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.
Approving with suggestions. Thanks!
// "Duplicate Tab" | ||
Controls::FontIcon duplicateTabSymbol; | ||
duplicateTabSymbol.FontFamily(Media::FontFamily{ L"Segoe MDL2 Assets" }); | ||
duplicateTabSymbol.Glyph(L"\xF5ED"); |
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.
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.
Yeah. Didn't find anything less confusing
@@ -39,7 +39,7 @@ namespace winrt::TerminalApp::implementation | |||
void TerminalPage::_HandleDuplicateTab(const IInspectable& /*sender*/, | |||
const ActionEventArgs& args) | |||
{ | |||
_DuplicateTabViewItem(); | |||
_DuplicateFocusedTab(); |
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.
A stupid question: if a tab is not focused, can it be duplicated?
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.
I kinda want see a image of gif demonstrating this feature. There's no image so I can only guess how it will behave based on the method name 😅
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.
Here I just renamed the method for duplicating the current tab (in the TerminalPage
terminology, current tab is called focused tab, since it is returned by GetFocusedTabIndex).
The addition in the rest of the code is to allow duplication of the tab which is not necessarily the current tab, by clicking on "Duplicate Tab" in the TabView's context menu.
@skyline75489 - here is an image! 😄 |
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.
Yea I'm cool with this. Maybe in the future, we should add a index
property to the duplicateTab
action, so we can use the ShortcutActionDispatch
to handle this, but that's something to deal with in the far future.
Thanks!
Hello @zadjii-msft! Because this pull request has the p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (
|
Hey. Actually I didn't work to add index (it could be easier to implement) 😄 |
🎉 Handy links: |
PR Checklist