Skip to content

Partial #2975 - Deprecate v1 Menu classes #4013

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

Open
wants to merge 109 commits into
base: v2_develop
Choose a base branch
from

Conversation

tig
Copy link
Collaborator

@tig tig commented Apr 2, 2025

Fixes

Proposed Changes/Todos

Pull Request checklist:

  • I've named my PR in the form of "Fixes #issue. Terse description."
  • My code follows the style guidelines of Terminal.Gui - if you use Visual Studio, hit CTRL-K-D to automatically reformat your files before committing.
  • My code follows the Terminal.Gui library design guidelines
  • I ran dotnet test before commit
  • I have made corresponding changes to the API documentation (using /// style comments)
  • My changes generate no new warnings
  • I have checked my code and corrected any poor grammar or misspellings
  • I conducted basic QA to assure all features are working

@tig
Copy link
Collaborator Author

tig commented Apr 3, 2025

BQ2Yb5W 1

In the above the Diagnostics menu's FlagSelector menu item has been tweaked to do the right thing.

The other two menus exhibit the old, broken behavior.

@tig tig requested a review from Copilot April 3, 2025 21:13
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 49 out of 49 changed files in this pull request and generated no comments.

Comments suppressed due to low confidence (2)

Terminal.Gui/Views/FlagSelector.cs:437

  • The condition in the UncheckNone method unchecks all checkboxes except those labeled 'None', which may be unintended. Consider changing the condition to check for equality ('sv.Title == "None"') to only uncheck the 'None' checkbox.
foreach (CheckBox cb in SubViews.OfType<CheckBox> ().Where (sv => sv.Title != "None"))

Terminal.Gui/Views/Menu/PopoverMenu.cs:408

  • [nitpick] If the commented-out border styling code is no longer needed, consider removing it for clarity. Otherwise, add an explanatory comment describing its retention.
//menu.Border.Thickness = new (1);

@tig
Copy link
Collaborator Author

tig commented Apr 23, 2025

@tig to avoid this kind of issue in the future I would suggest to add this assertion to the View.Navigation.cs file:

image

This, and a few other things, are why I've created: #4040

Please review that PR asap so I can merge it. Then, i'll get back to these other things.

@BDisp
Copy link
Collaborator

BDisp commented Apr 25, 2025

@tig just a few things I want to ask if you'll handle them in this PR:

  • Menu stays always open when clicked second time. F9 work as expected closing the menu when pressing F9 second time.
  • Menu radio botton aren't checked after click in the UICatalog themes.

@tig
Copy link
Collaborator Author

tig commented Apr 25, 2025

@tig just a few things I want to ask if you'll handle them in this PR:

  • Menu stays always open when clicked second time.

The current behavior is a known bug. See:

image

  • F9 work as expected closing the menu when pressing F9 second time.

Will do.

  • Menu radio button aren't checked after click in the UICatalog themes.

You need to be more clear. I don't understand what you are suggesting.

@BDisp
Copy link
Collaborator

BDisp commented Apr 25, 2025

You need to be more clear. I don't understand what you are suggesting.

In the UICatalog if you click in the Dark theme for i.e. the radio button wont be flagged as checked.

@tig
Copy link
Collaborator Author

tig commented Apr 25, 2025

You need to be more clear. I don't understand what you are suggesting.

In the UICatalog if you click in the Dark theme for i.e. the radio button wont be flagged as checked.

Ahhh. Yep, thats one of the bugs that led me to realize I had some deep design errors that needed to be corrected.

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.

Add events for GetNormalColor etc.... HighlightStyle.Hover causes ColorScheme issues
3 participants