Skip to content

fix(PdfList): remove redundant flex wrapper in bullet variant to fix wrapped-text overlap#104

Draft
Copilot wants to merge 2 commits intomainfrom
copilot/fix-pdf-list-item-overlap
Draft

fix(PdfList): remove redundant flex wrapper in bullet variant to fix wrapped-text overlap#104
Copilot wants to merge 2 commits intomainfrom
copilot/fix-pdf-list-item-overlap

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 5, 2026

In the bullet variant, PDFText (already styled with flex: 1 via itemText) was wrapped in an extra <View style={{ flex: 1 }}>. This double flex: 1 nesting triggers a known Yoga/@react-pdf/renderer measurement bug where multi-line Text height is underestimated, causing subsequent bullet rows to overlap.

Changes

  • list.tsx — Remove the intermediate <View style={{ flex: 1 }}> in renderBulletItem; PDFText is now a direct sibling of the dot marker, matching the layout pattern of numbered, checklist, and icon variants:
// Before
<View style={{ flex: 1 }}>
  <PDFText style={styles.itemText}>{item.text}</PDFText>
</View>

// After
<PDFText style={styles.itemText}>{item.text}</PDFText>
  • public/r/list.json — Registry JSON updated to reflect the same fix.
  • list.test.tsx — Added tests for bullet variant with long wrapping text and nested children.

@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 5, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
pdfx Ready Ready Preview, Comment Apr 5, 2026 9:58am

Copilot AI changed the title [WIP] Fix overlapping bullet rows in PdfList rendering fix(PdfList): remove redundant flex wrapper in bullet variant to fix wrapped-text overlap Apr 5, 2026
Copilot AI requested a review from akii09 April 5, 2026 10:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

PdfList (bullet): wrapped list items overlap vertically due to flex on Text inside flex column

2 participants