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

Switch context menu generation to use a flags enum of actions #15481

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

DHowett
Copy link
Member

@DHowett DHowett commented May 30, 2023

Calling a hundred bespoke WinRT methods to determine what context menu items to show is not scalable!

In the future, we can add...

MenuAction::Copy (applicable when there is a selection)
MenuAction::Paste (applicable when the control is not read-only)
MenuAction::CopyLink (applicable when there is a link!)

I also moved ownership of knowing where the menu was opened to TermControl.
It could go down to Interactivity with some work.
It just felt wrong to have the Core remembering this user interaction state.

I also fixed some trivial resource duplication.

DHowett added 4 commits June 16, 2023 13:47
(cherry picked from commit da1b24a88267f7a9dea829dfc83bc5c057f0b6e7)
(cherry picked from commit d9bc198826780316b7b2822137203200381bfb43)
(cherry picked from commit 7d25a9a0844cba8b822cc84e3ede08c0681c1766)
(cherry picked from commit 346b1ae6e67d16f230bec8d8d7107faf02253a3a)
@DHowett DHowett force-pushed the dev/duhowett/applicableactions branch from a8ab99c to 9096325 Compare June 16, 2023 18:48
@zadjii-msft
Copy link
Member

Is there a reason this is a draft? This seems fine to me?

(I must have missed it when I went on paternity last year, then never saw it again)

@DHowett
Copy link
Member Author

DHowett commented Jul 17, 2024

Is there a reason this is a draft? This seems fine to me?

I swear I had a reason. Let me dig back in.

@DHowett
Copy link
Member Author

DHowett commented Jul 17, 2024

I think the issue is that I hadn't moved Copy/Paste over to this model honestly

@DHowett DHowett marked this pull request as ready for review July 17, 2024 23:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants