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-sil mark-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-actions Bot 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 lines Patch % Lines
...xWorks/Avalonia/Hosting/RecordEditView.Avalonia.cs 28.57% 19 Missing and 1 partial ⚠️
Src/Common/FwAvalonia/AvaloniaHostControlBase.cs 0.00% 1 Missing and 1 partial ⚠️
Src/Common/FwAvalonia/Detail/DetailMenuFlyout.cs 83.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 lines Coverage Δ
Src/Common/FwAvalonia/Detail/DataTree.cs 96.42% <100.00%> (+0.60%) ⬆️
Src/Common/FwAvalonia/Detail/DetailModel.cs 77.95% <100.00%> (+0.08%) ⬆️
Src/Common/FwAvalonia/Detail/FwFieldControls.cs 82.32% <100.00%> (+0.59%) ⬆️
Src/xWorks/Avalonia/Hosting/XCoreMenuBridge.cs 70.14% <100.00%> (-1.28%) ⬇️
Src/Common/FwAvalonia/Detail/DetailMenuFlyout.cs 95.16% <83.33%> (+5.50%) ⬆️
Src/Common/FwAvalonia/AvaloniaHostControlBase.cs 49.39% <0.00%> (ø)
...xWorks/Avalonia/Hosting/RecordEditView.Avalonia.cs 45.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.

@jasonleenaylor jasonleenaylor 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-sil mark-sil changed the title LT-22691: Open configured context menus from label and value gestures LT-22691: Open configured context menus from the label and value area Aug 20, 2026

@mark-sil mark-sil left a comment

Copy link
Copy Markdown
Contributor Author

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

@jasonleenaylor jasonleenaylor 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 main Aug 20, 2026
8 of 10 checks passed
@mark-sil
mark-sil deleted the LT-22691a branch August 20, 2026 20:47
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.

3 participants