Repository navigation
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
There was a problem hiding this comment.
This pull request is waiting on an engineering owner's decision, and it needs three fixes either way.
component:Text FR4 and component:Heading FR4 currently say a truncated single line defaults to wordBreak="break-all", and this change rewrites both to break-word. An engineering owner records that decision by commenting /approve-spec <full head SHA> on this pull request (the author may do so if they are an engineering owner), and approval waits on it.
Required fixes:
- Heading's Chinese and dense prop docs (
Heading.doc.mjslines 209 and 287), theTextWordBreakblock template (line 28) and the Text "Word Break Variants" story (Text.stories.tsxline 423) still saybreak-allis the single-line default, soastryx component Heading --denseand--zhnow describe the opposite of what ships. - The changeset should be tagged
[feat]and name the old and new default plus thewordBreak="break-all"opt-in, as the release rules ask for an intentional typography default change. - The title's scope
fix(Text)leaves out Heading, whosewordBreakdefault also changes, so retitle itfix(Text, Heading): …or list both components under a## Scopeheading.
The behavior itself checks out: the new tests fail on main and pass here, and the default one-line ellipsis renders identically.
Claims and files checked
Review mode: full; reason: no-earlier-review
- Claim: the default
wordBreakbecomesbreak-wordfor single-line and multi-line truncation in Text and Heading. Verified:Text.tsx:260,Heading.tsx:249, Chromium computed styles. - Claim: an explicit
wordBreak="break-all"still splits inside words. Verified:text.stylex.ts:283-285, Chromium computed styles. - Claim: unit tests cover the default single-line clamp and restored wrapping. Verified:
Text.test.tsx:253-272,Heading.test.tsx:325-348; they fail onmainand pass here. - Claim: the Chromium reflow contract checks the computed
normal/break-wordpair. Verified by readingTextReflow.a11y.chromium.spec.ts:114-126; not run here, the same values were measured in Chromium. - Claim: the component API descriptors and both specs are updated, with a patch changeset. Partly false: the English descriptors and both FR4 rows are updated; Heading's Chinese and dense descriptors are not.
- Claim: the old default was invisible under
nowrap, and the default ellipsis is unchanged. Verified: the Single Line Truncation story renders pixel-identical. - Claim: computed styles move from
break-all/normaltonormal/break-word. Verified in Chromium. - Claim: the two test files pass (90 tests), Core typecheck passes, targeted ESLint and Prettier pass. Verified. The repository check and the Chromium contract run were not repeated.
- Changeset claim: single-line Text and Heading keep words whole when wrapping is restored. Verified in Chromium; the tag and wording fall short as noted above.
.changeset/single-line-word-break.md: finding (tag and wording).docs/specs/components/Heading/Heading.spec.md: FR4 rewrite awaits the owner decision.docs/specs/components/Text/Text.spec.md: FR4 rewrite awaits the owner decision.packages/core/src/Heading/Heading.test.tsx: clear.packages/core/src/Heading/Heading.tsx: finding (outside the title scope); default awaits the owner decision.packages/core/src/Text/Heading.doc.mjs: finding (Chinese and dense entries still give the old default).packages/core/src/Text/Text.doc.mjs: clear.packages/core/src/Text/Text.test.tsx: clear.packages/core/src/Text/Text.tsx: default awaits the owner decision.packages/core/src/Text/__tests__/TextReflow.a11y.chromium.spec.ts: clear.
|
Addressed the review follow-up in : updated Heading dense/Chinese descriptors, the TextWordBreak template, and the Word Break Variants story; changed the changeset to with the old/new default and explicit opt-in. The engineering-owner decision on the FR4 record remains intentionally open. |
|
Addressed the review follow-up in ea12305: updated Heading dense/Chinese descriptors, the TextWordBreak template, and the Word Break Variants story; changed the changeset to [feat] with the old/new default and explicit wordBreak="break-all" opt-in. The engineering-owner decision on the FR4 record remains intentionally open. |
There was a problem hiding this comment.
This pull request is waiting on an engineering owner's spec decision; the fixes from the earlier review are all in.
component:Text FR4 and component:Heading FR4 currently say a truncated single line defaults to wordBreak="break-all", and this change intentionally rewrites both to break-word. An engineering owner settles it by commenting /approve-spec <full head SHA> on this pull request to approve the new FR4 text (the author may do so if they are an engineering owner); if the owner keeps break-all for maxLines={1}, the one-line default and both FR4 rows go back.
Otherwise the change checks out: the new tests fail on main and pass here, and the default one-line ellipsis renders identically.
Claims and files checked
Review mode: full; reason: author-not-engowner
- Claim: Text and Heading default
wordBreaktobreak-wordfor single-line and multi-line truncation. Verified:Text.tsx:260,Heading.tsx:249, Chromium computed styles. - Claim: an explicit
wordBreak="break-all"still splits inside words. Verified:text.stylex.ts:283-285, Chromium shows the same split lines onmainand here. - Claim: unit tests cover the default single-line clamp and restored wrapping. Verified:
Text.test.tsx:253-272,Heading.test.tsx:325-348; they fail onmainand pass here. - Claim: the Chromium reflow contract checks the computed
normal/break-wordpair. Verified by readingTextReflow.a11y.chromium.spec.ts:114-126; not run here, and the same values were measured in Chromium. - Claim: the component API descriptors and both specs are updated, with a patch changeset. Verified:
Text.doc.mjs:121,Heading.doc.mjs:85,:209,:287, both FR4 rows, patch bump. - Claim: the old single-line default was invisible under
nowrap, andnowrapand the ellipsis are unchanged. Verified: the Text and Heading single-line truncation stories render pixel-identical. - Claim: computed styles move from
break-all/normaltonormal/break-word, and words stay whole oncewhite-space: normalis restored. Verified in Chromium. - Claim: the two test files pass (90 tests), Core typecheck passes, targeted ESLint and Prettier pass. Verified. The repository check and the Chromium contract run were not repeated.
- Changeset claim: the single-line default changes from
break-alltobreak-word, withwordBreak="break-all"as the opt-in, released as a patch[feat]. Verified against the code; the release-note rules for a typography default are met. - Author follow-up claim: Heading's dense and Chinese descriptors, the block template, the story and the changeset were updated. Verified.
.changeset/single-line-word-break.md: clear.apps/storybook/stories/Text.stories.tsx: clear.docs/specs/components/Heading/Heading.spec.md: FR4 rewrite awaits the owner decision.docs/specs/components/Text/Text.spec.md: FR4 rewrite awaits the owner decision.packages/cli/assets/templates/blocks/components/Text/TextWordBreak.tsx: non-blocking note (template rubric C, unchanged frommain).packages/core/src/Heading/Heading.test.tsx: clear.packages/core/src/Heading/Heading.tsx: default awaits the owner decision.packages/core/src/Text/Heading.doc.mjs: clear.packages/core/src/Text/Text.doc.mjs: clear.packages/core/src/Text/Text.test.tsx: clear.packages/core/src/Text/Text.tsx: default awaits the owner decision.packages/core/src/Text/__tests__/TextReflow.a11y.chromium.spec.ts: clear.
|
Thanks for this! I ran an independent check on head ea12305: Verdict: approve. No defect found. In real browsers, the one-line ellipsis renders pixel-identical with the new default in every layout I tried. Once a rule lets the line wrap again, the old default split words and the new one splits none. This is evidence for the pending FR4 decision: keeping What I ranScratch clone, Node 24.22.1,
* One Firefox pair (Chinese in the plain block) differed on the first run with the same box. Four repeated shots showed the old rule's own rendering varying between runs (a font-fallback load), and the last old and new shots matched byte for byte. The Notes (non-blocking)
|
PR Analysis Report🔎 Preview ·
|
| Component | Size | LoC | Visual · A11y · RTL |
|---|---|---|---|
| Text · Storybook | 12.7 kB (0) · 6.2 kB CSS (0) | 1,086 (−1) | ✓ · ✓ · — |
| Selector | 122.3 kB (−3 B) · 20.2 kB CSS (0) | — | — · — · — |
| Timer | 15.2 kB (−3 B) · 6.8 kB CSS (0) | — | — · — · — |
✓ passed · ✗ needs a fix · Δ changed, for review in the shots below · ↻ needs re-verify · — did not run
109 more components
| Component | Size | LoC | Visual · A11y · RTL |
|---|---|---|---|
| Slider | 120.3 kB (−4 B) · 9.7 kB CSS (0) | — | — · — · — |
| TopNav | 75.7 kB (−4 B) · 12.4 kB CSS (0) | — | — · — · — |
| richtext/RichTextView | 292.1 kB (−4 B) · 2.4 kB CSS (0) | — | — · — · — |
| Button | 71.6 kB (−5 B) · 11.3 kB CSS (0) | — | — · — · — |
| ChatComposerInput | 93.2 kB (−5 B) · 12.8 kB CSS (0) | — | — · — · — |
| ChatComposerTokenElement | 93.2 kB (−5 B) · 12.8 kB CSS (0) | — | — · — · — |
| ChatSendButton | 72.0 kB (−5 B) · 11.3 kB CSS (0) | — | — · — · — |
| CheckboxList | 69.6 kB (−5 B) · 8.5 kB CSS (0) | — | — · — · — |
| CheckboxListItem | 86.4 kB (−5 B) · 13.1 kB CSS (0) | — | — · — · — |
| ContextMenu | 110.8 kB (−5 B) · 20.0 kB CSS (0) | — | — · — · — |
| DropdownMenuSubMenu | 82.8 kB (−5 B) · 11.6 kB CSS (0) | — | — · — · — |
| ListItem | 85.5 kB (−5 B) · 13.1 kB CSS (0) | — | — · — · — |
| MultiSelector | 111.4 kB (−5 B) · 19.5 kB CSS (0) | — | — · — · — |
| PowerSearch | 329.1 kB (−5 B) · 27.9 kB CSS (0) | — | — · — · — |
| RadioList | 65.8 kB (−5 B) · 8.0 kB CSS (0) | — | — · — · — |
| SideNavHeading | 94.6 kB (−5 B) · 12.8 kB CSS (0) | — | — · — · — |
| Tokenizer | 119.4 kB (−5 B) · 22.5 kB CSS (0) | — | — · — · — |
| TopNavHeading | 93.7 kB (−5 B) · 12.7 kB CSS (0) | — | — · — · — |
| TopNavMegaMenu | 86.8 kB (−5 B) · 13.4 kB CSS (0) | — | — · — · — |
| Typeahead | 100.7 kB (−5 B) · 14.9 kB CSS (0) | — | — · — · — |
| lab/DiffViewer | 100.8 kB (−5 B) · 2.3 kB CSS (0) | — | — · — · — |
| lab/SelectableCardGroup | 74.9 kB (−5 B) · 162 B CSS (0) | — | — · — · — |
| lab/TabBarMoreList | 99.4 kB (−5 B) · 1.8 kB CSS (0) | — | — · — · — |
| richtext/RichTextEditorToolbar | 299.0 kB (−5 B) · 454 B CSS (0) | — | — · — · — |
| AlertDialog | 139.6 kB (−6 B) · 16.5 kB CSS (0) | — | — · — · — |
| AppShell | 96.0 kB (−6 B) · 15.2 kB CSS (0) | — | — · — · — |
| Banner | 73.6 kB (−6 B) · 11.9 kB CSS (0) | — | — · — · — |
| BaseTypeahead | 89.0 kB (−6 B) · 12.4 kB CSS (0) | — | — · — · — |
| Calendar | 82.8 kB (−6 B) · 12.0 kB CSS (0) | — | — · — · — |
| ChatComposer | 96.1 kB (−6 B) · 14.0 kB CSS (0) | — | — · — · — |
| ChatDictationButton | 72.2 kB (−6 B) · 11.4 kB CSS (0) | — | — · — · — |
| ChatMessageList | 29.8 kB (−6 B) · 7.9 kB CSS (0) | — | — · — · — |
| ChatToolCalls | 34.4 kB (−6 B) · 9.3 kB CSS (0) | — | — · — · — |
| CheckboxInput | 74.5 kB (−6 B) · 11.1 kB CSS (0) | — | — · — · — |
| CodeBlock | 87.9 kB (−6 B) · 13.1 kB CSS (0) | — | — · — · — |
| CommandPalette | 87.3 kB (−6 B) · 14.0 kB CSS (0) | — | — · — · — |
| DateRangeInput | 102.3 kB (−6 B) · 14.6 kB CSS (0) | — | — · — · — |
| Field | 64.3 kB (−6 B) · 8.0 kB CSS (0) | — | — · — · — |
| FileInput | 82.1 kB (−6 B) · 13.2 kB CSS (0) | — | — · — · — |
| Lightbox | 156.3 kB (−6 B) · 12.5 kB CSS (0) | — | — · — · — |
| Link | 61.6 kB (−6 B) · 7.8 kB CSS (0) | — | — · — · — |
| Popover | 111.6 kB (−6 B) · 15.9 kB CSS (0) | — | — · — · — |
| RadioListItem | 82.4 kB (−6 B) · 11.7 kB CSS (0) | — | — · — · — |
| SideNavCollapseButton | 72.5 kB (−6 B) · 11.4 kB CSS (0) | — | — · — · — |
| Stepper | 73.3 kB (−6 B) · 11.5 kB CSS (0) | — | — · — · — |
| Switch | 115.1 kB (−6 B) · 11.0 kB CSS (0) | — | — · — · — |
| TableSelectionToolbar | 82.2 kB (−6 B) · 14.9 kB CSS (0) | — | — · — · — |
| TabMenu | 89.9 kB (−6 B) · 12.7 kB CSS (0) | — | — · — · — |
| TextArea | 98.3 kB (−6 B) · 10.6 kB CSS (0) | — | — · — · — |
| Thumbnail | 76.4 kB (−6 B) · 12.9 kB CSS (0) | — | — · — · — |
| TimeInput | 188.2 kB (−6 B) · 18.3 kB CSS (0) | — | — · — · — |
| Timestamp | 29.1 kB (−6 B) · 11.6 kB CSS (0) | — | — · — · — |
| TopNavMenu | 92.9 kB (−6 B) · 12.7 kB CSS (0) | — | — · — · — |
| lab/ChatEmojiPicker | 135.3 kB (−6 B) · 773 B CSS (0) | — | — · — · — |
| lab/ListInput | 103.3 kB (−6 B) · 1.3 kB CSS (0) | — | — · — · — |
| lab/TransferList | 135.3 kB (−6 B) · 1.4 kB CSS (0) | — | — · — · — |
| lab/TransferListSelector | 148.2 kB (−6 B) · 1.6 kB CSS (0) | — | — · — · — |
| BreadcrumbItem | 106.8 kB (−7 B) · 14.3 kB CSS (0) | — | — · — · — |
| Carousel | 83.5 kB (−7 B) · 12.4 kB CSS (0) | — | — · — · — |
| ChatLayout | 95.3 kB (−7 B) · 11.9 kB CSS (0) | — | — · — · — |
| ChatLayoutScrollButton | 72.1 kB (−7 B) · 11.5 kB CSS (0) | — | — · — · — |
| CommandPaletteInput | 35.5 kB (−7 B) · 8.4 kB CSS (0) | — | — · — · — |
| ComplexSelector | 89.0 kB (−7 B) · 13.7 kB CSS (0) | — | — · — · — |
| DateInput | 216.1 kB (−7 B) · 19.5 kB CSS (0) | — | — · — · — |
| DateTimeInput | 240.0 kB (−7 B) · 21.3 kB CSS (0) | — | — · — · — |
| Heading | 13.5 kB (−7 B) · 6.2 kB CSS (0) | — | — · — · — |
| InputGroup | 66.5 kB (−7 B) · 9.5 kB CSS (0) | — | — · — · — |
| NavHeadingMenuItem | 20.7 kB (−7 B) · 7.1 kB CSS (0) | — | — · — · — |
| SideNavItem | 87.9 kB (−7 B) · 12.6 kB CSS (0) | — | — · — · — |
| Spinner | 26.4 kB (−7 B) · 7.0 kB CSS (0) | — | — · — · — |
| Toast | 111.7 kB (−7 B) · 11.7 kB CSS (0) | — | — · — · — |
| ToggleButton | 72.3 kB (−7 B) · 11.4 kB CSS (0) | — | — · — · — |
| lab/ChatReactionBar | 136.8 kB (−7 B) · 1.1 kB CSS (0) | — | — · — · — |
| lab/CommentComposer | 192.5 kB (−7 B) · 1.9 kB CSS (0) | — | — · — · — |
| lab/EmojiPicker | 125.6 kB (−7 B) · 751 B CSS (0) | — | — · — · — |
| NumberInput | 111.0 kB (−8 B) · 13.5 kB CSS (0) | — | — · — · — |
| SideNav | 120.5 kB (−8 B) · 12.8 kB CSS (0) | — | — · — · — |
| Table | 126.7 kB (−8 B) · 21.6 kB CSS (0) | — | — · — · — |
| TableCell | 112.0 kB (−8 B) · 20.7 kB CSS (0) | — | — · — · — |
| TableHeaderCell | 111.8 kB (−8 B) · 20.4 kB CSS (0) | — | — · — · — |
| lab/Comments | 385.6 kB (−8 B) · 2.5 kB CSS (0) | — | — · — · — |
| richtext/RichTextEditor | 315.5 kB (−8 B) · 2.7 kB CSS (0) | — | — · — · — |
| DropdownMenu | 138.4 kB (−9 B) · 20.2 kB CSS (0) | — | — · — · — |
| IconButton | 71.6 kB (−9 B) · 11.3 kB CSS (0) | — | — · — · — |
| MobileNavToggle | 73.8 kB (−9 B) · 12.0 kB CSS (0) | — | — · — · — |
| MoreMenu | 138.6 kB (−9 B) · 20.2 kB CSS (0) | — | — · — · — |
| Pagination | 157.3 kB (−9 B) · 20.6 kB CSS (0) | — | — · — · — |
| lab/Schedule | 124.1 kB (−9 B) · 3.9 kB CSS (0) | — | — · — · — |
| DialogHeader | 74.9 kB (−13 B) · 13.0 kB CSS (0) | — | — · — · — |
| DrawerHeader | 75.0 kB (−14 B) · 14.5 kB CSS (0) | — | — · — · — |
| lab/Tour | 113.1 kB (−14 B) · 1.0 kB CSS (0) | — | — · — · — |
| MobileNav | 85.2 kB (−15 B) · 12.0 kB CSS (0) | — | — · — · — |
| lab/CommentThread | 378.6 kB (−15 B) · 2.4 kB CSS (0) | — | — · — · — |
| lab/DialogHeroHeader | 96.4 kB (−15 B) · 372 B CSS (0) | — | — · — · — |
| Markdown | 203.6 kB (−16 B) · 23.9 kB CSS (0) | — | — · — · — |
| charts/Chart | 262.5 kB (−17 B) · 529 B CSS (0) | — | — · — · — |
| TextInput | 105.6 kB (−17 B) · 13.2 kB CSS (0) | — | — · — · — |
| lab/VideoPlayer | 241.4 kB (−17 B) · 2.1 kB CSS (0) | — | — · — · — |
| charts/ChartLegend | 45.1 kB (−18 B) · 224 B CSS (0) | — | — · — · — |
| lab/MediaFullscreenButton | 233.0 kB (−18 B) · 1.5 kB CSS (0) | — | — · — · — |
| lab/MediaTimeSlider | 233.0 kB (−18 B) · 1.5 kB CSS (0) | — | — · — · — |
| lab/AudioPlayer | 243.5 kB (−19 B) · 1.8 kB CSS (0) | — | — · — · — |
| lab/MediaCaptionsButton | 233.0 kB (−19 B) · 1.5 kB CSS (0) | — | — · — · — |
| lab/MediaPlaybackRate | 233.0 kB (−19 B) · 1.5 kB CSS (0) | — | — · — · — |
| lab/MediaPlayButton | 233.0 kB (−19 B) · 1.5 kB CSS (0) | — | — · — · — |
| lab/MediaSeekButton | 233.0 kB (−19 B) · 1.5 kB CSS (0) | — | — · — · — |
| lab/MediaTime | 233.0 kB (−19 B) · 1.5 kB CSS (0) | — | — · — · — |
| lab/MediaVolume | 233.0 kB (−19 B) · 1.5 kB CSS (0) | — | — · — · — |
| charts/ChartTooltip | 238.4 kB (−31 B) · 451 B CSS (0) | — | — · — · — |
Package size:
- @astryxdesign/cli 4.96 MB packed (+45 B); no new dependencies
- @astryxdesign/core 8.19 MB packed (+92 B); no new dependencies
API changes: core +0 · ~2 · −0
2 API changes (advisory)
| Package | Where | Signature | Usage | |
|---|---|---|---|---|
| ~ | core |
. · Components · component Heading |
prop wordBreak?: WordBreak = 'break-all' for maxLines=1, 'break-word' otherwise → prop wordBreak?: WordBreak = 'break-word' |
<Heading wordBreak="break-word" /> |
| ~ | core |
. · Components · component Text |
prop wordBreak?: WordBreak = 'break-all' for maxLines=1, 'break-word' otherwise → prop wordBreak?: WordBreak = 'break-word' |
<Text wordBreak="break-word" /> |
Touched components checked; for the full suites, add ci:run-visual for Visual, ci:run-rtl for RTL.
Accessibility: 1 violation(s)
Accessibility Audit
Status: 1 accessibility violation(s) found — 1 serious.
Text - 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/24 stories · Learn more - WCAG: 1.4.3 (Level AA)
- Rule:
Generated by PR Enrichment workflow | View full report
|
/approve-spec ea12305 |
The TextWordBreak CLI example ships in @astryxdesign/cli, so the changeset must name that package too.
|
/approve-spec 25c4515 |
There was a problem hiding this comment.
Changes requested: the new wordBreak default, its tests and the rewritten FR4 rows hold up, but the two records still describe the old compatibility.
- Both records still say the released default is preserved and the API does not change:
docs/specs/components/Text/Text.spec.md(lines 43 and 58–60) anddocs/specs/components/Heading/Heading.spec.md(lines 44 and 60–62) keep "Released default preserved:yes", "no public prop or default change" and "No API change." while FR4 now moves themaxLines={1}default frombreak-alltobreak-word, so set it tonowith that reason and name the default change (a nonbreaking typography default;wordBreak="break-all"keeps the old split) in the Compatibility class and the at-a-glance row.
Non-blocking:
TextWordBreak.doc.mjsstill lists onlyTextincomponentsUsed: the block now usesCardandVStack, so add'Card'and'Stack'so CLI listings and search find it.- No test covers the
wordBreak="break-all"opt-in: one case beside the new restored-wrap test would pin it, and a sentence instead of the spaceless URL would make those tests match their "breaks between words" names. - The new source comment is vague: in
Text.tsxandHeading.tsx, "Keep the default word boundary behavior consistent" could read "A single-line clamp does not wrap. If a caller restores wrapping, lines break between words, as in a multi-line clamp."
The record edit needs a fresh /approve-spec <full head SHA> from an engineering owner for its head. In Chromium captures the default one-line ellipsis is pixel-identical and restored wrapping now keeps words whole.
Claims and files checked
Review mode: full; reason: requested
- Title: the single-line truncation default becomes break-word: verified (
Text.tsx:263,Heading.tsx:272;Text.test.tsx:254,Heading.test.tsx:325). - The default is break-word for one and several lines: verified (code and the same tests).
- The break-all opt-in is unchanged: verified with a Chromium probe; no unit test.
- Unit tests for the one-line clamp and for restored wrapping: verified (
Text.test.tsx:254,:263;Heading.test.tsx:325,:338). - The Chromium reflow contract checks the computed pair: verified by reading
TextReflow.a11y.chromium.spec.ts:114-127. - Docs, specs and a patch changeset for core and cli are updated: verified, except the records' compatibility lines (finding above).
- The old break-all default was invisible under nowrap: verified (three default stories pixel-identical in Chromium).
- Restored wrapping split words with the old default: verified (Chromium capture).
- Lines now break between words, and a word wider than the line still wraps inside itself: verified (Chromium capture, Text and Heading).
- Before and after computed pairs: after verified by the tests; before reported, matching the old source in ordinary flow.
- nowrap and the ellipsis are unchanged: verified (tests and identical frames).
- Verification list (unit tests, typecheck, repo check, browser contract, lint): reported; the two test files pass when run for this review (108 tests), and CI's lint and typecheck pass at this head.
- Closes the linked issue: verified against its expected behaviour.
- Changeset: the default moves from break-all to break-word, with break-all as the opt-in: verified; the changeset check passes.
- Files:
.changeset/single-line-word-break.mdclear;apps/storybook/stories/Text.stories.tsxclear;Text.spec.mdandHeading.spec.mdblocking finding;TextWordBreak.tsxnote;Text.tsxandHeading.tsxnote;Text.test.tsxandHeading.test.tsxnote;Text.doc.mjs,Heading.doc.mjsandTextReflow.a11y.chromium.spec.tsclear.
The Text and Heading records now say the maxLines={1} default changed
from break-all to break-word, a nonbreaking typography default, and
that wordBreak="break-all" keeps the old split. The wrap tests use a
sentence, a new test covers the break-all opt-in, the source comment
says what happens when a caller restores wrapping, and the
TextWordBreak block lists Card and Stack.
|
/approve-spec 5460972 |
There was a problem hiding this comment.
Changes requested, for the description only. The new wordBreak default, its tests, the rewritten FR4 records and the changeset hold up, and the default one-line clamp renders the same as before.
- The description says nothing overflows and that lines no longer break inside words, but a token wider than the line still breaks inside itself, and with wrapping restored in an auto-sized box (an auto-layout table cell or an inline-block)
break-wordkeeps the token's full width, so a URL in a 200 px container widened the table to 471 px wherebreak-allwrapped it (reproduced locally in Chromium); please reword "Why" and "Before / after", for example: "Lines break between words, as in a multi-line clamp; only a word wider than the line breaks inside itself, and in an auto-sized box that word keeps its width and widens the box, as multi-line truncation already does." - Both verification maps still say the
wordBreakdefaults have no automated check (non-blocking):Text.spec.md:215andHeading.spec.md:201could name only the multi-line default now that the new tests pin the one-line default and thebreak-allopt-in.
Claims and files checked
Review mode: full; reason: requested
- Claim, title: single-line truncation defaults to
break-word: verified (Text.tsx:263,Heading.tsx:272). - Claim: both components default to
break-wordfor one and several lines: verified (same lines, applied while truncating). - Claim: the
break-allescape hatch is unchanged: verified (unchanged class; new opt-in tests pass). - Claim: unit coverage for the default clamp and for restored wrapping: verified (new cases pass on the head, fail on the base).
- Claim: the Chromium reflow contract checks the
normal/break-wordpair: verified (assertion added; contract passes locally). - Claim: prop docs, both records and a patch changeset naming core and cli: verified (the CLI ships the block's assets).
- Claim: the old default was
break-alland stayed invisible undernowrap: verified (identical before and after frames). - Claim: restored wrapping used to split ordinary words: verified (base splits words mid-word).
- Claim: lines now break between words instead of inside them (stated twice): false (a token wider than the line still splits).
- Claim: a word wider than the line wraps inside itself, so nothing overflows: false (auto-sized boxes overflow).
- Claim: the before and after computed pairs: reported for the base, verified for the head.
- Claim:
nowrapand the ellipsis are unchanged: verified. - Claim: the test, typecheck, repository-check and lint runs: reported; unit tests, the reflow contract and the changeset and knowledge checks re-run locally and pass.
- Claim: closes the linked issue: verified (it reports this split and asks for this default).
- Changeset:
[feat]default change with thebreak-allopt-in named: verified. - Files:
.changeset/single-line-word-break.mdclear;apps/storybook/stories/Text.stories.tsxclear;docs/specs/components/Heading/Heading.spec.mdnon-blocking note;docs/specs/components/Text/Text.spec.mdnon-blocking note;packages/cli/assets/templates/blocks/components/Text/TextWordBreak.doc.mjsclear;packages/cli/assets/templates/blocks/components/Text/TextWordBreak.tsxclear;packages/core/src/Heading/Heading.test.tsxclear;packages/core/src/Heading/Heading.tsxclear;packages/core/src/Text/Heading.doc.mjsclear;packages/core/src/Text/Text.doc.mjsclear;packages/core/src/Text/Text.test.tsxclear;packages/core/src/Text/Text.tsxclear;packages/core/src/Text/__tests__/TextReflow.a11y.chromium.spec.tsclear.
The new tests pin the one-line wordBreak default and the break-all opt-in, so only the multi-line default stays a gap.
|
/approve-spec 7e8bb53 |
There was a problem hiding this comment.
Changes requested, for two sentences of the description only. The new wordBreak default, its tests, the owner-approved FR4 records, the prop docs and the changeset hold up, and the default one-line clamp renders exactly as before (pixel-identical in Chromium, reproduced locally).
- The description says lines break between words and only an overlong word breaks inside itself, but
word-break: normalfollows each language's own line-breaking rules, so with wrapping restored a one-line clamp still splits Korean, Chinese and Japanese words that fit on the line (for example 디자인 became디자/인in a 180 px column, reproduced locally), in both the "Why" and the "Before / after" paragraphs. - No writing rubric results for the two changed records (non-blocking): the repository asks a pull request that edits a record to report the writing rubric under
## Writing rubric results, and a pass over the changed lines finds nothing to fix, so seven short lines would do.
Suggested wording for both paragraphs: "Lines break where a multi-line clamp breaks them (word-break: normal): between words in English and other space-separated text, while Korean, Chinese and Japanese still break between syllables or characters. A word wider than the line breaks inside itself, and in an auto-sized box that word keeps its width and widens the box."
Claims and files checked
Review mode: full; reason: requested
- Claim, title: single-line truncation in Text and Heading defaults to
break-word: verified (Text.tsx:263,Heading.tsx:272). - Claim: both components default to
break-wordfor one and several lines: verified (same lines; the class applies whenevermaxLinesis above 0). - Claim: the explicit
break-allescape hatch is unchanged: verified (unchanged class; new opt-in tests atText.test.tsx:277andHeading.test.tsx:352). - Claim: unit coverage for the default clamp and for callers that restore wrapping: verified (
Text.test.tsx:254,:263;Heading.test.tsx:325,:338; pass locally). - Claim: the Chromium reflow contract checks the
normal/break-wordpair: verified by reading (TextReflow.a11y.chromium.spec.ts:106); not run locally. - Claim: prop docs, both records and a patch changeset naming core and cli, with the block shipping in the CLI: verified (every
wordBreakdescriptor entry updated; the CLI package shipsassets). - Claim: the old default was
break-alland stayed invisible undernowrap: reported for the base; identical before and after frames locally. - Claim: restoring wrapping used to split ordinary words: reported; reproduced locally on the base.
- Claim: lines break between words and only a word wider than the line breaks inside itself (stated twice): false (Korean, Chinese and Japanese words that fit still split).
- Claim: in an auto-sized box an overlong word keeps its width and widens the box, as multi-line truncation does: verified (469 px inside a 200 px container locally; multi-line uses the same class).
- Claim: the before and after computed pairs: reported for the base, verified for the head (unit tests and a browser probe).
- Claim:
nowrapand the ellipsis are unchanged: verified (tests; pixel-identical frames). - Claim:
wordBreak="break-all"keeps the old split: verified. - Claim: the test, typecheck, repository-check, browser-contract and lint runs: reported; unit tests and the changeset and knowledge checks re-run locally and pass, and CI's lint and typecheck pass.
- Claim: the browser contract writes evidence screenshots to its results folder: verified (the spec writes there).
- Claim: closes the linked issue: verified (it reports this split and asks for this default).
- Changeset:
[feat]default change frombreak-alltobreak-wordwith thebreak-allopt-in, patch for core and cli: verified (the changeset check passes locally). - Files:
.changeset/single-line-word-break.mdclear;apps/storybook/stories/Text.stories.tsxclear;docs/specs/components/Heading/Heading.spec.mdnon-blocking note (rubric results);docs/specs/components/Text/Text.spec.mdnon-blocking note (rubric results);packages/cli/assets/templates/blocks/components/Text/TextWordBreak.doc.mjsclear;packages/cli/assets/templates/blocks/components/Text/TextWordBreak.tsxclear;packages/core/src/Heading/Heading.test.tsxclear;packages/core/src/Heading/Heading.tsxclear;packages/core/src/Text/Heading.doc.mjsclear;packages/core/src/Text/Text.doc.mjsclear;packages/core/src/Text/Text.test.tsxclear;packages/core/src/Text/Text.tsxclear;packages/core/src/Text/__tests__/TextReflow.a11y.chromium.spec.tsclear.
There was a problem hiding this comment.
Changes requested for one sentence of the description. The new wordBreak default, its tests, the owner-approved FR4 records, the prop docs and the changeset hold up, and the default one-line ellipsis renders identically before and after.
- The description's Before block says a single-line clamp computed
overflow-wrap: normal, but inside Banner, Toast, FieldStatus and CommandPaletteEmpty it inheritedanywhere, because the oldbreak-allclass set nooverflow-wrap(reproduced in a Banner), so please write it as "word-break: break-allwith an inheritedoverflow-wrap(normal, oranywhereinside Core'sanywherecontainers)".
Two smaller points you can fix at the same time:
- The Verification section's test count is stale: the two test files hold 110 tests at this head, not 90, and all of them pass.
- Miss: The new source comment says lines break between words, but Korean, Chinese and Japanese text still breaks between syllables or characters; the inline comments suggest wording.
Claims and files checked
Review mode: full; reason: requested
- Claim: both components default to break-word for one-line and multi-line truncation — verified (code; new tests fail before the change and pass after, run locally).
- Claim: the break-all opt-in is unchanged — verified (styles unchanged; opt-in tests pass before and after).
- Claim: unit tests cover the default one-line clamp and restored wrapping — verified (tests read and run).
- Claim: the Chromium reflow contract now checks the computed normal / break-word pair — verified by reading the test; not run.
- Claim: prop docs, both records and a patch changeset naming core and cli are updated — verified.
- Claim: the old one-line default was break-all — reported; matches the base.
- Claim: the old default was invisible while nowrap applied — verified (pixel-identical Chromium frames, base and head).
- Claim: restored wrapping used to split words mid-letter — verified (base probe).
- Claim: the default now matches multi-line truncation; lines break between words in English and between syllables or characters in Korean, Chinese and Japanese — verified for English and Korean in Chromium; Chinese and Japanese follow the same line-breaking class.
- Claim: an overlong word breaks inside itself and widens an auto-sized box — verified (probe: a table cell grows from 170 to 469 px).
- Claim: before, a one-line clamp computed break-all with overflow-wrap normal — false inside Core's anywhere containers (finding above).
- Claim: after, it computes normal with break-word — verified, including inside a Banner.
- Claim: nowrap and the ellipsis are unchanged, and break-all keeps the old split — verified.
- Claim: the two test files ran 90 tests — reported; stale, 110 at this head (all pass, run locally).
- Claim: typecheck, ESLint and Prettier pass — verified in CI at this head.
- Claim: the repository check and the four-test Chromium contract pass — reported.
- Claim: the default nowrap state is visually unchanged — verified (frames).
- Claim: writing rubric results R1–R7 — verified against the changed record lines.
- Claim: closes the linked word-break issue — verified; the change does what it asks.
- Changeset: a patch feat note naming the old and new default and the break-all opt-in — verified.
- Title: default single-line truncation to break-word — verified.
- File
.changeset/single-line-word-break.md— clear. - File
apps/storybook/stories/Text.stories.tsx— clear. - File
docs/specs/components/Heading/Heading.spec.md— clear. - File
docs/specs/components/Text/Text.spec.md— clear. - File
packages/cli/assets/templates/blocks/components/Text/TextWordBreak.doc.mjs— clear. - File
packages/cli/assets/templates/blocks/components/Text/TextWordBreak.tsx— clear. - File
packages/core/src/Heading/Heading.test.tsx— clear. - File
packages/core/src/Heading/Heading.tsx— comment note. - File
packages/core/src/Text/Heading.doc.mjs— clear. - File
packages/core/src/Text/Text.doc.mjs— clear. - File
packages/core/src/Text/Text.test.tsx— clear. - File
packages/core/src/Text/Text.tsx— comment note. - File
packages/core/src/Text/__tests__/TextReflow.a11y.chromium.spec.ts— clear.
Korean, Chinese and Japanese text still breaks between syllables or characters, so the comment says lines break where a multi-line clamp breaks them.
|
/approve-spec 3b54759 |
There was a problem hiding this comment.
Approved pending CI: the deferred build, test and docsite-test jobs have not run on this head yet and must pass before merge.
The new single-line wordBreak default, the rewritten Text and Heading FR4 records (approved by an engineering owner for this head), the prop docs, tests, block template and changeset all hold up. Reproduced locally, the new default tests fail on the base and all 110 pass on this head, one-line truncation renders pixel-identically, and text whose wrapping is restored now breaks between words. Nothing else is needed from you; thank you for the fix.
Claims and files checked
Review mode: full; reason: requested
- Claim: the title's single-line Text and Heading default is now break-word: verified (
Text.tsx:263,Heading.tsx:272). - Claim: break-word is the default for both one-line and multi-line truncation: verified (code; the unit tests pass here and fail on the base).
- Claim: the explicit break-all opt-in is unchanged: verified (the unchanged break-all style;
Text.test.tsx:277,Heading.test.tsx:352). - Claim: unit coverage for the default one-line clamp and for restored wrapping: verified (
Text.test.tsx:254and:264,Heading.test.tsx:325and:338). - Claim: the Chromium reflow contract checks the normal / break-word pair: verified (
TextReflow.a11y.chromium.spec.ts:114-126). - Claim: prop docs and both records updated, with a patch changeset naming core and cli because the block template ships in the CLI: verified (English, Chinese and dense docs; the CLI package ships its assets; the changeset check passes).
- Claim: the old one-line default was break-all, invisible under nowrap, and split ordinary words once wrapping was restored: verified (identical one-line frames; the base splits words in Chromium).
- Claim: the default now matches multi-line truncation, breaking between words in English and between syllables or characters in Korean, Chinese and Japanese: verified (Chromium probe on this head).
- Claim: a word wider than the line breaks inside itself, and in an auto-sized box it keeps its width and widens the box: verified (a URL splits in a 180 px box; a table cell grows to 479 px in a 200 px container).
- Claim: before, word-break was break-all and overflow-wrap was inherited: reported, consistent with the base code and a base probe.
- Claim: after, word-break is normal and overflow-wrap is break-word, with nowrap and the ellipsis unchanged: verified (unit tests, probe).
- Claim: passing break-all keeps the old split: verified.
- Claim: 110 unit tests pass: verified (110 of 110, reproduced locally).
- Claim: the core typecheck passes: reported; CI's typecheck passes on this head.
- Claim: the repository checks pass: reported; the changeset and knowledge checks pass locally.
- Claim: the Chromium reflow contract passes its 4 tests: reported, not run here; CI's heavy jobs have not run yet.
- Claim: targeted lint and Prettier checks pass: reported; CI's lint passes on this head.
- Claim: the browser contract writes evidence screenshots under test-results, and the default nowrap state looks unchanged: verified (
TextReflow.a11y.chromium.spec.ts:30; identical frames). - Claim: the writing rubric results for both records: verified against the changed record lines.
- Claim: closes the linked word-break issue: verified; its expected behaviour matches this head.
- Claim: the changeset's feat note names the old and new default and the break-all opt-in: verified.
- File
.changeset/single-line-word-break.md: clear - File
apps/storybook/stories/Text.stories.tsx: clear - File
docs/specs/components/Heading/Heading.spec.md: clear - File
docs/specs/components/Text/Text.spec.md: clear - File
packages/cli/assets/templates/blocks/components/Text/TextWordBreak.doc.mjs: clear - File
packages/cli/assets/templates/blocks/components/Text/TextWordBreak.tsx: clear - File
packages/core/src/Heading/Heading.test.tsx: clear - File
packages/core/src/Heading/Heading.tsx: clear - File
packages/core/src/Text/Heading.doc.mjs: clear - File
packages/core/src/Text/Text.doc.mjs: clear - File
packages/core/src/Text/Text.test.tsx: clear - File
packages/core/src/Text/Text.tsx: clear - File
packages/core/src/Text/__tests__/TextReflow.a11y.chromium.spec.ts: clear
Resolve the Text verification map: keep main's truncation known limit and name the tested one-line wordBreak default and break-all opt-in.
|
/approve-spec 012b411 |
There was a problem hiding this comment.
Approved pending CI: the heavy CI jobs that waited for review are now running on this head and must pass before merge.
The new one-line wordBreak default for Text and Heading, its tests, the approved FR4 records, the prop docs, the TextWordBreak block and the changeset all hold up. Run locally, the new tests fail on main and pass here. In Chromium the one-line ellipsis is pixel-identical before and after, and with wrapping restored the lines now break between words.
Claims and files checked
Review mode: full; reason: requested
Claims:
- Title: single-line Text and Heading truncation now defaults to
break-word. Verified: the resolver lines inText.tsxandHeading.tsx; the new tests fail onmainand pass on this branch, run locally. - Changeset: the default moves from
break-alltobreak-word,wordBreak="break-all"opts back in, patch for core and cli. Verified: the code and opt-in tests, the CLI package ships itsassetsfolder, and the changeset check passes locally. - Both components default to
break-wordfor one and several lines. Verified in code and by the tests. - The explicit
break-allopt-in is unchanged. Verified: its style class is untouched, and in Chromium it reproduces the old line breaks. - New unit tests cover the default one-line clamp and restored wrapping. Verified: run locally, 110 tests pass.
- The Chromium reflow contract now checks the
normal/break-wordpair. Verified by reading the spec; the same computed values were probed on its story in Chromium. Your run of it is reported. - Prop docs, both records and the changeset are updated, and the block ships in the CLI. Verified: a repository-wide search for
break-allfinds no other one-line default claim. - The old one-line default was
break-all, invisible undernowrap. Verified: computed values onmain, and before/after frames that are pixel-identical. - Restored wrapping used to split words at any letter. Verified on
mainin a 180 px column (broug / ht). - The default now matches multi-line truncation, and lines break the way a multi-line clamp breaks them. Verified in code.
- Space-separated text breaks between words, and Korean, Chinese and Japanese still break between syllables or characters. Verified for English and Japanese in Chromium, and for Korean by its line-break position; Chinese follows the same
word-break: normalrule. - A word wider than the line breaks inside itself, and in an auto-sized box it keeps its width and widens the box. Verified: a URL in a 180 px column, and an auto-layout table that grows to 489 px inside 200 px.
- Before block:
break-all, withoverflow-wrapinherited (anywhereinside Core's anywhere containers). Verified, including inside Banner. - After block:
normal/break-word, withnowrapand the ellipsis unchanged. Verified, including inside Banner. wordBreak="break-all"keeps the old split. Verified.- Verification list (110 tests, typecheck, repository checks, 4 Chromium contract tests, lint and format). Reported. The 110 tests were reproduced locally; lint and typecheck pass in CI on this head; the knowledge and changeset checks pass locally.
- The browser contract writes its screenshots under
test-results/text-reflow-evidence/. Verified in the spec file. - The default
nowrapstate is visually unchanged. Verified by pixel-identical frames. - Writing rubric results R1 to R7 for both records. Verified against the changed record lines.
- Closes #11790. The issue's expected behavior is what the head does.
Files:
- .changeset/single-line-word-break.md: clear
- apps/storybook/stories/Text.stories.tsx: clear
- docs/specs/components/Heading/Heading.spec.md: clear
- docs/specs/components/Text/Text.spec.md: clear
- packages/cli/assets/templates/blocks/components/Text/TextWordBreak.doc.mjs: clear
- packages/cli/assets/templates/blocks/components/Text/TextWordBreak.tsx: clear
- packages/core/src/Heading/Heading.test.tsx: clear
- packages/core/src/Heading/Heading.tsx: clear
- packages/core/src/Text/Heading.doc.mjs: clear
- packages/core/src/Text/Text.doc.mjs: clear
- packages/core/src/Text/Text.test.tsx: clear
- packages/core/src/Text/Text.tsx: clear
- packages/core/src/Text/tests/TextReflow.a11y.chromium.spec.ts: clear
cixzhang
left a comment
There was a problem hiding this comment.
(Posted by Cindy's agent.) Approved at this exact head.
What changed
wordBreakbehavior forTextandHeadingtruncation tobreak-wordfor bothmaxLines={1}and multi-line truncation.wordBreak="break-all"escape hatch unchanged for callers that intentionally split inside words.whiteSpace: 'normal'.normal/break-wordpair.@astryxdesign/coreand@astryxdesign/cli(theTextWordBreakblock template ships in the CLI).Why
The previous single-line default was
word-break: break-all. It was invisible while the component's ownwhite-space: nowrapwas active, but an application that restored wrapping could split ordinary words at arbitrary letters. The default now matches multi-line truncation. Lines break where a multi-line clamp breaks them (word-break: normal): between words in English and other space-separated text, while Korean, Chinese and Japanese still break between syllables or characters. A word wider than the line breaks inside itself, and in an auto-sized box that word keeps its width and widens the box.Before / after
Before, the default computed styles for a single-line clamp were:
After, they are:
The default
white-space: nowrapand ellipsis are unchanged. When a caller setswhiteSpace: 'normal', lines break where a multi-line clamp breaks them (word-break: normal): between words in English and other space-separated text, while Korean, Chinese and Japanese still break between syllables or characters. A word wider than the line breaks inside itself, and in an auto-sized box that word keeps its width and widens the box. PasswordBreak="break-all"to keep the old split.Verification
pnpm exec vitest run packages/core/src/Text/Text.test.tsx packages/core/src/Heading/Heading.test.tsx— 110 tests passed.pnpm -F @astryxdesign/core typecheck— passed.pnpm check:repo— passed; the existing temporary-status messages are warnings only.The browser contract writes local evidence screenshots under
test-results/text-reflow-evidence/; the defaultnowrapstate is visually unchanged, so no misleading screenshot is embedded here.Writing rubric results
Run over the changed lines of
component:Textandcomponent:Heading:Closes #11790