Repository navigation
fix(Markdown): keep bulleted and numbered lists inside their column - #12290
josephfarina wants to merge 5 commits into
Conversation
Markdown lists stepped out 8px past both edges of their column to cancel the row inset, so Markdown that filled a phone screen widened the page. Lists now use List's flush edge, which drops the row inset, so markers and text keep their positions and the list box matches the column.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
PR Analysis Report🔎 Preview ·
|
… RichText With flush rows the gutter's start padding moved numbered rows 16px in. Without it, numbered and bulleted rows start on the column line, as RichText's outside markers do. The bounds spec reads the paragraph's block box as the column.
The removed gutter comment was Markdown.tsx's citation of AST-061 FR11; the component record now links that claim, and the provenance baseline drops it.
There was a problem hiding this comment.
Requesting changes. The code fix works: bulleted, numbered and mixed Markdown lists now stay inside their column, and markers and text do not move. The release note, title and description need to match what the change does.
- The changeset and title say every Markdown list stays inside its column, but a list made only of task items still renders through CheckboxList with the
-spacing-2margin (taskListIndent,Markdown.tsx:650), so it still spans −8 to 398px and widens a 390px page; narrow the wording to bulleted and numbered lists, or fix the task path in this pull request. - The description says the published CSS put numbered rows 16px further in and that this change moves them, but in the package build the gutter's
margin-inline-startrule already outranks the list'smargin-inline, so numbered counters sit on the column line before and after the change (the base and head renders are pixel-identical); replace those two sentences with "numbered rows keep their positions in Storybook and in the package build".
The failing test-node shards stop on the Node suite's leg-time budget, which this change does not feed, so they need a fix on main or a re-run rather than a change here.
Claims and files checked
Review mode: full; reason: no-earlier-review
- Claim: lists no longer reach 8px past both edges and no longer widen a phone page (changeset, title): false for pure task lists, true for bulleted, numbered and mixed lists (page 398px to 390px at 390px).
- Claim: markers and text keep their positions (changeset): verified, base and head frames pixel-identical in Storybook and in the package build.
- Claim: the negative inline margin made each list 16px wider than its column: verified (list box −8 to 398px at 390px).
- Claim:
edge="flush"drops the row inset: verified bylistEdge.test.tsx, which fails on the base and passes on the head. - Claim: the numbered gutter pushed the list box past the start edge, the right edge in RTL: verified.
- Claim: Storybook put numbered counters on the column line: verified.
- Claim: the published CSS put numbered rows 16px further in, and this change moves them: false.
- Claim: both builds now put counters on the column line: verified.
- Claim: pure task lists keep their offset: verified.
- Claim: one style change, no API or theme change: verified, the built API surface is unchanged.
- Claim: Markdown and RichText text starts and nested insets stay matched: verified in the wide-number-marker parity story.
- Claim: the Chromium bounds spec checks both directions at 390px: verified, it passes on the head.
- Claim: the Markdown, List and CheckboxList unit suites pass and typecheck is clean: verified (65 files, 1802 tests; CI typecheck passes).
- File
.changeset/markdown-list-fits-column.md: finding (task lists). - File
docs/specs/components/Markdown/Markdown.spec.md: clear (adds a link to an existing claim). - File
internal/eslint-plugin-astryx/no-comment-provenance.baseline.json: clear (its--checkpasses). - File
packages/core/src/Markdown/Markdown.tsx: clear in code; its task-list path bounds the changeset finding. - File
packages/core/src/Markdown/__tests__/MarkdownListBounds.a11y.chromium.spec.ts: clear. - File
packages/core/src/Markdown/listEdge.test.tsx: clear.
There was a problem hiding this comment.
Approved. Bulleted, numbered and mixed Markdown lists now stay inside their column, markers and text do not move, and the release note, title and description now match what the change does.
CI is not green at this head for reasons outside this change: every test-node shard stops on the Node suite's leg-time budget, and one AlertDialog motion timing case failed in pr-interaction (4/6) after passing on the previous head with identical code. Those checks need a re-run or a fix on main before this can merge.
Claims and files checked
Review mode: incremental; reason: none
- Claim: bulleted and numbered lists stay inside their column and no longer reach 8px past both edges (changeset, title): verified, list boxes go from −8…398px (numbered −24…398px) to 0…390px at 390px.
- Claim: Markdown that fills a phone screen no longer scrolls sideways for those lists (changeset): verified, the page goes from 398px to 390px at 390px and from 383px to 375px at 375px.
- Claim: markers and text keep their positions (changeset, description): verified, base and head frames are pixel-identical at 375, 390 and 1280px, mixed task and plain lists included.
- Claim: the negative inline margin made each list 16px wider than its column: verified at the base.
- Claim: task-only lists take a separate path that a follow-up pull request fixes: verified, they still render through the checkbox list with the old margin, and the follow-up is open.
- Claim: the
flushedge drops the row inset, as List's record requires: verified by the new unit test, which fails on the base and passes on the head; the quoted "works anywhere; suits static rows" comes from List's record summary and its prop docs rather than that rule's own text. - Claim: the numbered gutter pushed the list box past the start edge, the right edge in right-to-left: verified (−24px at the start, 414px on the right in an RTL document).
- Claim: pure task lists keep their offset and the checkbox list has no edge choice: verified.
- Claim: numbered rows keep their positions in Storybook and in the package build: verified, the built CSS resolves the gutter as Storybook does.
- Claim: Markdown and RichText text starts and nested insets stay matched: verified, Markdown text starts are unchanged.
- Claim: one style change in Markdown with no API or theme change: verified, the built API surface is unchanged.
- Claim: the Chromium bounds spec checks both directions at 390px and no sideways scroll: verified, it passes on the head.
- Claim: the Markdown, List and CheckboxList unit suites pass and typecheck is clean: verified (65 files, 1802 tests; CI typecheck passes).
- Claim: no new API, default or interaction, and no internal context in public text: verified.
- File
.changeset/markdown-list-fits-column.md: clear. - File
docs/specs/components/Markdown/Markdown.spec.md: clear (links an existing claim). - File
internal/eslint-plugin-astryx/no-comment-provenance.baseline.json: clear (its check passes). - File
packages/core/src/Markdown/Markdown.tsx: clear. - File
packages/core/src/Markdown/__tests__/MarkdownListBounds.a11y.chromium.spec.ts: clear. - File
packages/core/src/Markdown/listEdge.test.tsx: clear.
- #12694 fix(cli): the Order Detail template's discount uses a minus sign held to its amount Author: @josephfarina - #12114 fix(templates): reset, reply, send and go-into icons mirror in right-to-left pages Author: @josephfarina - #12143 refactor(templates): example blocks lay out with HStack and VStack instead of flex wrappers Author: @josephfarina - #12158 fix(core): ChatComposer keeps its send action inside the composer on a narrow screen Author: @josephfarina - #12242 fix(cli): the npm commands the CLI runs for itself use npm's own noproxy setting Author: @josephfarina - #12283 fix(core): dark secondary text meets 4.5:1 on the neutral fill over the page and cards Author: @josephfarina - #12290 fix(Markdown): keep bulleted and numbered lists inside their column Author: @josephfarina - #12372 [fix] Heading: a missing level renders an h2 and warns, instead of crashing Author: @josephfarina - #12447 spec(AST-057): the swipe codemod's paths match it in any lifecycle folder Author: @josephfarina - #12475 fix(templates): on a phone the settings search moves under the title Author: @josephfarina - #12530 fix(cli): the contact-form template fits a phone; its section fills the width up to 800px Author: @josephfarina
|
Landed in #12812. |
User impact
A Markdown bulleted or numbered list reached 8px past both edges of its column. (Task-only lists take a separate path; #12295 fixes those.) When Markdown filled a phone screen (for example a cited answer in a full-width column at 390px), the list made the page 398px wide, so the page scrolled sideways and list text sat partly off screen.
Problem and solution fit
-spacing-2on both sides), so the list box was 16px wider than its column.List already has the treatment for this:
edge="flush"drops the row inset, so row content meets the list's edges. Markdown's lists now use it, and the negative margins go away. The numbered-list gutter (a second negative start margin plus matching padding) goes too: with flush rows it nets to nothing, and it pushed the list box past the start edge, which is the right edge in RTL. Pure task lists (the CheckboxList path) keep their current offset; CheckboxList has no edge choice, so that path is unchanged here.Expected behavior and authority
component:ListFR3:flushresolves the row inset to zero and "works anywhere; suits static rows".spec:AST-061FR5/FR11: Markdown text starts and nested insets stay the same, so renderer parity holds.Smallest restoration
One style change in
Markdown.tsx: lists passedge="flush",blockIndentdrops its negative margin, and the numbered gutter style goes away. The task-list container keeps its old margin through a named style (#12295 removes it). No API or theme change.Evidence
listEdge.test.tsxfails on main (rows are not flush) and passes here.MarkdownListBounds.a11y.chromium.spec.tschecks in Chromium that each list stays inside the paragraph column at 390px, LTR and RTL, and that the page does not scroll sideways.Scope
Components: Markdown
Testing
vitest run packages/core/src/Markdown packages/core/src/List packages/core/src/CheckboxList: 64 files, 1799 tests pass; the new unit test adds 3.tsc --noEmitinpackages/coreis clean.storybook buildcrashed on the machines used); it relies on CI.