Skip to content

Menuitem for 'Display format NUnit': simplify 'show namespace' submenu#1208

Merged
rowo360 merged 1 commit intomainfrom
issue-1204
Mar 22, 2025
Merged

Menuitem for 'Display format NUnit': simplify 'show namespace' submenu#1208
rowo360 merged 1 commit intomainfrom
issue-1204

Conversation

@rowo360
Copy link
Contributor

@rowo360 rowo360 commented Mar 19, 2025

This PR fixes #1204 by replacing the two submenu items "Show namespace" and "Hide namespace" with one single submenu item.

In addition this submenu is only available, if the NUnit display format is checked. If another display format is checked, the submenu is not available.

If a display format is selected, the menu is not closed automatically anymore. Instead it's kept open, so that the user can select the appropriate submenu item right away.

@rowo360 rowo360 self-assigned this Mar 19, 2025
@rowo360
Copy link
Contributor Author

rowo360 commented Mar 19, 2025

From technical point of view:
we can use the ToolStripMenuItem event Closing to suppress that the menu is automatically closed when an item is clicked. The event parameter provides some information about the closing reason to act accordingly.
This applies for the entire 'Display format' menu item now and not only the 'NUnit' menu item. But as we plan to adapt the 'Fixture list' and 'Test list' menu item too, that's also fine.
BTW: although the menu is not closed automatically, the tree view is updated to the newly selected display format right away.

@rowo360
Copy link
Contributor Author

rowo360 commented Mar 19, 2025

I decided to keep the entire logic for adding/removing the submenu in the View class. From my point of view that's a pure UI part, so involving the Presenter class for this step seems to be an overhead.

@rowo360 rowo360 merged commit 05eb522 into main Mar 22, 2025
2 checks passed
@rowo360 rowo360 deleted the issue-1204 branch March 22, 2025 12:12
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.

NUnitTree Show/Hide Namespace can be simplified.

1 participant