Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .claude/skills/convert-dialog/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,9 @@ create-integration-test skill consumes this file verbatim.
in the migration skill).
3. From the analysis document's layout section, propose an Avalonia layout
that AT MINIMUM replicates the WinForms capability; exceed it where the
effort is low.
effort is low. Check it against the Universal and Dialogs rules in
`Docs/ux/README.md` (buttons, window behavior, help, input checking,
choosers); the guide's rule wins over a WinForms habit it replaces.
4. For items with no exemplar: catalog the item's purpose and capabilities,
then look for an adequate replacement in Avalonia packages -- both those
already imported and others not yet used (an un-imported package is a
Expand Down
4 changes: 3 additions & 1 deletion .claude/skills/dialog-update/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ believe a divergence is warranted, stop and ask; do not encode it and move on.

Approved divergences must be recorded (see *Divergence register* below) with a
one-line reason and the approver β€” otherwise the next person reads it as a bug
and "fixes" it, thrashing the code.
and "fixes" it, thrashing the code. A difference that applies to dialogs in
general (button order, help, input checking) is a UX guide rule in
`Docs/ux/README.md`, not a per-dialog divergence.

## The dialog pairs (start here)

Expand Down
4 changes: 4 additions & 0 deletions .claude/skills/fieldworks-avalonia-ui/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ description: "Build, review, or fix Avalonia UI code in FieldWorks: XAML, MVVM,

## Start From the Established Patterns

The user-visible rules (labels, menus, keyboard, theme values, dialog buttons,
browse and detail behavior) are in the UX guide, `Docs/ux/README.md`; follow
it, and record any new view-wide UX decision in its register.

Do not design controls or seams from scratch. The migration hub skill
(`fieldworks-winforms-to-avalonia-migration`) documents the decided
architecture; its
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ A region is not "migrated" until it passes the symbol audit, parity gates,
and has zero runtime dependency on native Views/DataTree infrastructure β€”
otherwise you have only wrapped the old system.

How converted UI should look and behave is set by the UX guide,
`Docs/ux/README.md`; this skill covers how to build it. A decision that applies
across views goes in the guide's decision register; a difference in one
converted screen goes in that conversion's Jira issue.

## Established Architecture β€” Reuse, Don't Reinvent

Past migrations already decided the paradigms below. Before writing any new
Expand Down
4 changes: 3 additions & 1 deletion Docs/architecture/adr/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,11 @@ Not to be confused with:
work, indexed for reading before planning in a covered area.
- `openspec/` β€” proposed changes with their specs and task lists, which are
archived once implemented.
- `Docs/ux/` β€” the living UX guide: how the user interface should look and
behave, with its own register of provisional and temporary UX decisions.

An ADR records *why a constraint exists*. If what you are writing will need
editing the next time the code changes, it belongs in one of the other three.
editing the next time the code changes, it belongs in one of the others.

| ADR | Decision |
| --- | --- |
Expand Down
616 changes: 616 additions & 0 deletions Docs/ux/README.md

Large diffs are not rendered by default.

74 changes: 74 additions & 0 deletions Docs/ux/winforms-theme-baseline.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# WinForms theme baseline

The measured or coded look of the WinForms interface, set beside the Avalonia
theme token that now carries each value. The [UX guide](README.md) states what
each element must achieve; this table records where its look started, so
divergence from WinForms can be measured instead of argued from memory.

How to read and keep it:

- **WinForms value** is what the WinForms code draws, cited by file and line
(paths under `Src/`). "Measured" means the value was read from a rendered
baseline rather than from a constant.
- **Avalonia token** names the key in `Src/Common/FwAvaloniaTheme/Tokens/`. A
"β€”" means that area isn't converted yet; the converting change fills it in.
- **Match / differs**: a *differs* row must cite a
[decision register](README.md#decision-register) entry or a guide rule that
calls for the change. A difference with neither is a bug. *Check* marks a row
whose comparison still needs confirming.
- Add a row when a conversion introduces a token for an element that WinForms
already drew.

## Detail views

| Element | WinForms value | Source | Avalonia token | Match / differs |
| --- | --- | --- | --- | --- |
| Label column width | 150 px | `Common/Controls/DetailControls/DataTree.cs:113` | `DataTree.LabelColumnWidth` (150) | Match |
| Label / value splitter width | 5 px | `Common/Controls/DetailControls/Slice.cs:854` | `DataTree.SplitterWidth` (5) | Match |
| Width at which labels switch to abbreviations | 60 px | `Common/Controls/DetailControls/Slice.cs:53` | `DataTree.WsAbbrevWidth` (60) | Check: the token uses this value for the writing-system abbreviation column, a different element |
| Field label color | `SystemColors.ControlDarkDark` (#696969) | `Common/Controls/DetailControls/Slice.cs:1466` | `FwLabelBrush` (#696969) | Match |
| Field label font | Sans serif, 10 pt | `Common/Controls/DetailControls/Slice.cs:80` | `FwSurfaceFontSize` (11) | Check: Avalonia font sizes are in device-independent pixels, so 11 is about 8.25 pt, not 10 pt |
| Writing-system abbreviation color | #404040 (measured) | `Common/Controls/DetailControls/DetailControlsTests/DataTreeRenderTests.DataTreeRender_multiws.verified.png` | `FwWsAbbrevBrush` (#404040) | Match |
| Rule between rows | 1 px, `Color.LightGray` | `Common/Controls/DetailControls/DataTree.cs:1999` | `FwSliceRuleBrush` (LightGray), `DataTree.SliceRuleHeight` (1) | Match |
| Rule above a section header | 3 px, `Color.LightGray` (1 + `HeavyweightRuleThickness` 2) | `Common/Controls/DetailControls/DataTree.cs:199, 2000` | `FwSectionRuleBrush` (LightGray), `DataTree.SectionRuleHeight` (2) | Differs: 2 px, no register entry |
| Space above a section header rule | 10 px (`HeavyweightRuleAboveMargin`) | `Common/Controls/DetailControls/DataTree.cs:201` | `DataTree.SectionRuleMargin` (top 6) | Differs: 6 px, no register entry |

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.

This "Differs" row says "no register entry", but L15-L18 calls that a bug. Please add a register entry and link it here. The same applies to the section-rule row (L33) and the button-height row (L53).

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 button-height row now cites the 24 DIP target rule. The section-rule height and margin (2 px, 6 px) came in with #964 and moved into tokens in #1083, with no note on why they differ from WinForms' 3 px and 10 px. Were those deliberate? If so I'll add a register entry; if not, they're bugs and I'll file them.

| Expand / collapse box outline | `SystemColors.ControlDark` (#A0A0A0) | `Common/Controls/DetailControls/SliceTreeNode.cs:334` | `FwTreeBoxBorderBrush` (#A0A0A0) | Match |
| Section command link text | `Color.Blue`, sans serif 10 pt, underlined | `Common/Controls/DetailControls/SummaryCommandControl.cs:45, 168` | `SemiColorLink` (through `FwAvaloniaDensity.HotlinkBrush`) | Differs: register, section command look (Provisional, LT-22693) |
| Unavailable section command | `Color.Gray` | `Common/Controls/DetailControls/SummaryCommandControl.cs:169` | `FwDisabledOptionBrush` (Gray) | Match |
| Selected item background | `kclrBackgroundSelRow` (#D7E6FF) | `Common/Controls/XMLViews/XmlBrowseViewBaseVc.cs:894` | `FwSelectedRowBrush` (#D7E6FF) | Match |
| Context menu item height | About 22 px (measured) | β€” | `DataTree.MenuItemMinHeight` (22) | Match |

## Browse views

| Element | WinForms value | Source | Avalonia token | Match / differs |
| --- | --- | --- | --- | --- |
| Row height | About 17 px (measured) | β€” | `DataTree.BrowseRowMinHeight` (18) | Check: 1 px taller |
| Tentative / selected row fill | RGB(200, 255, 255) (`kclrTentative`) | `Common/Controls/XMLViews/XmlBrowseViewBaseVc.cs:51` | β€” | Guide rule *Analysis trust colors* requires a color distinct from the approved-guess color |
| Grid line | β€” | β€” | `FwBrowseGridLineBrush` (#DCDCDC) | Check: WinForms source not yet cited |

## Dialogs

| Element | WinForms value | Source | Avalonia token | Match / differs |
| --- | --- | --- | --- | --- |
| OK / Cancel / Help button size | 75 Γ— 23 px | `FwCoreDlgs/FwStylesDlg.resx:516-517, 546-547` | `DialogMinControlHeight` (Semi `SemiHeightControlSmall`, 24) | Differs: 24 px minimum height, per the target-size rule in [*Keyboard and assistive access*](README.md#keyboard-and-assistive-access) |
| Gap between dialog buttons | 6 px | `FwCoreDlgs/FwStylesDlg.resx:513-514, 543-544` | `DialogButtonStripGap` (Semi `SemiSpacingTight`) | Check: Semi step value not yet confirmed |
| Interface font | MS Sans Serif, 8.25 pt | Form designer defaults (for example `FwCoreDlgs/FwStylesDlg.resx`) | `FwSurfaceFontSize` (11 px, about 8.25 pt) | Match |

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.

If #1196 (LT-22854) merges, this row becomes "Differs": the interface font is the bundled default (Andika, 11 px), not the platform font. Lines are about 3 px taller (1.61 em vs 1.33 em). Register entry: ADR 0004.

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.

Same as the register row: whichever of this PR and #1196 merges second updates this row to Differs and cites ADR 0004.


## Interlinear text

| Element | WinForms value | Source | Avalonia token | Match / differs |
| --- | --- | --- | --- | --- |
| Guess based on the user's approvals | RGB(150, 255, 255) | `LexText/Interlinear/InterlinVc.cs:446` | β€” | β€” |
| Several approved analyses could apply | RGB(255, 255, 50) | `LexText/Interlinear/InterlinVc.cs:454` | β€” | β€” |
| Machine (parser) guess | RGB(234, 220, 186) | `LexText/Interlinear/InterlinVc.cs:462` | β€” | β€” |
| Background of the word being analyzed | RGB(235, 235, 220) | `LexText/Interlinear/SandboxBase.SandboxVc.cs:27` | β€” | β€” |
| Border of the word being analyzed | `Color.Blue` | `LexText/Interlinear/SandboxBase.SandboxVc.cs:29` | β€” | β€” |
| Editable lines of the word being analyzed | `Color.White` | `LexText/Interlinear/SandboxBase.SandboxVc.cs:30` | β€” | β€” |

## Status bar

| Element | WinForms value | Source | Avalonia token | Match / differs |
| --- | --- | --- | --- | --- |
| "Filtered" indicator | `Brushes.Yellow` | `xWorks/RecordClerk.cs:2907` | β€” | β€” |
| Parser-development indicator | `Brushes.Tan` | `xWorks/RecordClerk.cs:2930` | β€” | β€” |
| "Sorted by" indicator | `Brushes.Lime` | `xWorks/RecordClerk.cs:2960` | β€” | β€” |
Loading