Repository navigation
fix(Field): label, description and status text, the status tooltip included, keep their written order on right-to-left pages - #11220
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
|
/approve-spec d8fe0d9 |
PR Analysis Report🔎 Preview ·
|
| Component | Size | LoC | Visual · A11y · RTL |
|---|---|---|---|
| InputGroup | 63.4 kB (+275 B) · 8.9 kB CSS (+23 B) | — | — · ✗ · — |
| Tokenizer · Storybook | 112.8 kB (+38 B) · 21.9 kB CSS (+24 B) | 2,680 (0) | — · ✗ · — |
| Badge | 🔴 7.2 kB (+2.8 kB) · 4.1 kB CSS (+32 B) | — | — · — · — |
67 more components
| Component | Size | LoC | Visual · A11y · RTL |
|---|---|---|---|
| CheckboxList | 75.0 kB (+310 B) · 8.1 kB CSS (+24 B) | — | — · ✓ · — |
| CheckboxListItem | 82.2 kB (+302 B) · 12.6 kB CSS (+26 B) | — | — · — · — |
| DateTimeInput | 232.2 kB (+297 B) · 20.6 kB CSS (+30 B) | — | — · — · — |
| NumberInput | 106.4 kB (+296 B) · 13.1 kB CSS (+27 B) | — | — · — · — |
| Pagination | 153.5 kB (+296 B) · 20.1 kB CSS (+25 B) | — | — · — · — |
| Slider | 116.5 kB (+295 B) · 9.2 kB CSS (+26 B) | — | — · — · — |
| FileInput | 77.7 kB (+290 B) · 12.8 kB CSS (+27 B) | — | — · — · — |
| lab/AudioPlayer | 233.6 kB (+316 B) · 1.8 kB CSS (0) | — | — · — · — |
| richtext/RichTextEditorToolbar | 315.4 kB (+316 B) · 454 B CSS (0) | — | — · — · — |
| lab/MediaSeekButton | 223.5 kB (+312 B) · 1.5 kB CSS (0) | — | — · — · — |
| lab/MediaVolume | 223.5 kB (+312 B) · 1.5 kB CSS (0) | — | — · — · — |
| lab/MediaPlayButton | 223.5 kB (+311 B) · 1.5 kB CSS (0) | — | — · — · — |
| lab/MediaCaptionsButton | 223.5 kB (+309 B) · 1.5 kB CSS (0) | — | — · — · — |
| lab/MediaFullscreenButton | 223.5 kB (+309 B) · 1.5 kB CSS (0) | — | — · — · — |
| lab/MediaPlaybackRate | 223.5 kB (+309 B) · 1.5 kB CSS (0) | — | — · — · — |
| lab/MediaTime | 223.5 kB (+309 B) · 1.5 kB CSS (0) | — | — · — · — |
| CheckboxInput | 71.2 kB (+281 B) · 10.6 kB CSS (+27 B) | — | — · — · — |
| Selector | 120.3 kB (+285 B) · 19.7 kB CSS (+23 B) | — | — · ✓ · — |
| Switch · Storybook | 111.3 kB (+283 B) · 10.5 kB CSS (+25 B) | 1,784 (0) | — · ✓ · — |
| lab/EmojiPicker | 121.2 kB (+308 B) · 751 B CSS (0) | — | — · — · — |
| lab/MediaTimeSlider | 223.5 kB (+308 B) · 1.5 kB CSS (0) | — | — · — · — |
| RadioListItem | 78.3 kB (+279 B) · 11.2 kB CSS (+28 B) | — | — · — · — |
| Field | 61.3 kB (+286 B) · 7.6 kB CSS (+20 B) | — | — · ✓ · — |
| RadioList | 62.8 kB (+283 B) · 7.7 kB CSS (+23 B) | — | — · ✓ · — |
| lab/ListInput | 97.4 kB (+306 B) · 922 B CSS (0) | — | — · — · — |
| TimeInput | 180.5 kB (+279 B) · 17.9 kB CSS (+25 B) | — | — · — · — |
| FieldStatus · Storybook | 10.7 kB (+269 B) · 3.7 kB CSS (+34 B) | 165 (+2) | — · ✓ · — |
| TextArea · Storybook | 94.8 kB (+277 B) · 10.0 kB CSS (+26 B) | 509 (0) | — · ✓ · — |
| lab/ChatReactionBar | 129.2 kB (+303 B) · 1.1 kB CSS (0) | — | — · — · — |
| lab/ChatEmojiPicker | 128.0 kB (+302 B) · 773 B CSS (0) | — | — · — · — |
| lab/TransferListSelector | 151.2 kB (+302 B) · 1.4 kB CSS (0) | — | — · — · — |
| TextInput · Storybook | 101.4 kB (+273 B) · 12.8 kB CSS (+27 B) | 416 (0) | — · ✓ · — |
| lab/VideoPlayer | 231.2 kB (+300 B) · 2.1 kB CSS (0) | — | — · — · — |
| ComplexSelector | 83.9 kB (+271 B) · 13.2 kB CSS (+26 B) | — | — · — · — |
| DateInput | 208.3 kB (+264 B) · 18.9 kB CSS (+27 B) | — | — · — · — |
| ListItem | 81.3 kB (+265 B) · 12.6 kB CSS (+26 B) | — | — · — · — |
| lab/TransferList | 139.3 kB (+286 B) · 1.2 kB CSS (0) | — | — · — · — |
| DateRangeInput | 106.3 kB (+257 B) · 14.2 kB CSS (+26 B) | — | — · — · — |
| lab/SelectableCardGroup | 71.7 kB (+280 B) · 162 B CSS (0) | — | — · — · — |
| FieldLabel | 57.1 kB (+244 B) · 6.1 kB CSS (+27 B) | — | — · ✓ · — |
| richtext/RichTextEditor | 311.0 kB (+262 B) · 2.7 kB CSS (0) | — | — · — · — |
| Markdown | 208.6 kB (+182 B) · 23.4 kB CSS (+37 B) | — | — · — · — |
| PowerSearch | 318.2 kB (+114 B) · 27.3 kB CSS (+24 B) | — | — · — · — |
| Typeahead | 94.9 kB (+96 B) · 14.4 kB CSS (+40 B) | — | — · — · — |
| MultiSelector · Storybook | 109.0 kB (+96 B) · 18.9 kB CSS (+25 B) | 2,772 (+4) | — · ✓ · — |
| lab/CommentThread | 381.3 kB (+119 B) · 2.4 kB CSS (0) | — | — · — · — |
| lab/Comments | 388.4 kB (+113 B) · 2.5 kB CSS (0) | — | — · — · — |
| richtext/RichTextView | 287.6 kB (+112 B) · 2.4 kB CSS (0) | — | — · — · — |
| lab/TabBarMoreList | 104.2 kB (+88 B) · 1.8 kB CSS (0) | — | — · — · — |
| InputGroupText | 7.0 kB (+33 B) · 3.9 kB CSS (+34 B) | — | — · — · — |
| lab/CommentComposer | 186.5 kB (+62 B) · 1.9 kB CSS (0) | — | — · — · — |
| Token | 30.1 kB (+11 B) · 5.0 kB CSS (+32 B) | — | — · — · — |
| ChatComposerDrawer | 18.4 kB (+6 B) · 4.8 kB CSS (+35 B) | — | — · — · — |
| ChatTokenizedText | 7.6 kB (+6 B) · 4.1 kB CSS (+31 B) | — | — · — · — |
| ChatComposerInput | 87.8 kB (+9 B) · 12.5 kB CSS (+27 B) | — | — · — · — |
| ChatComposerTokenElement | 87.8 kB (+9 B) · 12.5 kB CSS (+27 B) | — | — · — · — |
| ChatComposer | 90.7 kB (+3 B) · 13.5 kB CSS (+27 B) | — | — · — · — |
| TableCell | 106.3 kB (0) · 20.2 kB CSS (+27 B) | — | — · — · — |
| ContextMenu | 105.1 kB (0) · 19.6 kB CSS (+26 B) | — | — · — · — |
| TableHeaderCell | 106.1 kB (0) · 20.0 kB CSS (+26 B) | — | — · — · — |
| DropdownMenu | 113.2 kB (0) · 19.8 kB CSS (+23 B) | — | — · — · — |
| MoreMenu | 113.4 kB (0) · 19.8 kB CSS (+23 B) | — | — · — · — |
| Table | 124.1 kB (−1 B) · 21.1 kB CSS (+24 B) | — | — · — · — |
| ChatToolCalls | 34.5 kB (−7 B) · 8.8 kB CSS (+25 B) | — | — · — · — |
| FormLayout · Storybook | 6.9 kB (0) · 3.5 kB CSS (0) | 102 (0) | — · ✓ · — |
| SelectorOption | 24.6 kB (0) · 6.8 kB CSS (0) | — | — · — · — |
| lab/DiffViewer | 95.8 kB (−1 B) · 2.1 kB CSS (0) | — | — · — · — |
Package size: @astryxdesign/core 7.92 MB packed (+1.5 kB); no new dependencies.
Wide change (12 components): add ci:run-visual for Visual, ci:run-rtl for RTL.
Accessibility: 2 violation(s)
Accessibility Audit
Status: 2 accessibility violation(s) found — 2 serious.
InputGroup - 1 issue(s)
- 🟠 serious: Ensure the contrast between foreground and background colors meets WCAG 2 AA minimum contrast ratio thresholds
- Rule:
color-contrast· Affects 1/26 stories · Learn more - WCAG: 1.4.3 (Level AA)
- Rule:
Tokenizer - 1 issue(s)
- 🟠 serious: Ensure the contrast between foreground and background colors meets WCAG 2 AA minimum contrast ratio thresholds
- Rule:
color-contrast· Affects 2/32 stories · Learn more - WCAG: 1.4.3 (Level AA)
- Rule:
Generated by PR Enrichment workflow | View full report
There was a problem hiding this comment.
Changes requested: the label, description and status box now read as written under a right-to-left provider, but four issues need fixing first.
- An empty status message now renders an empty
<span dir="ltr">under right-to-left (FieldStatus.tsx:226), which makes the FieldStatus audit count a text line for the empty fixtures and fails the requiredtestcheck; returning nothing for an empty string intextDirectionPropsfixes every caller. - The span is added only when
useDirection()returnsrtl(FieldLabel.tsx:304,Field.tsx:243,FieldStatus.tsx:225), whicharchitecture:internationalizationINV11 rules out, so adir="rtl"region under a left-to-right provider still shows//:Prefix httpswhile a Badge beside it reads correctly; applying the helper on every page, as Badge, Token and InputGroupText do, removes the gate. - With
statusVariant="tooltip"the message reaches the icon tooltip unwrapped (useInputStatusIcon.tsx:229) and still reads//:Prefix https, although FR10 and the changeset promise the fix for the status message; wrap it too or narrow both texts. - The read-and-wrap logic is copied into
FieldLabel.tsx,Field.tsxandFieldStatus.tsxbeside InputGroupText's own wrap; one wrap helper inutils/textDirection.tsthat each site calls keeps later fixes in one place.
Please add tests for the empty message, a DOM-only right-to-left region and the tooltip placement.
|
/revoke-spec d8fe0d9 |
…t, Badge and Token do The direction span no longer depends on the provider's direction. Plain caller text with no right-to-left letter gets the inner dir="ltr" span on every page: it is inert on a left-to-right page and keeps the written order under any right-to-left region, including a page that sets dir="rtl" without the provider. Tests that found a label, description or status by its text now take the element around the span.
|
/approve-spec e99387f |
There was a problem hiding this comment.
Changes requested: the label, description and status box now keep their written order on right-to-left pages, and FR10 is approved for this head, but five issues need fixing first.
- The inner span renders on every page, so
RichTextEditor.test.tsx:410(which takesgetByText('Notes')as the label) fails in the requiredtest-uijob; take.parentElementthere as the updated core tests do. - FR10 and the changeset promise the status message, but with
statusVariant="tooltip"the message reaches the icon tooltip unwrapped (hooks/useInputStatusIcon.tsx:229), so it still reorders; wrap it the same way and add a test, or narrow FR10 and the changeset to the message box with a new approval. - The read-and-wrap is copied into
FieldLabel.tsx(twice),Field.tsxandFieldStatus.tsxbeside the oneInputGroupText.tsxalready has, and the copies already differ on empty text; move it into one helper inutils/textDirection.tsthat all five sites call. - The changeset says left-to-right pages are unchanged, but the span changes what a text query returns on every page, and the description's suite list leaves out richtext, which fails; reword both.
- Miss: the Field record still says it makes no DOM change (
Field.spec.md:48and:61), while FR10 adds the inner span; update both lines.
The empty-message audit failure and the provider-direction gate from the earlier review stay fixed. The theme-palette.test.mjs timeout in test-node is in a CLI test this change does not reach.
Claims and files checked
- Claim: plain text with weak characters used to reorder on right-to-left pages in every Field-based input, InputGroup included — verified (the base renders the text directly;
InputGroup.tsxrenders Field). - Claim: such text now lays out left to right in the label, description and status box — verified (
FieldLabel.tsx:302-307,:386-390,Field.tsx:324-328,FieldStatus.tsx:225-227; the browser-spec jobs pass). - Claim: text with a right-to-left letter keeps the page direction — verified (
utils/textDirection.ts:29;Field.test.tsx:868-875). - Claim: on a left-to-right page nothing visible changes, and there is no API change — verified (only rendered children change; an ltr span on an ltr page lays out the same).
- Claim: the same helper already covers InputGroupText, Badge and Token — verified (
InputGroupText.tsx:103,Badge.tsx:274,Token.tsx:356). - Claim: the span sits inside the existing element, so alignment, marker and status glyph follow the page — verified (
FieldLabel.tsx:307-313,FieldStatus.tsx:246-263). - Claim: the span depends only on the text, on every page, including a bare right-to-left region — verified (
Field.test.tsx:813-825,:844-859). - Claim: an empty label or status message gets no span — verified (
FieldLabel.tsx:302,FieldStatus.tsx:227;Field.test.tsx:861-866). - Claim: about 30 existing tests now take the element around the span, a test-only change — count verified (31 query sites in 11 core test files); consumer suites meet the same change (finding above).
- Claim: the accessible name and description do not change — verified (
Field.test.tsx:830-831,:856-858). - Claim: the first new unit case fails on main — verified by reading the base, which renders the label text with no span.
- Claim: a new Field story feeds the shared mixed-direction browser spec — verified (story and spec rows added; the browser-spec jobs pass).
- Claim: every component folder that renders Field passes its suites — false (
RichTextEditor.test.tsx:410fails). - Claim: typecheck and lint pass — verified (CI typecheck and lint pass).
- Claim: right-to-left output at this head matches the earlier stills, and left-to-right stills are identical — consistent with the code (the earlier commit wrapped the same non-empty texts under right-to-left).
- Claim: the record change is FR10, its verification row and one verified-by path — verified.
- Changeset: the label, description and status message keep their written order — partly false (the tooltip placement's message).
- Changeset: such text used to reorder and now sits in an inner span; text with a right-to-left letter keeps the page direction; alignment, marker, icon, name and description do not change — verified (as above).
- Changeset: left-to-right pages are unchanged — false (the markup changes on every page).
.changeset/field-mixed-direction-text.md— finding (left-to-right and status-message claims).apps/storybook/stories/Field.stories.tsx— clear.docs/specs/components/Field/Field.spec.md— finding (FR10 names a tooltip message the code does not wrap; compatibility lines say no DOM change).packages/core/src/Field/Field.tsx— finding (copied wrap).packages/core/src/Field/FieldLabel.tsx— finding (copied wrap; the span on every page breaks the RichTextEditor test).packages/core/src/FieldStatus/FieldStatus.tsx— finding (copied wrap).packages/core/src/Field/Field.test.tsx— clear.packages/core/src/__tests__/MixedDirectionText.a11y.chromium.spec.ts— clear.CheckboxInput,CheckboxList,CheckboxList.required,FormLayout,InputGroup,RadioList,Switch,TextArea,TextInputandTokenizerBottomSheettest files — clear (text queries updated for the span).
… tooltip keeps written order withTextDirection in utils/textDirection.ts puts plain left-to-right text in an inner dir="ltr" span and leaves an empty string alone. FieldLabel, Field's horizontal description, FieldStatus, InputGroupText and the status tooltip of statusVariant="tooltip" call it, so the rule lives in one place. The Field record and the changeset now say the span changes the markup on every page while nothing visible changes. RichTextEditor's label test takes the element around the span.
There was a problem hiding this comment.
Approved pending CI: CI has not run on this head yet, because the pull request is still a draft, and the required checks need to pass once it is ready for review. The right-to-left fix holds at this head, its tests pass, and an engineering owner approved the record changes for this exact head. The two description statements flagged in the last review, the suite counts and the list of what the newest merge of main changes, now match this head.
Non-blocking:
- The FR10 verification row in
Field.spec.mdcould also name the Selector and MultiSelector tooltip cases and the two wrapped-label browser cases, so a change that drops one shows up against FR10. - MultiSelector AR1's gap sentence and its popover-gap verification row state work order ("waits for", "fails until"); the observable gap alone is enough.
Claims and files checked
Review mode: same-head; reason: none
- Rules changed since the last review: changed rules (0).
- Claim, verified: on a right-to-left page plain Latin label, description and status text used to reorder, and now reads as written in every Field-based input, InputGroup included.
- Claim, verified: text with a right-to-left letter keeps the page's direction, left-to-right pages look the same, and no public API changes.
- Claim, verified: the existing text-direction helper already served InputGroupText, Badge and Token; the new wrapper is used by the label, both description layouts, the status box, InputGroupText and the three status tooltips.
- Claim, verified: the span depends only on the text, never on a direction read, and empty text gets none.
- Claim, verified: the span takes its parent's alignment with both the standard and the prefixed keyword; the WebKit behaviour is stated as not run.
- Claim, verified: the searchable bottom sheet names its listbox by the label, the required state stays on the trigger, and the popover is unchanged and recorded as a gap.
- Claim, verified: 22 existing tests now read the element around the span (21 in core, one in the rich-text editor), and accessible names and descriptions are unchanged.
- Claim, verified: the unit, tooltip, listbox-name, wrapped-label, searchable-sheet and real-layout tests exist as described and fail before the fix where the description says so.
- Claim, verified: at this head the named suites run 1,107 tests in 48 files and 284 tests in 5 files, all passing, and core type checking and the knowledge check pass; the CheckboxInput test file is unchanged from main.
- Claim, verified: the newest merge of main changes six of this pull request's files and brings the five listed changes, the earlier merges change only the files named, and Field, FieldLabel and FieldStatus are unchanged since the previous head; no captured still shows a selector or an open list.
- Claim, stated for earlier runs and not rerun: the wider 174-file run, the 194-test run, the earlier lint run and the Chrome stills with their byte-identity statements.
- Claim, verified: the records-changed list, the writing-rubric results, the hidden-label section and the scope.
- Changeset, verified: every sentence, including the span on left-to-right pages and the hidden-label exception.
- Files, clear: the changeset, the Field story, the internationalization record, the text-direction helper and its test, Field, FieldLabel, FieldStatus, InputGroupText, the status-icon hook, Selector, MultiSelector, the browser spec, and the Field, FieldLabel, MultiSelector, Selector, TextInput, CheckboxList (two files), FormLayout, InputGroup, RadioList, Switch, TextArea, TokenizerBottomSheet and rich-text editor tests.
- Files, non-blocking note: the Field record (its FR10 verification row) and the MultiSelector record (its AR1 gap wording).
# Conflicts: # docs/specs/components/MultiSelector/MultiSelector.spec.md
|
/approve-spec 53be7ac |
There was a problem hiding this comment.
Changes requested: the right-to-left fix itself holds at this head and an engineering owner approved the record changes for this exact head, but the newest merge of main leaves one failing test and two out-of-date description statements.
- Regression:
FieldLabel.test.tsx:45, in the "draws the label in the primary text colour and its description in the secondary" test that the merge brings in, now gets the innerdir="ltr"span fromgetByText('We never share it')and fails (expectedvar(--color-text-secondary), receivednull), so read.parentElementthere as the other 22 edited tests do. - Regression: the description's Verification bullet still calls an earlier head "this head, after the latest merge of main" with 1,107 tests in 48 files and 284 in 5 all passing, and its stills bullet leaves out the newest merge, which changes
FieldLabel.tsx,MultiSelector.tsx,Selector.tsx,MultiSelector.spec.md,internationalization.mdand six of this pull request's test files, so please restate both bullets for the current head.
The two non-blocking notes on the FR10 verification row and on MultiSelector AR1's gap wording still apply. CI has not run on this draft head yet.
Claims and files checked
Review mode: same-head; reason: none
- Claim, verified: on a right-to-left page, plain Latin label, description and status text used to reorder and now reads as written in every Field-based input.
- Claim, verified: text with a right-to-left letter keeps the page's direction, left-to-right pages render pixel-identical, and no public API changes.
- Claim, verified: the existing text-direction helper already served the input-group text, badge and token; the new wrapper is used by the label, both description layouts, the status box, the input-group text and the three status tooltips.
- Claim, verified: the span depends only on the text, never on a direction read, and empty text gets none.
- Claim, verified: the span takes its parent's alignment with the standard and the prefixed keyword, so wrapped and centred labels keep their line positions; the WebKit behaviour is stated as not run.
- Claim, verified: the searchable bottom sheet names its listbox by the label, the required state stays on the trigger, and the popover is unchanged and recorded as a gap.
- Claim, verified: 22 existing tests now read the element around the span (21 in core, one in the rich-text editor), and accessible names and descriptions are unchanged.
- Claim, verified: the unit, tooltip and searchable-sheet tests fail before the fix and pass after it.
- Claim, verified: the listbox-name tests and the wrapped-label browser checks exist as described.
- Claim, stated for earlier heads and not rerun: the wider 174-file run, the 194-test run, the type, lint and knowledge checks, and the Chrome stills with their byte-identity statements.
- Claim, false: the named suites "at this head, after the latest merge of main" run 1,107 tests in 48 files and 284 in 5, all passing; at this head they run 1,140 in 54 with one failure, and 290 in 7.
- Claim, false: the list of what later merges of main change, and the statement that the label component is unchanged since an earlier head, leave out the newest merge.
- Claim, verified: the checkbox-input test is unchanged from main.
- Claim, verified: the records-changed list, the writing-rubric results, the hidden-label section and the scope.
- Changeset, verified: every sentence, including the span on left-to-right pages and the hidden-label exception.
- Files, clear: the changeset, the Field story, the internationalization record, the text-direction helper and its test, Field, FieldLabel, FieldStatus, InputGroupText, the status-icon hook, Selector, MultiSelector, the browser spec, and the Field, MultiSelector, Selector, TextInput, CheckboxList (two files), FormLayout, InputGroup, RadioList, Switch, TextArea, TokenizerBottomSheet and rich-text editor tests.
- Files, finding: the FieldLabel test file (the merged colour test fails with the span); the Field record (FR10 verification row, non-blocking); the MultiSelector record (AR1 gap wording, non-blocking).
… the direction span; name the status-tooltip and wrapped-label cases under FR10
|
/approve-spec d9958d0 |
There was a problem hiding this comment.
Changes requested: the right-to-left fix holds at this head and an engineering owner approved the record changes for it, but two sentences in the description are still false.
- The description says 22 existing tests (21 in core) now read the element around the new span, but this head also edits the label-colour test in
FieldLabel.test.tsx, so the count is 23 (22 in core). - The stills bullet says stills of this head follow, but the only table after it is an earlier head's set (wrapped label, centred label and tooltip), so please add stills of this head or drop that clause.
The code, the records and the changed unit tests check out at this head, and CI has not run on this draft head yet.
Claims and files checked
Review mode: same-head; reason: none
- Claim, verified: on a right-to-left page, plain Latin label, description and status text used to reorder and now reads as written in every Field-based input (Field Mixed Direction story frames;
Field.test.tsxright-to-left cases). - Claim, verified: text with a right-to-left letter keeps the page's direction, left-to-right pages show no visible change, and no public API changes (
Field.test.tsxpage-direction case; byte-identical left-to-right frames; no export changes). - Claim, verified: the existing text-direction helper already served the input-group text, badge and token (
Badge.tsx:30,Token.tsx:50). - Claim, verified: the label, both description layouts and the status box put plain text in an inner span inside their existing element (
FieldLabel.tsx:309-312,Field.tsx:322,FieldStatus.tsx:224). - Claim, verified: the span depends only on the text, and empty text gets none (
textDirection.ts:53-58; the empty-status case inField.test.tsx). - Claim, verified: one helper serves the label, descriptions, status box, input-group text and the three status tooltips, and the internationalization record names it (
InputGroupText.tsx:114,useInputStatusIcon.tsx:230,Selector.tsx:2516,MultiSelector.tsx:2858; the INV11 sentence). - Claim, verified: the span takes its parent's alignment with the standard and the prefixed keyword, and WebKit is stated as not run (
textDirection.ts:42). - Claim, verified: the searchable bottom sheet names its listbox by the label, the required state stays on the control, and the popover is unchanged and recorded as a gap (
MultiSelector.tsx:2480-2483; the listbox-name and required cases inMultiSelector.test.tsx; the AR1 gap line). - Claim, false: 22 existing tests (21 in core) now read the element around the span; at this head there are 23 (22 in core).
- Claim, verified: accessible names and descriptions are unchanged (the accessible-name and description assertions in the new unit cases).
- Claim, verified: the unit, tooltip, listbox-name, searchable-sheet and wrapped-label tests exist as described, and the red-first ones fail before the fix.
- Claim, verified: at this head the label and multi-selector test files pass 268 of 268, and the knowledge check passes.
- Claim, stated for earlier heads and not rerun: the wider suite counts, the type and lint checks, and the Chrome stills with their byte-identity statements.
- Claim, verified: the checkbox-input test is unchanged from main.
- Claim, verified: the list of this pull request's files that the latest merge of main changes.
- Claim, false: stills of this head follow the stills bullet; only an earlier head's stills do.
- Claim, verified: the records-changed list, the writing-rubric results, the hidden-label section and the scope.
- Changeset, verified: every sentence, including the span on left-to-right pages, the status tooltip and the hidden-label exception.
- Files, clear: the changeset, the Field story, the internationalization, Field and MultiSelector records, the text-direction helper and its test, Field, FieldLabel, FieldStatus, InputGroupText, the status-icon hook, Selector, MultiSelector, the mixed-direction browser spec, and the Field, FieldLabel, MultiSelector, Selector, TextInput, CheckboxList (two files), FormLayout, InputGroup, RadioList, Switch, TextArea, TokenizerBottomSheet and rich-text editor tests.
- Files, finding: none; both findings are in the pull request description.
There was a problem hiding this comment.
Approved pending CI: CI has not run on this draft head yet. A Field's plain Latin label, description, status message and status tooltip now keep their written order on right-to-left pages, an engineering owner approved the record changes for this head, and the two description sentences flagged last time now match the code.
CI runs once the pull request leaves draft, and the merge guard needs it green before merge.
Claims and files checked
Review mode: same-head; reason: none
- Claim, verified: on a right-to-left page, plain Latin label, description and status text used to reorder and now reads as written in every Field-based input, input groups included (Mixed Direction story frames at 1280 and 390 px;
Field.test.tsxright-to-left cases). - Claim, verified: text with a right-to-left letter keeps the page's direction, left-to-right pages show no visible change, and no public API changes (the Arabic rows match on both sides; the left-to-right frame is byte-identical; no export changes).
- Claim, verified: the existing text-direction helper already served the input-group text, badge and token (
Badge.tsx:282,Token.tsx:364,InputGroupText.tsx:114). - Claim, verified: the label, both description layouts and the status box put plain text in an inner span inside their existing element, so alignment, marker and glyph still follow the page (
FieldLabel.tsx:309-312,Field.tsx:322,FieldStatus.tsx:224; frames). - Claim, verified: the span depends only on the text and empty text gets none (
textDirection.ts:53-58; the empty-status case inField.test.tsx). - Claim, verified: one helper serves the label, descriptions, status box, input-group text and the three status tooltips, and the internationalization record names it (
useInputStatusIcon.tsx:230,Selector.tsx:2516,MultiSelector.tsx:2858; the INV11 sentence). - Claim, verified: the span takes its parent's alignment with the standard and the prefixed keyword, and WebKit is stated as not run (
textDirection.ts:42; the wrapping label in the 390 px frame). - Claim, verified: the searchable bottom sheet names its listbox by the label, the required state stays on the control, and the popover is unchanged and recorded as a gap (
MultiSelector.tsx:2480-2483; the listbox-name and required cases; the AR1 gap line). - Claim, verified: 23 existing tests, 22 in core including the label-colour test plus the rich-text editor's label test, now read the element around the span (enumerated per file).
- Claim, verified: accessible names and descriptions are unchanged (the accessible-name and description assertions in the new unit cases).
- Claim, verified: the unit, tooltip, listbox-name, searchable-sheet and wrapped-label tests exist as described, and the red-first ones fail before the fix.
- Claim, verified: at this head the label and multi-selector test files pass 268 of 268, and the knowledge check passes.
- Claim, stated for earlier heads and not rerun: the wider suite counts, the type and lint checks, and the earlier Chrome stills with their byte-identity statements.
- Claim, verified in substance: the separately linked stills of this head show the label, description and status reading as written under right-to-left where the base reorders them, with left-to-right unchanged (this review's own frames; the linked stills were not opened).
- Claim, verified: the checkbox-input test is unchanged from the base.
- Claim, verified: the list of this pull request's files that the latest merge of main changes.
- Claim, verified: the records-changed list, the writing-rubric results, the hidden-label section and the scope.
- Changeset, verified: every sentence, including the span on left-to-right pages, the status tooltip and the hidden-label exception.
- Files, clear: the changeset, the Field story, the internationalization, Field and MultiSelector records, the text-direction helper and its test, Field, FieldLabel, FieldStatus, InputGroupText, the status-icon hook, Selector, MultiSelector, the mixed-direction browser spec, and the Field, FieldLabel, MultiSelector, Selector, TextInput, CheckboxList (two files), FormLayout, InputGroup, RadioList, Switch, TextArea, TokenizerBottomSheet and rich-text editor tests.
- Files, finding: none.
|
/approve-spec f113200 |
There was a problem hiding this comment.
Approved. A Field's plain Latin label, description, status message and status tooltip keep their written order on right-to-left pages, an engineering owner approved the record changes for this exact head, and CI passed on it, including the real-layout browser checks for the label, description, status and wrapped label.
Nothing else is needed from the author.
Claims and files checked
Review mode: same-head; reason: none
- changed rules (0): none
- Claim, verified: on a right-to-left page, plain Latin label, description and status text used to reorder and now reads as written in every Field-based input, input groups included (Mixed Direction story frames at 1280 and 390 px; the right-to-left cases in
Field.test.tsx). - Claim, verified: text with a right-to-left letter keeps the page's direction, left-to-right pages show no visible change, and no public API changes (the Arabic rows get no span; the left-to-right frame is pixel-identical; no export changes).
- Claim, verified: the existing text-direction helper already served the input-group text, badge and token (
Badge.tsx:282,Token.tsx:364,InputGroupText.tsx:114). - Claim, verified: the label, both description layouts and the status box put plain text in an inner span inside their existing element, so alignment, marker and glyph still follow the page (
FieldLabel.tsx:309-312,Field.tsx:322,FieldStatus.tsx:224; frames). - Claim, verified: the span depends only on the text, works in a right-to-left region without the provider, and empty text gets none (
textDirection.ts:53-58; the unit cases render a plain right-to-left region; the empty-status case). - Claim, verified: one helper serves the label, descriptions, status box, input-group text and the three status tooltips, and the internationalization record names it (
useInputStatusIcon.tsx:230,Selector.tsx:2516,MultiSelector.tsx:2858; the INV11 sentence). - Claim, verified: the span takes its parent's alignment with the standard and the prefixed keyword, and WebKit is stated as not run (
textDirection.ts:42; the span resolves to right under right-to-left and left under left-to-right). - Claim, verified: the searchable bottom sheet names its listbox by the label, the required state stays on the control, and the popover is unchanged and recorded as a gap (
MultiSelector.tsx:2480-2483; the listbox-name and required cases; the AR1 gap line). - Claim, verified: 23 existing tests, 22 in core including the label-colour test plus the rich-text editor's label test, now read the element around the span (counted per file).
- Claim, verified: accessible names and descriptions are unchanged (the accessible-name and description assertions in the new unit cases).
- Claim, verified: the unit, tooltip, listbox-name, searchable-sheet, wrapped-label and real-layout tests exist as described and pass on this head (the real-layout and wrapped-label cases in CI's browser run); their red-first failures on the base were shown on the same code and were not rerun.
- Claim, verified in substance: the label and multi-selector test files pass 268 of 268 and the knowledge check passes; the sentence names the previous commit as this head, and the count also holds here, where the only later change is a type assertion in one test.
- Claim, not checkable against the code: the author's full pre-merge check before leaving draft; CI passed on this head.
- Claim, stated for earlier heads and not rerun: the wider suite counts and the earlier Chrome stills with their byte-identity statements; the frames taken at this head match what they describe.
- Claim, verified: the list of this pull request's files that each merge of main changes, and that the Field, label and status sources were unchanged by the earlier merge.
- Claim, verified: the checkbox-input test is unchanged from the base.
- Claim, verified: the records-changed list, the writing-rubric results, the hidden-label section, the scope and the land path.
- Changeset, verified: every sentence, including the span on left-to-right pages, the status tooltip and the hidden-label exception.
- Files, clear: the changeset, the Field story, the internationalization, Field and MultiSelector records, the text-direction helper and its test, Field, FieldLabel, FieldStatus, InputGroupText, the status-icon hook, Selector, MultiSelector, the mixed-direction browser spec, and the Field, FieldLabel, MultiSelector, Selector, TextInput, CheckboxList (two files), FormLayout, InputGroup, RadioList, Switch, TextArea, TokenizerBottomSheet and rich-text editor tests.
- Files, finding: none.
rubyycheung
left a comment
There was a problem hiding this comment.
Design approved. I compared the supplied before-and-after phone screenshots: https:// and +3 keep their written order on a right-to-left page, while the field layout and mixed-direction text stay in place. This fixes readability without changing the layout.
|
/approve-spec db79aa8 |
There was a problem hiding this comment.
Approved pending CI: CI has not run on this head yet, because the pull request is still a draft; it runs once the pull request is marked ready for review.
A Field's plain Latin label, description, status message and status tooltip keep their written order on right-to-left pages. The newest commit only merges main, an engineering owner approved the record changes for this exact head, and the unit tests of every Field-based input pass on it.
Nothing else is needed from the author.
Claims and files checked
Review mode: incremental; reason: none
- changed rules (0): none
- Claim, verified: on a right-to-left page, plain Latin label, description and status text used to reorder and now reads as written in every Field-based input, input groups included (Mixed Direction story frames at 1280 and 390 px; the right-to-left cases in
Field.test.tsx). - Claim, verified: text with a right-to-left letter keeps the page's direction, left-to-right pages show no visible change, and no public API changes (the Arabic rows get no span; the left-to-right frame is pixel-identical; no export changes).
- Claim, verified: the existing text-direction helper already served the input-group text, badge and token (
Badge.tsx:282,Token.tsx:364,InputGroupText.tsx:114). - Claim, verified: the label, both description layouts and the status box put plain text in an inner span inside their existing element, so alignment, marker and glyph still follow the page (
FieldLabel.tsx:309-312,Field.tsx:322,FieldStatus.tsx:224; frames). - Claim, verified: the span depends only on the text, works in a right-to-left region without the provider, and empty text gets none (
textDirection.ts:53-58; the unit cases render a plain right-to-left region; the empty-status case). - Claim, verified: one helper serves the label, descriptions, status box, input-group text and the three status tooltips, and the internationalization record names it (
useInputStatusIcon.tsx:230,Selector.tsx:2516,MultiSelector.tsx:2858; the INV11 sentence). - Claim, verified: the span takes its parent's alignment with the standard and the prefixed keyword, and WebKit is stated as not run (
textDirection.ts:42; on this head the wrapped label's lines meet the page's start edge in both directions and stay centred in a centred container). - Claim, verified: the searchable bottom sheet names its listbox by the label, the required state stays on the control, and the popover is unchanged and recorded as a gap (
MultiSelector.tsx:2480-2483; the listbox-name and required cases; the AR1 gap line). - Claim, verified: 23 existing tests, 22 in core including the label-colour test plus the rich-text editor's label test, now read the element around the span (counted per file).
- Claim, verified: accessible names and descriptions are unchanged (the accessible-name and description assertions in the new unit cases).
- Claim, verified: the unit, tooltip, listbox-name and searchable-sheet tests exist as described and pass on this head; the wrapped-label and real-layout browser cases passed in CI on the previous head with the same patch, and a layout probe on this head reproduces the wrapped-label checks; their red-first failures on the base were not rerun.
- Claim, verified in substance: the label and multi-selector test files pass 268 of 268 and the knowledge check passes; the sentence names an earlier commit, and both hold on this head when rerun.
- Claim, not checkable against the code: the author's full pre-merge check before leaving draft; CI has not run on this draft head.
- Claim, stated for earlier heads and not rerun: the wider suite counts and the earlier Chrome stills with their byte-identity statements; on this head every Field-based input's unit tests pass and the frames match what the stills describe.
- Claim, verified: the list of this pull request's files that each merge of main changes; the newest merge changes none of them.
- Claim, verified: the checkbox-input test is unchanged from the base.
- Claim, verified: the records-changed list, the writing-rubric results, the hidden-label section, the scope and the land path.
- Changeset, verified: every sentence, including the span on left-to-right pages, the status tooltip and the hidden-label exception.
- Files, clear: the changeset, the Field story, the internationalization, Field and MultiSelector records, the text-direction helper and its test, Field, FieldLabel, FieldStatus, InputGroupText, the status-icon hook, Selector, MultiSelector, the mixed-direction browser spec, and the Field, FieldLabel, MultiSelector, Selector, TextInput, CheckboxList (two files), FormLayout, InputGroup, RadioList, Switch, TextArea, TokenizerBottomSheet and rich-text editor tests.
- Files, finding: none.
|
/approve-spec 3450d89 |
There was a problem hiding this comment.
Changes requested for two sentences of the description; the right-to-left fix itself checks out. A Field's plain Latin label, description, status message and status tooltip keep their written order on right-to-left pages, left-to-right pages are pixel-identical, and an engineering owner approved the Field, MultiSelector and internationalization record text for this head.
- Regression: the Suites bullet says
FieldLabel.test.tsxandMultiSelector.test.tsxpass 268 of 268 "at this head", but the newest merge ofmainadds three MultiSelector list-format tests (#13132), so they now run 271; scope the 268 to the earlier head, or give 271 of 271. - Regression: the stills bullet accounts for what each merge of
mainchanges among this pull request's files but leaves out the newest one, which changesMultiSelector.tsxandMultiSelector.test.tsx(#13132) andinternationalization.md(#13131); add a sentence for it, noting that no captured state shows a MultiSelector trigger.
Non-blocking miss: the Scope section could also name the component:MultiSelector record, whose AR1 this pull request adds. CI has not run on this draft head yet.
Claims and files checked
Review mode: same-head; reason: none
- Today plain Latin label, description and status text reorders under right-to-left in every Field-based input, InputGroup included: verified (base frames of the Mixed Direction story; the new
Field.test.tsxright-to-left case fails on the base). - After the change, text with no right-to-left letter reads as written: verified (head frames;
Field.test.tsxandFieldLabel.test.tsxright-to-left cases). - Text with a right-to-left letter keeps the page's direction: verified (
Field.test.tsx"keeps the page direction for text with a right-to-left letter"; the Arabic rows are unchanged in the frames). - Left-to-right pages show no visible change, and no API changes: verified (byte-identical left-to-right frame; the API generator lists no added, changed or removed row).
- InputGroupText, Badge and Token already follow the same rule through the internal helper: verified (
InputGroupText.tsx:114,Badge.tsx:282,Token.tsx:364). - The span sits inside the existing element, so alignment, the marker and the status glyph follow the page: verified (
FieldLabel.tsx:309-312,FieldStatus.tsx:224and:259; wrapped-label probe). - No direction is read, it works under any right-to-left region without the provider, and empty text gets no span: verified (
textDirection.ts:53-58; the tests use a plaindir="rtl"region; "adds no span to an empty status message"). - One helper serves the label, both descriptions, the status box, InputGroupText and the three status tooltips, and INV11 names it: verified (
Field.tsx:322,useInputStatusIcon.tsx:230,Selector.tsx:2516,MultiSelector.tsx:2867;internationalization.md:332-335). - Wrapped lines keep the container's alignment, and Chromium supports only the prefixed keyword: verified (lines meet the label's start edge under both directions and stay centred in a centred container; Chromium reports
match-parentunsupported and-webkit-match-parentsupported); WebKit not run, as the description says. - MultiSelector's searchable sheet names its listbox by the label alone, the popover is unchanged, and the required state stays on the control: verified (
MultiSelector.tsx:2489-2492; the AR1 cases inMultiSelector.test.tsx). - 23 existing tests that read text now take the element around the span, 22 of them in core: verified (counted in the diff).
- Accessible names and descriptions are unchanged: verified (
Field.test.tsxandTextInput.test.tsxname and description assertions). - The new unit, tooltip and searchable-sheet cases fail before the fix: verified (each fails on the base with this head's tests).
- The browser spec covers the Field label, description and status and the two wrapped-label cases: verified (
MixedDirectionText.a11y.chromium.spec.ts, the Field surfaces and the two wrapped-label tests). - Core typecheck, ESLint and the knowledge check pass: verified at this head.
- At this head the FieldLabel and MultiSelector tests pass 268 of 268: false (271 of 271 at this head).
- The stills bullet's account of what the merges of
mainchange among this pull request's files: false (it leaves out the newest merge's MultiSelector and internationalization changes). - Measurements and stills stated for named earlier heads: historical, not re-measured; the frames taken at this head match their conclusions.
- Records changed and the writing rubric: verified against the three record diffs.
- A visually hidden label and its description keep their text with no span, as FR10 and the changeset state: verified (
FieldLabel.tsx:309-312,Field.tsx:313-316; the hidden-label case inFieldLabel.test.tsx). - Scope section: verified except that it leaves out the MultiSelector record (non-blocking).
- Changeset: right-to-left order is kept for the label, description, status message and tooltip; text with a right-to-left letter, alignment, marker, icon, name and description are unchanged; the span also renders on left-to-right pages and changes what text queries return; hidden labels keep their text: verified (as above).
.changeset/field-mixed-direction-text.md: clearapps/storybook/stories/Field.stories.tsx: cleardocs/architecture/internationalization.md: cleardocs/specs/components/Field/Field.spec.md: cleardocs/specs/components/MultiSelector/MultiSelector.spec.md: clearpackages/core/src/utils/textDirection.tsandtextDirection.test.ts: clearpackages/core/src/Field/Field.tsx,FieldLabel.tsx,Field.test.tsx,FieldLabel.test.tsx: clearpackages/core/src/FieldStatus/FieldStatus.tsx: clearpackages/core/src/InputGroup/InputGroupText.tsxandInputGroup.test.tsx: clearpackages/core/src/hooks/useInputStatusIcon.tsx: clearpackages/core/src/Selector/Selector.tsxandSelector.test.tsx: clearpackages/core/src/MultiSelector/MultiSelector.tsxandMultiSelector.test.tsx: clear, including what the merge ofmainbrings inpackages/core/src/TextInput/TextInput.test.tsx,TextArea/TextArea.test.tsx,Switch/Switch.test.tsx,RadioList/RadioList.test.tsx,FormLayout/FormLayout.test.tsx: clearpackages/core/src/CheckboxList/CheckboxList.test.tsxandCheckboxList.required.test.tsx: clearpackages/core/src/Tokenizer/TokenizerBottomSheet.test.tsx: clearpackages/core/src/__tests__/MixedDirectionText.a11y.chromium.spec.ts: clearpackages/richtext/src/RichTextEditor.test.tsx: clear
There was a problem hiding this comment.
Approved pending CI: CI has not run on this head yet, because the pull request is still a draft; it runs once the pull request is marked ready for review.
A Field's plain Latin label, description, status message and status tooltip now keep their written order on right-to-left pages, left-to-right pages stay pixel-identical, and an engineering owner approved the Field, MultiSelector and internationalization record text for this exact head. The two description sentences flagged last time now match the head: the Suites bullet gives this head's run, which reproduces, and the stills bullet covers the newest merge of main.
Claims and files checked
Review mode: same-head; reason: none
- Today plain Latin label, description and status text reorders on right-to-left pages in every Field-based input, InputGroup included: verified (base frames of the Mixed Direction story; the new right-to-left Field test fails on the base).
- After the change, text with no right-to-left letter reads as written: verified (head frames; the Field and FieldLabel right-to-left tests).
- Text with a right-to-left letter keeps the page's direction: verified (the Field test for it; the Arabic rows are unchanged in the frames).
- Left-to-right pages show no visible change, and no API changes: verified (the left-to-right frame is pixel-identical; no export, prop, type, theme target or data attribute changes).
- InputGroupText, Badge and Token already follow the same rule through the internal helper: verified (
InputGroupText.tsx:114,Badge.tsx:282,Token.tsx:364). - The span sits inside the existing element, so alignment, the marker and the status glyph follow the page: verified (
FieldLabel.tsx:309-312,FieldStatus.tsx:224and:259; the 390 px frames). - No direction is read, it works under any right-to-left region without the provider, and empty text gets no span: verified (
textDirection.ts:53-58; the tests use a plain right-to-left region; the empty-status test). - One helper serves the label, both descriptions, the status box, InputGroupText and the three status tooltips, and INV11 names it: verified (
Field.tsx:322,useInputStatusIcon.tsx:230,Selector.tsx:2516,MultiSelector.tsx:2867; the INV11 sentence ininternationalization.md). - Wrapped lines keep the container's alignment, and Chromium supports only the prefixed keyword: verified in Chromium (both wrapped-label browser tests pass); WebKit not run, as the description says.
- MultiSelector's searchable sheet names its listbox by the label alone, the popover is unchanged, and the required state stays on the control: verified (
MultiSelector.tsx:2489-2491; the listbox-name tests, which fail on the base with search on). - 23 existing tests that read text now take the element around the span, 22 of them in core: verified (counted in the diff).
- Accessible names and descriptions are unchanged: verified (the name and description assertions in the Field and TextInput tests).
- The new unit, tooltip and searchable-sheet tests fail before the fix: verified (eight new behavior tests fail on the base with this head's tests).
- The browser spec covers the Field label, description and status and the two wrapped-label cases: verified (it passes 16 of 16 in Chromium).
- Core typecheck, ESLint and the knowledge check pass: verified (core typecheck, ESLint on the changed files and the knowledge check pass here; ESLint reports only warnings).
- At this head the ten named suites pass 3,406 of 3,406: verified (reproduced; the Field and Token suites include FieldStatus and Tokenizer by name).
- At this head the Chromium accessibility and interaction specs pass: verified for the specs that cover the changed components (38 of 38 accessibility and 27 of 27 Chromium interaction tests); the description does not list which files make up its 29 and 12, so those totals were not matched.
- The earlier full Field-family run (5,332 tests in 174 files), the Field and FieldStatus count after the empty-text fix, and the counts and stills stated for named earlier heads: historical runs, not re-measured; every suite run here passes, and the frames taken at this head match the stills' conclusions.
- The newest merge of
mainchangesMultiSelector.tsx,MultiSelector.test.tsxandinternationalization.mdamong this pull request's files: verified (exactly those three, from the locale list-format and PowerSearch locale changes; no conflict resolution). - No captured state shows a MultiSelector trigger, and the trigger is unchanged: verified from the code (this pull request's MultiSelector change touches only the listbox name and the status tooltip); the linked outside take was not read.
- Records changed and the writing rubric: verified against the three record diffs.
- A visually hidden label and its description keep their text with no span: verified (
FieldLabel.tsx:309-312,Field.tsx:313-316; the hidden-label test). - Scope section, now including the MultiSelector record: verified.
- Changeset: right-to-left order is kept for the label, description, status message and tooltip; text with a right-to-left letter, alignment, marker, icon, name and description are unchanged; the span also renders on left-to-right pages and changes what text queries return; hidden labels keep their text: verified (as above).
.changeset/field-mixed-direction-text.md: clearapps/storybook/stories/Field.stories.tsx: cleardocs/architecture/internationalization.md: cleardocs/specs/components/Field/Field.spec.md: cleardocs/specs/components/MultiSelector/MultiSelector.spec.md: clearpackages/core/src/utils/textDirection.tsandtextDirection.test.ts: clearpackages/core/src/Field/Field.tsx,FieldLabel.tsx,Field.test.tsx,FieldLabel.test.tsx: clearpackages/core/src/FieldStatus/FieldStatus.tsx: clearpackages/core/src/InputGroup/InputGroupText.tsxandInputGroup.test.tsx: clearpackages/core/src/hooks/useInputStatusIcon.tsx: clearpackages/core/src/Selector/Selector.tsxandSelector.test.tsx: clearpackages/core/src/MultiSelector/MultiSelector.tsxandMultiSelector.test.tsx: clear, including what the merge ofmainbrings inpackages/core/src/TextInput/TextInput.test.tsx,TextArea/TextArea.test.tsx,Switch/Switch.test.tsx,RadioList/RadioList.test.tsx,FormLayout/FormLayout.test.tsx: clearpackages/core/src/CheckboxList/CheckboxList.test.tsxandCheckboxList.required.test.tsx: clearpackages/core/src/Tokenizer/TokenizerBottomSheet.test.tsx: clearpackages/core/src/__tests__/MixedDirectionText.a11y.chromium.spec.ts: clearpackages/richtext/src/RichTextEditor.test.tsx: clear
|
/approve-spec 156ff1b |
There was a problem hiding this comment.
Approved pending CI: CI is running on this head now that the pull request is ready for review; every check has passed so far except one unit-test shard that is still running, and the merge guard waits for it.
A Field's plain Latin label, description, status message and status tooltip keep their written order on right-to-left pages, and left-to-right pages stay pixel-identical. An engineering owner approved the Field, MultiSelector and internationalization record text for this exact head, and the right-to-left tests and the Chromium mixed-direction spec pass on it.
Nothing else is needed from the author.
Claims and files checked
Review mode: same-head; reason: none
- Today plain Latin label, description and status text reorders on right-to-left pages in every Field-based input, input groups included: verified (base frames of the Mixed Direction story; the new right-to-left Field test fails on the base).
- After the change, text with no right-to-left letter reads as written: verified (the Field and FieldLabel right-to-left tests and CI's Chromium mixed-direction spec pass on this head; head frames).
- Text with a right-to-left letter keeps the page's direction: verified (the Field test for it; the Arabic rows are unchanged in the frames).
- Left-to-right pages show no visible change, and no API changes: verified (the left-to-right frame is pixel-identical; no export, prop, type, theme target or data attribute changes).
- The input-group text, badge and token already follow the same rule through the internal helper: verified (
InputGroupText.tsx:114,Badge.tsx:282,Token.tsx:364). - The span sits inside the existing element, so alignment, the marker and the status glyph follow the page: verified (
FieldLabel.tsx:309-312,FieldStatus.tsx:224; the 390 px frames). - No direction is read, it works under any right-to-left region without the provider, and empty text gets no span: verified (
textDirection.ts:53-58; the tests use a plain right-to-left region; the empty-status test). - One helper serves the label, both descriptions, the status box, the input-group text and the three status tooltips, and the internationalization record names it: verified (
Field.tsx:322,useInputStatusIcon.tsx:230,Selector.tsx:2516,MultiSelector.tsx:2867; the helper sentence beside INV11). - Wrapped lines keep the container's alignment, and Chromium supports only the prefixed keyword: verified in Chromium (both wrapped-label cases pass in CI on this head); WebKit not run, as the description says.
- The searchable bottom sheet names its listbox by the label alone, the popover is unchanged and recorded as a gap, and the required state stays on the control: verified (
MultiSelector.tsx:2487-2492; the listbox-name and required tests pass on this head). - 23 existing tests that read text now take the element around the span, 22 of them in core: verified (counted in the diff).
- Accessible names and descriptions are unchanged: verified (the name and description assertions in the Field and TextInput tests).
- The new unit, tooltip and searchable-sheet tests fail before the fix: verified with the same patch (eight new behavior tests fail on the base).
- The browser spec covers the Field label, description and status and the two wrapped-label cases: verified (16 of 16 in CI's Chromium run on this head).
- Core typecheck, ESLint and the knowledge check pass: verified (CI's typecheck and lint jobs pass on this head; the knowledge check passed on this head).
- The ten named suites pass 3,406 of 3,406, stated for an earlier commit: verified in substance; on this head those suites and the other changed test files pass 3,963 of 3,963.
- The Chromium accessibility and interaction specs pass: verified in substance (CI's finished accessibility browser-spec jobs on this head pass, and on the identical patch the specs for the changed components passed 38 of 38 and 27 of 27); the description does not list which files make up its 29 and 12.
- The full pre-merge check runs before the pull request leaves draft: a local step that cannot be checked from the repository; CI's own checks now run on this head.
- The earlier full Field-family run, the count after the empty-text fix, and the counts and stills stated for named earlier commits: historical runs, not re-measured; every suite run here passes.
- The list of this pull request's files that each merge of
mainchanges: verified; the newest merge changes none of them. - No captured state shows a multi-selector trigger, and the trigger is unchanged: verified from the code (the multi-selector change touches only the listbox name and the status tooltip).
- The checkbox-input test is unchanged from the base: verified.
- The records-changed list, the writing-rubric results, the hidden-label section and the scope: verified against the three record diffs and the head.
- The land path (draft until the automated review approves this head, then ready for review, CI and merge): consistent; the pull request left draft after that approval and CI is running.
- A visually hidden label and its description keep their text with no span: verified (
FieldLabel.tsx:309-312; the hidden-label test). - Changeset: right-to-left order is kept for the label, description, status message and tooltip; text with a right-to-left letter, alignment, marker, icon, name and description are unchanged; the span also renders on left-to-right pages and changes what text queries return; hidden labels keep their text: verified (as above).
.changeset/field-mixed-direction-text.md: clearapps/storybook/stories/Field.stories.tsx: cleardocs/architecture/internationalization.md: cleardocs/specs/components/Field/Field.spec.md: cleardocs/specs/components/MultiSelector/MultiSelector.spec.md: clearpackages/core/src/utils/textDirection.tsandtextDirection.test.ts: clearpackages/core/src/Field/Field.tsx,FieldLabel.tsx,Field.test.tsx,FieldLabel.test.tsx: clearpackages/core/src/FieldStatus/FieldStatus.tsx: clearpackages/core/src/InputGroup/InputGroupText.tsxandInputGroup.test.tsx: clearpackages/core/src/hooks/useInputStatusIcon.tsx: clearpackages/core/src/Selector/Selector.tsxandSelector.test.tsx: clearpackages/core/src/MultiSelector/MultiSelector.tsxandMultiSelector.test.tsx: clearpackages/core/src/TextInput/TextInput.test.tsx,TextArea/TextArea.test.tsx,Switch/Switch.test.tsx,RadioList/RadioList.test.tsx,FormLayout/FormLayout.test.tsx: clearpackages/core/src/CheckboxList/CheckboxList.test.tsxandCheckboxList.required.test.tsx: clearpackages/core/src/Tokenizer/TokenizerBottomSheet.test.tsx: clearpackages/core/src/__tests__/MixedDirectionText.a11y.chromium.spec.ts: clearpackages/richtext/src/RichTextEditor.test.tsx: clear
User impact
This affects people who read a right-to-left page (Arabic, Hebrew, Persian, Urdu) where a form field's label, description or status message holds caller text with weak or neutral characters.
Prefix https://shows as//:Prefix https, and+3shows as3+. Every input that renders a Field shows this, InputGroup included.example.com موقعstill reads right to left. On a left-to-right page the span changes nothing visible, because the text already lays out left to right. No API change.Expected behavior and authority
design:bidirectionalityDR2: caller text keeps a readable character order. The same rule already covers InputGroupText, Badge and Token, through the internaltextDirectionhelper. This change applies that helper to the Field's own caller text.Problem and solution fit
span dir="ltr". The span sits inside the existing element, so the label's alignment, its optional or required marker and the status glyph still follow the page.dir="rtl"withoutInternationalizationProvider. An empty label or status message gets no span, so it keeps no text line.withTextDirectioninutils/textDirection.tsadds the span, with one rule for empty text. FieldLabel (label and description), Field's horizontal-labels description, FieldStatus, InputGroupText and the status tooltip ofstatusVariant="tooltip"(TextInput throughuseInputStatusIcon, Selector and MultiSelector) all call it.architecture:internationalizationINV11 names the helper.text-align: match-parent, which resolvesstartandendin the parent's direction. So a wrapping label lines up on the page's side, and a label in a centred container stays centred. Chromium supports only the-webkit-match-parentkeyword, so the rule writes both; WebKit originated-webkit-match-parentand supportsmatch-parent(not run here: no WebKit on the capture machine).label, as the sheet without search already was. With the label text one level down, the trigger behind the modal sheet no longer named it in Chromium. The listbox name is the label alone, without the required or optional marker:component:SelectorAR1 says "In every presentation the listbox's accessible name is the field's label (label)", and a newcomponent:MultiSelectorAR1 states the same, with the required state kept on the field's control (the combobox trigger'saria-required, or with search the trigger's name). The default popover is unchanged frommain: it still names its listbox through the trigger, which MultiSelector AR1 now records as a gap, because the closed popover listbox stays in the DOM and naming it bylabelwould givegetByLabelText('Fruit')two matches; that fix belongs with mounting the popover listbox only while open.Authority:
component:SelectorAR1 says "In every presentation the listbox's accessible name is the field's label (label)", and MultiSelector's AR1 follows it by name, so the open sheet's list is named "Fruit", not "Fruit Required". MultiSelector's required rule keeps the required state on the field's control, out of the list's name: withhasSearchthe closed trigger states it in its accessible name, and the search input carriesaria-requiredwhile the list is open.FieldLabel.test.tsx's label-colour test, which came in with main) and RichTextEditor's label test. This is a test change, not a user-facing one.Verification
Field.test.tsx, red first): under adir="rtl"region,Prefix https://as label, description and status sits in adir="ltr"span, and the field's accessible name and description stayPrefix https://.example.com موقعgets no span. A left-to-right page gets the same span. An empty status message gets no span. The first case fails onmain.dir="rtl"region,TextInput.test.tsxputs a tooltip-placement status messagePrefix https://in adir="ltr"span and checks that the input's accessible description staysPrefix https://;Selector.test.tsxandMultiSelector.test.tsxcheck that the tooltip message-42 itemssits in adir="ltr"span. Each fails before its fix.MultiSelector.test.tsx): a bottom-sheet listbox, with and without search, is named "Fruit", and a required field keeps its required state on the trigger (aria-requiredon the combobox, or "Required" in the searchable trigger's name), never in the listbox name.MixedDirectionText.a11y.chromium.spec.ts): at 390 px, each line of the story's wrapping label meets the label's start edge, under RTL and LTR, and in a centred container each line stays centred.MultiSelector.test.tsx, red first): a searchable bottom sheet's listbox is named "Fruit". It fails before the fix.MixedDirectionText.a11y.chromium.spec.ts): a new FieldMixed Directionstory adds the label, description and status to the shared spec that reads each character's rendered position under RTL and LTR.tsc, ESLint andcheck:knowledgepass. At an earlier head (808e743): the helper, Field, FieldStatus, TextInput, Selector, InputGroup, CheckboxInput, CheckboxList and Switch ran 1,107 tests in 48 files, and MultiSelector ran 284 tests in 5 files, all passing. At d9958d0 (after merging main at f58e644):FieldLabel.test.tsxandMultiSelector.test.tsxpassed 268 of 268, andcheck:knowledgepassed. At this head (3450d89, after merging main at eafcbfe, which adds three MultiSelector list-format tests): the MultiSelector, Field, Selector, PowerSearch, i18n, utils, Badge, Token, InputGroup and CheckboxList suites pass 3,406 of 3,406, and the PR's Chromium a11y and interaction specs pass 29 of 29 and 12 of 12; the full pre-merge check runs before this leaves draft.CheckboxInput.test.tsxis unchanged frommain.Mixed Directionstory with the page set to RTL, light theme. These were taken before this PR merged main, comparing d8fe0d9, an earlier head of this PR, with 9600e35, its merge base then; later stills follow below. Before: the same story on the components at 9600e35 (the story is the only added change). Each field shows its label, its description, then a detached status.Before,
https://reads//:https,.comreadscom.,+3reads3+and@alicereadsalice@in the label, the description and the status. After, all three read as written.iPhone جديدandexample.com موقعlook the same on both sides.main. After: e99387f, an earlier head, which adds the span on LTR too. The two PNGs are byte-identical: no visible change.mainas its preview was deployed at 16:34Z, a few commits after 65ed0c0, the merge base of the earlier head 4813ef0 (those commits touch the CLI, Table, RichTextEditor and CI, none of the captured components). After: 4813ef0, which includes main's changes to the tooltip hook, Selector and MultiSelector. Every frame is byte-identical to the earlier set that compared f84ef05 with 9600e35, its merge base then. Later heads merge main again. Of this pull request's files, those merges changeMultiSelector.tsxandSelector.tsx(fix(MultiSelector): guard disabled caller-rendered triggers #11480's guard for a disabled caller-rendered trigger, and fix(core): keep disabled selectors closed on default open #11488's rule that a disabled selector stays closed on default open) and add fix(core): keep disabled selectors closed on default open #11488's tests toMultiSelector.test.tsxandSelector.test.tsx; none of these states shows those behaviors, and the reviewer of these stills ruled that they hold for c943829. The merge of main at 808e743 changes, of this pull request's files,Selector.tsx,MultiSelector.tsx, their tests,MultiSelector.spec.mdandTokenizerBottomSheet.test.tsx: fix(Selector): without options, Selector and MultiSelector name the prop and the fix in development #12386's development message for a selector with no options, fix(Selector): the selected row stays on the trigger as the list grows #10062's selected row kept on the trigger as an open list grows, fix(Selector, MultiSelector): a pick, or a press on a container that is no Tab stop, returns focus to the trigger #11851's focus return after a pick or a press on a container that is no Tab stop, fix(core): the active option of select, multi-select and typeahead lists carries a highlighted theme state #11887's highlighted theme state on an open list's active option, and fix(Typeahead): the result count names every match, not only the rows shown #11629's Typeahead result count. Every captured field is closed and has options, so none of these shows in the stills, andField,FieldLabelandFieldStatusare byte-identical to 6b1f108. The merge of main at 53be7ac changes, of this pull request's files,FieldLabel.tsx(main's label weight and colour changes),Selector.tsx,MultiSelector.tsx,MultiSelector.spec.md,internationalization.mdand the RadioList, Selector, Switch, TextArea, TextInput and FieldLabel tests. BecauseFieldLabel.tsxchanged, these stills no longer show this head's label. Stills at d9958d0 (real Chrome, Chromium 149, RTL and LTR, light and dark, 390 and 1280 px) are at https://github.com/vjeux/astryx/tree/80a77e0612ad24a613400dc1b036b598c477ab49: under RTL, the label, description and status read "+3" and "@alice" in written order wheremain(f58e644) shows "3+" and "alice@"; every LTR frame is byte-identical tomain. The merge of main at eafcbfe changes, of this pull request's files,MultiSelector.tsxandMultiSelector.test.tsx(fix(core): five components' assembled built-in text follows the locale #13132, the collapsed trigger's labels joined in the provider locale) andinternationalization.md(fix(PowerSearch): the popover token reads its value in the provider locale #13131, a separate list-format bullet). No captured state shows a MultiSelector trigger; a separate take at this head (https://github.com/vjeux/astryx/blob/10e86bb969a253319bd2118d078da01679947ae1/index.md) shows the trigger byte-identical tomainat eafcbfe in 15 of 15 frames.-42 items(a) and (a2) check that the fix moves no wrapped text: each before and after frame is byte-identical. The glyphs sit at the same places on both sides (first line x = 35 to 374 and wrapped line x = 161 to 374 in (a); x = 26 to 364 and x = 88 to 302, centred, in (a2)). On the head, a range over the label also reports the inner
span's first-line box, which starts at the label's edge (x = 16); that box paints nothing. (b) Before, the tooltip readsitems 42-. After, it reads-42 items, as written.Writing rubric results
Records changed:
component:Field(FR10, its verification row,verified_by, and the two compatibility lines that name the inner span),component:MultiSelector(AR1 and its verification row), andarchitecture:internationalization(the INV11 line namingutils/textDirection.ts, withapplies_toandverified_by).Hidden labels
A label hidden with
isLabelHiddenkeeps its text as written: it has no visual order, so FieldLabel adds no left-to-right span to it or to its description. Field FR10, its verification row and the changeset state this exception. Unit tests cover it, and the tests that read a hidden label or description (in CheckboxInput, Field, InputGroup and Switch) and CheckboxList's row tests read that text directly again, as onmain. The browser checkCheckboxListPress.a11y.chromium.spec.tsfinds a row's label as its first text span with no children; with the span on CheckboxList's hidden checkbox label it found that hidden text first and pressed beside the box. That locator depends on the row's DOM order, so pointing it at the visible label explicitly would make it sturdier; that is a separate test change, not part of this pull request.Scope
Field, FieldLabel, FieldStatus and InputGroupText source; the status tooltip in
useInputStatusIcon, Selector and MultiSelector; MultiSelector's searchable-sheet listbox name; theutils/textDirection.tshelper; the Field record, thecomponent:MultiSelectorrecord (its AR1) and thearchitecture:internationalizationINV11 line; the Field story; the shared mixed-direction browser spec; tests that read text; and a patch changeset.(Posted by Cindy's agent on her behalf.)
Owner and land path