Repository navigation
LT-22884: Draw each Go-dialog headword in its own writing system's font - #1222
Merged
Merged
Conversation
thejambi
marked this pull request as draft
November 2, 2026 14:58
thejambi
force-pushed
the
LT-22884-go-results-headword-font
branch
from
November 2, 2026 15:09
c724c57 to
1198e78
Compare
thejambi
changed the base branch from
main
to
LT-22883-go-results-placeholders
November 2, 2026 15:09
NUnit Tests 1 files 1 suites 8m 57s ⏱️ Results for commit 8f1a7f0. ♻️ This comment has been updated with latest results. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1222 +/- ##
=======================================
Coverage 40.42% 40.43%
=======================================
Files 1552 1552
Lines 355801 355829 +28
Branches 41523 41529 +6
=======================================
+ Hits 143838 143869 +31
+ Misses 182651 182650 -1
+ Partials 29312 29310 -2
🚀 New features to boost your workflow:
|
thejambi
force-pushed
the
LT-22884-go-results-headword-font
branch
from
November 2, 2026 15:39
1198e78 to
3565bf6
Compare
thejambi
marked this pull request as ready for review
November 2, 2026 15:59
thejambi
force-pushed
the
LT-22884-go-results-headword-font
branch
from
November 3, 2026 16:08
3565bf6 to
a2d2b12
Compare
thejambi
force-pushed
the
LT-22884-go-results-headword-font
branch
3 times, most recently
from
November 3, 2026 20:20
d30de78 to
df9604e
Compare
The Go-family results list drew every headword in the Headword column's font, the default vernacular writing system's. Since LT-22671 a headword can come from another writing system, so one in, say, Arabic was drawn in the wrong font and direction. Each result row now carries HeadwordTypography, the font and direction of the writing system its headword came from, and the view prefers a row's typography over its column's. Entry and sense rows both carry it; an entry with no form keeps the column's. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
thejambi
force-pushed
the
LT-22884-go-results-headword-font
branch
from
November 3, 2026 20:39
df9604e to
8f1a7f0
Compare
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.
Start here:
Src/LexText/LexTextControls/Avalonia/EntryGoLauncherShared.cs--Headword(entry, out ws)now reports which writing system the headword came from; everything else carries that to the cell.In the new UI, the Go-family results list now draws each headword in the font and direction of the writing system it came from. Before, every headword used the Headword column's font, the default vernacular one's, so since #1217 a headword found only in, say, Arabic was drawn left-to-right in the wrong font.
Headless capture (Avalonia.Headless, test data): "kalb" comes from a right-to-left writing system and flows right-to-left; "casa" keeps the column's font; the Glosses cells are untouched.
What about rows nobody updated? They behave as before.
EntryGoSearchResult.HeadwordTypographydefaults to null, and a null row typography falls back to the column's, so other callers that build rows, such as Insert Entry's matches search, are unaffected. The question worth your time is whether the writing system reported always matches the text returned.Where to look
EntryGoLauncherShared.Headword: setswsonly on the branch that returns that ws's form; null on the no-form fallback, an empty headword since LT-22883. Pinned bySharedSearch_HeadwordFromAnotherWs_CarriesThatWsTypographyandSharedSearch_EntryWithNoForm_LeavesTheColumnTypography.SharedEntryOrSenseSearch_HeadwordFromAnotherWs_SenseRowsCarryThatWsTypography.EntryGoDialogView.BuildRow: the override reaches the Headword cell only (TypographyFor). Pinned byResultRow_HeadwordTypography_OverridesTheColumnTypography.Not here
main, out of scope.Stack and verification: top of the stack #1217 (LT-22671) → #1218 (LT-22883) → this PR; it merges after both.
build.ps1clean with comment and token hygiene;test.ps1FwAvaloniaDialogsTests 298/298, LexTextControlsTests 407 passed with 3 existing skips. Manual check of the ticket's steps in the new UI: author, pending.Next: approve, or point at a row type that should carry its own headword font and doesn't.
Reading this a year from now -- start here
LT-22884 is a follow-up to LT-22671 (#1217) and sits on LT-22883 (#1218). LT-22671 let the Go-family dialogs search, and show headwords from, any current vernacular or analysis writing system. This PR is the display half: the results list had one font per column, which stopped being enough once a column's values could come from different writing systems. The branch had no working documents; the only markdown change is one sentence in
.claude/skills/fieldworks-avalonia-ui/references/dialog-conversion.md, which stays.Decisions, and why
Headwordreturns the text and its writing system from the same loop iteration, so they cannot disagree. Recomputing the writing system later from the text would need a second walk over the same candidates and could pick a different one when two writing systems share a form.TypographyFor(field)rather than a Headword special case in the view. The view asks each row for its typography per field and stays field-agnostic. Only Headword returns one today; another column can opt in by extending that one method.HeadwordTextkeeps its signature. It has other callers (Insert Entry, the description text); it now delegates toHeadword(entry, out _).Evidence
LexTextControlsTests/Avalonia/EntryGoDialogLauncherTests.cs), against a real cache with an added right-to-left vernacular writing system (ar, Scheherazade New):SharedSearch_HeadwordFromAnotherWs_CarriesThatWsTypography: font and right-to-left come fromar.SharedSearch_DefaultVernacularHeadword_CarriesItsTypography: a default-vernacular headword carries the default vernacular font, not null.SharedSearch_EntryWithNoForm_LeavesTheColumnTypography: null.SharedEntryOrSenseSearch_HeadwordFromAnotherWs_SenseRowsCarryThatWsTypography: sense mode.FwAvaloniaDialogsTests/EntryGoDialogTests.cs):ResultRow_HeadwordTypography_OverridesTheColumnTypographyasserts font family and flow direction on the overridden cell, the column default on the other row, and the column font on the Glosses cell. It writes the snapshot shown above.Preflight review details
Base:
LT-22883-go-results-placeholders(#1218), top of the stack on #1217. Files changed: 6 against the base. Review model: Claude Opus 5.5.Contract/API changes: added
EntryGoSearchResult.HeadwordTypographyandEntryGoSearchResult.TypographyFor(EntryGoResultField)inFwAvaloniaDialogs; additive, defaults preserve existing behavior.EntryGoLauncherShared.HeadwordTextsignature unchanged.Findings
Insert Entry's Matching entries list ((author: already onLcmInsertEntryDialogLauncher.cs,InsertEntryDlgView.axaml) applies no writing-system typography, so all its headwords use the UI font.main, out of scope for LT-22884)Go-family Glosses cells can mix analysis writing systems and are drawn in the default analysis font.(author: already onmain, out of scope for LT-22884)Validation:
build.ps1 -CommentHygiene -TokenHygieneclean, 0 warnings;test.ps1 -SkipNativeFwAvaloniaDialogsTests 298/298 and LexTextControlsTests 407 passed, 3 existing skips, 0 failed. Manual repro of the ticket's steps: author, not yet done.Interview notes: both Minor findings dismissed as out of scope; no other trade-offs or uncertainties flagged.
Suggested review focus
Headword: reported writing system matches the returned form, including the fallback.BuildRow: row typography overrides only the Headword cell.🤖 Generated with Claude Code
This change is