Skip to content

LT-22691: Open configured context menus from the label and value area - #1094

Merged
mark-sil merged 1 commit into
mainfrom
LT-22691a
Aug 20, 2026
Merged

LT-22691: Open configured context menus from the label and value area#1094
mark-sil merged 1 commit into
mainfrom
LT-22691a

Conversation

@mark-sil

@mark-silmark-sil commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

The Avalonia detail view now answers a right-click and the keyboard menu key on every row, showing the two menus its layout defines and keeping them distinct:

  • A row's label cell, and a section header, answer right-click with the slice menu. The "..." field-options button still opens the row's own menu.
  • A row's value box answers the same inputs with the in-string contextMenu= menu, including a right-click on the writing-system abbreviation gutter.
  • ComposeSliceMenuIds and ComposeInStringMenuIds keep the two compositions apart: the slice menu is the row's menu= plus exactly one shared trailing group (the object group alone when a row binds no menu=), while the value menu is the contextMenu= binding alone. Section hotlinks stay on their own affordance.
  • XCoreMenuBridge splices inline choice lists, so the Writing Systems entries appear instead of being dropped as an invisible submenu.
  • A menu opened without a pointer position anchors under the field it came from rather than at the last pointer position; a right-click still opens at the pointer.

This change is Reviewable

@github-actions

github-actionsBot commented Aug 20, 2026

Copy link
Copy Markdown

NUnit Tests

1 files ± 0 1 suites ±0 8m 27s ⏱️ - 2m 57s
5 852 tests +18 5 771 ✅ +18 81 💤 ±0 0 ❌ ±0 
5 861 runs +18 5 780 ✅ +18 81 💤 ±0 0 ❌ ±0 

Results for commit 4c544b0. ± Comparison against base commit ca025cd.

This pull request removes 6 and adds 24 tests. Note that renamed tests count towards both.
FwAvaloniaTests.DetailMenuRequestTests ‑ RightClick_OnLabel_NoLongerRaisesAnyRequest
FwAvaloniaTests.DetailMenuRequestTests ‑ RightClick_OnUnboundRow_RaisesNoRequest
SIL.FieldWorks.XWorks.DetailContextMenuCompositionTests ‑ EmptyFieldContextMenuId_IsDropped
SIL.FieldWorks.XWorks.DetailContextMenuCompositionTests ‑ MultiStringRow_AddsMultiStringSliceButNotObject
SIL.FieldWorks.XWorks.DetailContextMenuCompositionTests ‑ SharedSliceGroupSourceMenus_AreNeverBothPresent
SIL.FieldWorks.XWorks.DetailContextMenuCompositionTests ‑ SingleStringRow_AddsObjectButNotMultiStringSlice
FwAvaloniaTests.DetailMenuRequestTests ‑ ContextMenuKey_InTheValueBox_AnchorsToTheEditField_NotThePointer
FwAvaloniaTests.DetailMenuRequestTests ‑ ContextMenuKey_InTheValueBox_RaisesTheContextMenuRequest
FwAvaloniaTests.DetailMenuRequestTests ‑ ContextMenuKey_OnTheFocusedLabelCell_RaisesTheSliceMenuRequest
FwAvaloniaTests.DetailMenuRequestTests ‑ ContextMenuKey_OnTheLabelCell_AnchorsToThatCell
FwAvaloniaTests.DetailMenuRequestTests ‑ DetailMenuFlyout_AnchoredPlacement_DropsFromTheTargetsBottomLeft
FwAvaloniaTests.DetailMenuRequestTests ‑ DetailMenuFlyout_PointerPlacement_LeavesTheDefault
FwAvaloniaTests.DetailMenuRequestTests ‑ FieldMenuButton_AlwaysAnchorsToTheButton
FwAvaloniaTests.DetailMenuRequestTests ‑ LabelAndValue_RaiseTheirOwnDistinctMenus
FwAvaloniaTests.DetailMenuRequestTests ‑ RightClick_InTheValue_RaisesExactlyOneRequest_NotAlsoTheRowHandler
FwAvaloniaTests.DetailMenuRequestTests ‑ RightClick_OnASectionHeader_RaisesTheSliceMenuRequest
…

♻️ This comment has been updated with latest results.

@codecov-commenter

codecov-commenter commented Aug 20, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 69.73684% with 23 lines in your changes missing coverage. Please review.
✅ Project coverage is 38.34%. Comparing base (caeeeb1) to head (4c544b0).
⚠️ Report is 3 commits behind head on main.

Files with missing linesPatch %Lines
...xWorks/Avalonia/Hosting/RecordEditView.Avalonia.cs28.57%19 Missing and 1 partial ⚠️
Src/Common/FwAvalonia/AvaloniaHostControlBase.cs0.00%1 Missing and 1 partial ⚠️
Src/Common/FwAvalonia/Detail/DetailMenuFlyout.cs83.33%1 Missing ⚠️
Additional details and impacted files
@@ Coverage Diff @@## main #1094 +/- ##
==========================================
+ Coverage 38.31% 38.34% +0.02% 
==========================================
Files 1507 1507 Lines 350524 350580 +56 Branches 40288 40293 +5 ==========================================
+ Hits 134302 134426 +124 + Misses 186990 186925 -65 + Partials 29232 29229 -3 
Files with missing linesCoverage Δ
Src/Common/FwAvalonia/Detail/DataTree.cs96.42% <100.00%> (+0.60%)⬆️
Src/Common/FwAvalonia/Detail/DetailModel.cs77.95% <100.00%> (+0.08%)⬆️
Src/Common/FwAvalonia/Detail/FwFieldControls.cs82.32% <100.00%> (+0.59%)⬆️
Src/xWorks/Avalonia/Hosting/XCoreMenuBridge.cs70.14% <100.00%> (-1.28%)⬇️
Src/Common/FwAvalonia/Detail/DetailMenuFlyout.cs95.16% <83.33%> (+5.50%)⬆️
Src/Common/FwAvalonia/AvaloniaHostControlBase.cs49.39% <0.00%> (ø)
...xWorks/Avalonia/Hosting/RecordEditView.Avalonia.cs45.73% <28.57%> (+0.64%)⬆️

... and 7 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@jasonleenaylorjasonleenaylor left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Ask Claude to find a different set of words for 'gesture' that fits our identity as a desktop app and apply it throughout this PR.

@jasonleenaylor reviewed all commit messages and made 1 comment.
Reviewable status: 0 of 11 files reviewed, all discussions resolved.

The Avalonia detail view now answers a right-click and the keyboard menu key
on every row, showing the two menus its layout defines and keeping them
distinct:
- A row's label cell, and a section header, answer right-click with the slice
menu. The "..." field-options button still opens the row's own menu or its
hotlinks, by mouse or keyboard.
- A row's value box answers right-click and the keyboard menu key with the
in-string contextMenu= menu, including a right-click on the writing-system
abbreviation gutter.
- The in-string menu now opens on right-button release rather than press, a
side effect of raising it from ContextRequested.
- ComposeSliceMenuIds and ComposeInStringMenuIds keep the two compositions
apart: the slice menu is the row's menu= plus exactly one shared trailing
group (the object group alone when a row binds no menu=), while the value
menu is the contextMenu= binding alone. Section hotlinks stay on their own
affordance.
- XCoreMenuBridge splices inline choice lists, so the Writing Systems
entries appear instead of being dropped as an invisible submenu.
- A menu opened without a pointer position anchors under the field it came
from rather than at the last pointer position, which acceptance test 5
specifies; a right-click still opens at the pointer. DetailMenuRequest
carries the anchor control and OpenAtPointer, and the fallback adapter menu
derives its screen point when it runs.
The tests drive the real headless input pipeline -- right-button release and
the menu key -- so the wiring, the anchoring, and both compositions are
covered.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@mark-silmark-sil changed the title LT-22691: Open configured context menus from label and value gesturesLT-22691: Open configured context menus from the label and value areaAug 20, 2026

@mark-silmark-sil left a comment

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

The name changes have been pushed and the commit/PR message is fixed.

@mark-sil made 1 comment.
Reviewable status: 0 of 11 files reviewed, all discussions resolved (waiting on jasonleenaylor).

@jasonleenaylorjasonleenaylor left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

:lgtm:

@jasonleenaylor reviewed 10 files and all commit messages, and made 1 comment.
Reviewable status: 10 of 11 files reviewed, all discussions resolved.

@mark-sil
mark-sil merged commit 6f72671 into mainAug 20, 2026
8 of 10 checks passed
@mark-sil
mark-sil deleted the LT-22691a branch August 20, 2026 20:47
thejambi pushed a commit that referenced this pull request Aug 25, 2026
…#1094)
The Avalonia detail view now answers a right-click and the keyboard menu key
on every row, showing the two menus its layout defines and keeping them
distinct:
- A row's label cell, and a section header, answer right-click with the slice
menu. The "..." field-options button still opens the row's own menu or its
hotlinks, by mouse or keyboard.
- A row's value box answers right-click and the keyboard menu key with the
in-string contextMenu= menu, including a right-click on the writing-system
abbreviation gutter.
- The in-string menu now opens on right-button release rather than press, a
side effect of raising it from ContextRequested.
- ComposeSliceMenuIds and ComposeInStringMenuIds keep the two compositions
apart: the slice menu is the row's menu= plus exactly one shared trailing
group (the object group alone when a row binds no menu=), while the value
menu is the contextMenu= binding alone. Section hotlinks stay on their own
affordance.
- XCoreMenuBridge splices inline choice lists, so the Writing Systems
entries appear instead of being dropped as an invisible submenu.
- A menu opened without a pointer position anchors under the field it came
from rather than at the last pointer position, which acceptance test 5
specifies; a right-click still opens at the pointer. DetailMenuRequest
carries the anchor control and OpenAtPointer, and the fallback adapter menu
derives its screen point when it runs.
The tests drive the real headless input pipeline -- right-button release and
the menu key -- so the wiring, the anchoring, and both compositions are
covered.
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
Sign up for freeto 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.

3 participants

@mark-sil@codecov-commenter@jasonleenaylor