Skip to content

Lt 22634 bulk edit preview - #1255

Merged
aror92 merged 3 commits into
mainfrom
LT-22634-bulkEditPreview
Nov 23, 2026
Merged

aror92 merged 3 commits into
mainfrom
LT-22634-bulkEditPreview

Conversation

@aror92

@aror92 aror92 commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

LT-22634 Fix Bulk Edit Preview Wrapping

  • Add a new Views WrapGroup box class that uses a binary wrap algorithm:

    • If all items fit on one line in the column, don't wrap.
    • Otherwise, every item gets its own line in the column
      (including the arrow divider between Current and New values).

    This ensures that the arrow between Current and New values
    in bulk edit preview visually divides all the Current values
    from the New values.

    Any Views display requiring this kind of binary wrap can also
    use this box in the future.

    Comma space separators are used between the items when displayed
    on a single line. These separators are not selectable in the FLEx
    display, but they will copy over with text if the text is copy/pasted.

  • Fix Preview items to match normal non-preview column
    Bulk edit preview used to:

    • Draw Current Value from the column's normal display layout (so all names
      match what is displayed outside of preview).

    • Use displayNameProperty for the New Value, which would match
      Current Value most of the time, but not when ShortName is
      different from Name or for Etym.-Source Language, where
      the displayNameProperty is AbbrAndName, and the normal display
      is only Name.

    Now, both Current Value and New Value draw the item names from the
    column's normal display layout. They use displayNameProperty only
    as a fallback.


This change is Reviewable

aror92 and others added 2 commits November 18, 2026 10:21
Add a new Views WrapGroup box class that uses a binary wrap algorithm:
* If all items fit on one line in the column, don't wrap.
* Otherwise, every item gets its own line in the column
  (including the arrow divider between Current and New values).

This ensures that the arrow between Current and New values
in bulk edit preview visually divides all the Current values
from the New values.

Any Views display requiring this kind of binary wrap can also
use this box in the future.

Comma space separators are used between the items when displayed
on a single line. These separators are not selectable in the FLEx
display, but they will copy over with text if the text is copy/pasted.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Bulk edit preview used to:

* Draw Current Value from the column's normal display layout (so all names
  match what is displayed outside of preview).

* Use displayNameProperty for the New Value, which would match
  Current Value most of the time, but not when ShortName is
  different from Name or for Etym.-Source Language, where
  the displayNameProperty is AbbrAndName, and the normal display
  is only Name.

Now, both Current Value and New Value draw the item names from the
column's normal display layout. They use displayNameProperty only
as a fallback.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

Comment hygiene (advisory)

2 comment-style violation(s) in the lines this branch adds since origin/main.
Advisory only -- no check fails on these, and the same violations appear as inline warnings on the Files changed tab.

File Category Comment
Src/views/VwTextBoxes.cpp:949 comment-too-long 236 chars (budget 200): Answer true if any container of the paragraph we're laying out is...
Src/views/VwSimpleBoxes.cpp:3730 comment-too-long 213 chars (budget 200): :>****************************************************************...

Fix them per .claude/skills/fieldworks-code-commenting/SKILL.md.
Running .\build.ps1 -CommentHygiene (or .\test.ps1 -CommentHygiene) enforces them locally, and
re-wraps over-wide lines and repairs non-ASCII punctuation as it goes.

@github-actions

github-actions Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

NUnit Tests

    1 files  ± 0      1 suites  ±0   11m 13s ⏱️ -15s
7 310 tests +10  7 231 ✅ +16  79 💤  - 6  0 ❌ ±0 
7 319 runs  +10  7 240 ✅ +16  79 💤  - 6  0 ❌ ±0 

Results for commit e2a0caf. ± Comparison against base commit 8ec12b9.

This pull request removes 43 and adds 53 tests. Note that renamed tests count towards both.
FwAvaloniaTests.ActiveHostContractTests ‑ Avalonia_CommandMenuRouting_IsAnApprovableAdapter_ForContextMenuCommands
SIL.FieldWorks.Common.Framework.DetailControls.DataTreeCommandAdapterTests ‑ ClearCurrentSlice_IsTheSanctionedWayToHaveNoCurrentSlice
SIL.FieldWorks.Common.Framework.DetailControls.DataTreeCommandAdapterTests ‑ HiddenTree_AsExternalCommandAdapter_IsAMessageTarget
SIL.FieldWorks.Common.Framework.DetailControls.DataTreeCommandAdapterTests ‑ HiddenTree_WithNoCurrentSlice_IsNotAMessageTarget
SIL.FieldWorks.XWorks.CategoryEditMenuTests ‑ TheSlotTemplateAndSubcategoriesMenus_RenderWhatTheAdapterPathRendered_WithoutTheMediator
SIL.FieldWorks.XWorks.DetailCommandAdapterHardeningTests ‑ EnsureMenuCommandAdapter_NoSliceMatchesHvo_ClearsCurrentSliceRatherThanMisTarget
SIL.FieldWorks.XWorks.DetailCommandAdapterHardeningTests ‑ EnsureMenuCommandAdapter_TargetInLazySliceRange_RealizesAndTargetsTheRightObject
SIL.FieldWorks.XWorks.DetailCommandAdapterHardeningTests ‑ ExpansionState_PersistsToLocalSetting_AndIsReadBackInANewSession
SIL.FieldWorks.XWorks.DetailCommandAdapterHardeningTests ‑ LabelColumnWidth_IgnoresNonPositiveWidths
SIL.FieldWorks.XWorks.DetailCommandAdapterHardeningTests ‑ LabelColumnWidth_PersistsToLocalSetting_AndRoundTrips
…
FwAvaloniaTests.DetailEditingViewTests ‑ AReferenceItem_RegistersAFlush_ThatStagesWithoutSaving
FwAvaloniaTests.DetailEditingViewTests ‑ AReferenceRowWithNothingToType_RegistersNoFlush
FwAvaloniaTests.DetailEditingViewTests ‑ AReferenceSlot_RegistersAFlush_ThatStagesWithoutSaving
FwAvaloniaTests.DetailEditingViewTests ‑ CtrlY_AfterCtrlZ_RedoesTheTyping_InTheTextBox
FwAvaloniaTests.DetailEditingViewTests ‑ CtrlY_WhileTyping_WithNothingToRedo_GoesNowhere
FwAvaloniaTests.DetailEditingViewTests ‑ CtrlZAndCtrlY_WithNoOpenEdit_AreOfferedToTheHost
FwAvaloniaTests.DetailEditingViewTests ‑ CtrlZ_AfterTypingBeyondTheUndoHistory_DropsTheRest_AndStops
FwAvaloniaTests.DetailEditingViewTests ‑ CtrlZ_InAPopupEditor_IsLeftToThatEditor
FwAvaloniaTests.DetailEditingViewTests ‑ CtrlZ_InAReferenceItem_UndoesTheTyping_ThenGoesToTheHost
FwAvaloniaTests.DetailEditingViewTests ‑ CtrlZ_InAReferenceSlot_UndoesTheTyping_ThenGoesToTheHost
…

♻️ This comment has been updated with latest results.

@codecov-commenter

codecov-commenter commented Nov 18, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 77.96610% with 91 lines in your changes missing coverage. Please review.
✅ Project coverage is 40.41%. Comparing base (6005947) to head (e2a0caf).
⚠️ Report is 7 commits behind head on main.

Files with missing lines Patch % Lines
Src/views/VwSimpleBoxes.cpp 77.97% 37 Missing ⚠️
...rc/Common/Controls/XMLViews/XmlBrowseViewBaseVc.cs 79.72% 15 Missing and 14 partials ⚠️
Src/views/VwSimpleBoxes.h 60.00% 12 Missing ⚠️
Src/Common/RootSite/CollectorEnv.cs 0.00% 6 Missing ⚠️
Src/LexText/Discourse/ConstChartRowDecorator.cs 0.00% 4 Missing ⚠️
Src/views/VwEnv.cpp 84.61% 2 Missing ⚠️
Src/Common/Controls/XMLViews/XMLViewsDataCache.cs 93.33% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1255      +/-   ##
==========================================
- Coverage   40.86%   40.41%   -0.45%     
==========================================
  Files        1573     1597      +24     
  Lines      357290   360490    +3200     
  Branches    41840    42176     +336     
==========================================
- Hits       145992   145687     -305     
- Misses     181991   185113    +3122     
- Partials    29307    29690     +383     
Files with missing lines Coverage Δ
Src/Common/Controls/XMLViews/BulkEditBar.cs 52.91% <100.00%> (+0.53%) ⬆️
Src/views/VwEnv.h 87.50% <ø> (ø)
Src/views/VwSelection.cpp 44.33% <100.00%> (+0.21%) ⬆️
Src/views/VwTextBoxes.cpp 49.61% <100.00%> (+1.52%) ⬆️
Src/Common/Controls/XMLViews/XMLViewsDataCache.cs 66.09% <93.33%> (+2.56%) ⬆️
Src/views/VwEnv.cpp 58.14% <84.61%> (+0.30%) ⬆️
Src/LexText/Discourse/ConstChartRowDecorator.cs 50.52% <0.00%> (-0.54%) ⬇️
Src/Common/RootSite/CollectorEnv.cs 48.80% <0.00%> (-0.31%) ⬇️
Src/views/VwSimpleBoxes.h 59.92% <60.00%> (+0.21%) ⬆️
...rc/Common/Controls/XMLViews/XmlBrowseViewBaseVc.cs 70.22% <79.72%> (+1.68%) ⬆️
... and 1 more

... and 119 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.

In a right-to-left wrap group on one line, the items are drawn in
reverse order, but NavLeft and NavRight still stepped through them
left to right. Screen readers moving left or right between items in
a right-to-left bulk edit preview therefore went the wrong way.

NavLeft and NavRight now swap direction when the group is
right-to-left, using the same setting as the one-line layout, as
VwParagraphBox already does. Stacked groups still return no box for
left or right.

Add native tests for left/right navigation in both directions and
for stacked groups.

Also, fix FindListItemNode_FollowsTheRowPathForComplexFormTypes.
It was comparing the wrong property of the row to the
complexRef.hvo. Compare RootObjectHvo instead of KeyObject.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
@aror92
aror92 marked this pull request as ready for review November 23, 2026 15:11

@thejambi thejambi 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.

@thejambi reviewed 18 files and all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on aror92).

@aror92
aror92 merged commit d6b31fd into main Nov 23, 2026
9 checks passed
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