Skip to content

Partial #2975 - Deprecate v1 Menu classes #4013

Closed
tig wants to merge 121 commits intogui-cs:v2_developfrom
tig:v2_2975-v1Menu-Obsolete
Closed

Partial #2975 - Deprecate v1 Menu classes #4013
tig wants to merge 121 commits intogui-cs:v2_developfrom
tig:v2_2975-v1Menu-Obsolete

Conversation

@tig
Copy link
Copy Markdown
Member

@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
Copy Markdown
Member 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
Copy Markdown
Contributor

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);

@BDisp
Copy link
Copy Markdown
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
Copy Markdown
Member 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
Copy Markdown
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
Copy Markdown
Member 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.

@tig
Copy link
Copy Markdown
Member Author

tig commented Jul 7, 2025

This PR is stale. Closing.

@tig tig closed this Jul 7, 2025
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

4 participants