Repository navigation
fix(Markdown): preserve list structure for mixed task and bullet lists (#6330) - #6424
Open
ManoharPaturi wants to merge 1 commit into
Open
ManoharPaturi wants to merge 1 commit into
ManoharPaturi wants to merge 1 commit into
Conversation
facebook#6330) When rendering lists containing both task items and ordinary bullet or numbered items, isTaskList evaluated to false because it required all items to have checkboxes. This caused the whole block to fall back to a plain List, completely dropping task state and flattening checkboxes to plain bullets. Following maintainer guidance on facebook#6330, mixed lists now preserve the containing List structure and render each item according to its own marker. ListItem supports a marker override so task items can suppress the default bullet or counter and display a read-only CheckboxInput in startContent, while ordinary list items continue to display their standard bullet or decimal marker. Signed-off-by: Manohar Paturi <186662190+ManoharPaturi@users.noreply.github.com>
ManoharPaturi
requested review from
cixzhang,
imdreamrunner and
josephfarina
as code owners
September 21, 2026 18:20
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
Contributor
PR Analysis Report📚 Storybook PreviewView Storybook for this PR 🧪 Sandbox PreviewView Sandbox for this PR No new or modified components detected. Bundle Size Summary
Accessibility AuditStatus: 36 accessibility violation(s) found — 2 critical, 34 serious. Button pattern - 1 issue(s)
ChatComposer - 1 issue(s)
ChatComposerInput - 1 issue(s)
ChatReasoning - 1 issue(s)
ChatToolCalls - 1 issue(s)
Checkbox pattern - 1 issue(s)
CheckboxList - 1 issue(s)
ClickableCard - 1 issue(s)
CodeEditor - 1 issue(s)
CodeEditorPerf - 1 issue(s)
CodeEditorTheme - 1 issue(s)
CodeTheme - 1 issue(s)
DateRangeInput - 1 issue(s)
FileInput - 1 issue(s)
GridMasonry - 1 issue(s)
Heading - 1 issue(s)
Icon - 1 issue(s)
LogStream - 1 issue(s)
MediaTheme Auto - 1 issue(s)
PowerSearch - 1 issue(s)
ProgressBar - 1 issue(s)
Radio group pattern - 1 issue(s)
RadioList - 1 issue(s)
RichTextEditor - 2 issue(s)
SelectableCard - 1 issue(s)
Stepper - 1 issue(s)
TableGroupedRows - 1 issue(s)
TableTree - 1 issue(s)
Text - 1 issue(s)
Theme - 1 issue(s)
PopArt - 1 issue(s)
Thumbnail - 1 issue(s)
Timestamp - 1 issue(s)
Token - 1 issue(s)
Tokenizer - 1 issue(s)
Visual RegressionStatus: No visual change across 6 compared shot(s). Generated by PR Enrichment workflow | Storybook | Sandbox | View full report |
There was a problem hiding this comment.
Mixed task/plain Markdown lists now preserve their containing list and per-item checked state, but two blockers remain:
- The new public
ListItem.markerprop has no current List/ListItem contract. Approval is waiting for a maintainer to provide or identify the governing spec for custom-marker and marker-suppression semantics, or to keep that mechanism internal to the Markdown restoration. - In mixed lists, every task checkbox is exposed to assistive technology as “Task list” instead of its visible item text, so multiple tasks are indistinguishable. Please associate each checkbox with its item label and add a regression assertion for multiple and nested mixed task items.
[Automated review]
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
User impact
When a Markdown document contains a list with both task items and ordinary bullet or numbered items, the entire list currently flattens to plain bullets, dropping all checkboxes and checked states.
Problem and solution fit
CommonMark defines the containing list structure, while task list markers are a GFM extension applied per item. Previously, Markdown checked whether every item in the list block possessed a checked state via node.children.every(item => item.checked != null). A mixed block failed this check and fell back to a plain List, which rendered every child with plain ListItem bullets and omitted the task markers.
Following maintainer direction on issue #6330, mixed lists now preserve the containing List structure and render each item according to its own marker. ListItem exposes a marker override prop forwarding to Item so task items can suppress the default bullet or decimal counter with marker={null} and render a read-only CheckboxInput in startContent. Ordinary list items continue rendering their standard bullet or decimal marker.
Expected behavior and authority
Closes #6330
Smallest restoration
ListItemProps and ListItem.tsx add the optional marker prop to override or suppress default list markers.
ListItem.doc.mjs documents the marker prop.
Markdown.tsx renders task items within List blocks using marker={null} and a compact read-only CheckboxInput in startContent.
Markdown.test.tsx adds tests for mixed task and bullet lists, as well as nested task items in ordinary lists.
List.test.tsx adds unit tests for marker suppression and custom marker overrides.
Testing
pnpm vitest run packages/core/src/Markdown/Markdown.test.tsx passed all 82 tests.
pnpm vitest run packages/core/src/List/List.test.tsx passed all 58 tests.
Pre-commit checks passed clean: check:sync, check:changesets, check:demo-media, check:i18n-catalog, check:fixtures, check:setup-contract.
Changeset markdown-mixed-task-list.md included.