Repository navigation
LT-22687: Add a UX guide and decision register under Docs/ux #1191
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
| 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 | | ||
| | 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 | | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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` | β | β | | ||
There was a problem hiding this comment.
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).
There was a problem hiding this comment.
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.