Skip to content
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

Convert Tab's context flyout into a XAML control #7841

Open
leonMSFT opened this issue Oct 6, 2020 · 8 comments
Open

Convert Tab's context flyout into a XAML control #7841

leonMSFT opened this issue Oct 6, 2020 · 8 comments
Labels
Area-User Interface Issues pertaining to the user interface of the Console or Terminal Issue-Task It's a feature request, but it doesn't really need a major design. Product-Terminal The new Windows Terminal.
Milestone

Comments

@leonMSFT
Copy link
Contributor

leonMSFT commented Oct 6, 2020

Tabs currently create their context flyout menu items in a big create function. It would be nice to convert that into a custom XAML control so that the more menu items we decide to add to the flyout, the easier it will be to manage. We should also design it in a way where different types of tabs (i.e. SettingsUI tab vs TerminalTab) can choose what menu items they would like to use.

@leonMSFT leonMSFT added Area-User Interface Issues pertaining to the user interface of the Console or Terminal Product-Terminal The new Windows Terminal. Issue-Task It's a feature request, but it doesn't really need a major design. labels Oct 6, 2020
@leonMSFT leonMSFT self-assigned this Oct 6, 2020
@ghost ghost added the Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting label Oct 6, 2020
@DHowett
Copy link
Member

DHowett commented Oct 6, 2020

Funny enough, I tried to do this (just having the context menu in a .xaml file) and it was a total pain to hook up the event handlers without introducing another class just to implement the events that could come out of the context menu 😄

@leonMSFT
Copy link
Contributor Author

leonMSFT commented Oct 6, 2020

Damn, it's not as easy as exposing the MenuFlyoutItems in the IDL and just being like menuflyoutitem.Click{function}?

@leonMSFT
Copy link
Contributor Author

leonMSFT commented Oct 6, 2020

Oh nvm I see, you tried it out by only having a XAML file?

@DHowett DHowett removed the Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting label Oct 9, 2020
@DHowett
Copy link
Member

DHowett commented Oct 9, 2020

Yep. Just a XAML file w/ a flyout, then one with a usercontrol w/ a flyout, then then then

@DHowett DHowett added this to the Terminal Backlog milestone Oct 9, 2020
@mdtauk
Copy link

mdtauk commented Oct 9, 2020

Have you looked into using Xaml UserControls or CustomControls?

@DHowett
Copy link
Member

DHowett commented Oct 9, 2020

@mdtauk most of our project is UserControls or CustomControls.

@mdtauk
Copy link

mdtauk commented Oct 9, 2020

@mdtauk most of our project is UserControls or CustomControls.

Fair enough then lol

@zadjii-msft
Copy link
Member

What if we just passed a ShortcutActionDispatch into the (theoretical) TabContextMenuControl? Then we could have the items in the flyout dispatch actions to that, routing them up to the Page as usual. We'll probably want that anyways, esp if we want to let users customize the content of that flyout.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-User Interface Issues pertaining to the user interface of the Console or Terminal Issue-Task It's a feature request, but it doesn't really need a major design. Product-Terminal The new Windows Terminal.
Projects
None yet
Development

No branches or pull requests

4 participants