Conversation
XCoreMenuBridge populated the merged context menu through the mediator even when a native authority owned an id: ChoiceGroup asked the colleagues whether each submenu had a visible item, so the hidden DataTree adapter still took part in every owned menu that carried a submenu. mnuDataTree-Object, the next id to move across, is made of submenus. The bridge now builds one ChoiceGroup per menu id, so each id's ownership is known, and populates an owned group through the new ChoiceGroup.PopulateNow(querySubmenuVisibility: false), which keeps every submenu instead of asking the colleagues. Every leaf under an owned id, submenus included, is answered by the authority. A submenu whose leaves are all hidden is omitted, an inline choice list is spliced as on the mediator path, and a list-populated submenu under an owned id is refused with NotSupportedException, since no authority can answer one yet. Edge separators are trimmed once on the merged menu rather than per group, so the separator between a row's own menu and mnuDataTree-Object survives. The host's Field Visibility and Move Field item builders (VisibilityItem, MoveItem, ShowAllWritingSystemsItem) now take the item's label as a parameter, so the coming mnuDataTree-Object authority can call them without display properties from the mediator. Locating a row's override target is split out as TryLocateOverrideTarget, which logs why a row has no target instead of failing silently. Nothing renders differently today: the only owned id is mnuReorderVector, which has no submenus. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #1153 +/- ##
=======================================
Coverage 38.91% 38.91%
=======================================
Files 1519 1519
Lines 352403 352447 +44
Branches 40622 40627 +5
=======================================
+ Hits 137122 137156 +34
- Misses 185992 186004 +12
+ Partials 29289 29287 -2
🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Second step of retiring the hidden WinForms DataTree adapter behind the Avalonia detail view (LT-22691), following #1143. Nothing renders differently today: the only owned id is
mnuReorderVector, which has no submenus. This PR makes the bridge able to own a menu id that carries submenus, whichmnuDataTree-Object, the next id to move across, does.What changed
XCoreMenuBridgepopulated the merged context menu through the mediator even when a native authority owned an id:ChoiceGroupasked the colleagues whether each submenu had a visible item, so the hidden DataTree adapter still took part in every owned menu that carried a submenu.The bridge now builds one
ChoiceGroupper menu id, so each id's ownership is known, and populates an owned group through the newChoiceGroup.PopulateNow(querySubmenuVisibility: false), which keeps every submenu instead of asking the colleagues. Every leaf under an owned id, submenus included, is answered by the authority. A submenu whose leaves are all hidden is omitted, an inline choice list is spliced as on the mediator path, and a list-populated submenu under an owned id is refused withNotSupportedException, since no authority can answer one yet. Edge separators are trimmed once on the merged menu rather than per group, so the separator between a row's own menu andmnuDataTree-Objectsurvives.The host's Field Visibility and Move Field item builders (
VisibilityItem,MoveItem,ShowAllWritingSystemsItem) now take the item's label as a parameter, so the comingmnuDataTree-Objectauthority can call them without display properties from the mediator. Locating a row's override target is split out asTryLocateOverrideTarget, which logs why a row has no target instead of failing silently.Tests
New tests cover the owned path: an owned menu with submenus is built without a single mediator display query, while an unowned menu still asks. An owned submenu whose leaves are all hidden is omitted. An owned list-populated submenu is refused. The merged Subentries menu keeps its separator before Field Visibility.
Runs:
build.ps1 -CommentHygiene -TokenHygieneclean; xWorksTestsDetailObjectCommandExecutionTests32/32; xCoreInterfacesTests 19/19. Manually tested in Lexicon Edit: Subentries and Complex Forms label menus, Field Visibility and Move Field on plain rows, the Writing Systems submenu on multi-string rows, item right-click moves, Help, and a second tool's label menus.Next
PR C: the
mnuDataTree-Objectauthority (Field Visibility and Move Field through these builders, Help through the help-topic rule from #1151) plusmnuDataTree-Help, with contract and all-rows equivalence tests.🤖 Generated with Claude Code
This change is