Skip to content

fix(ui): inline headings inside collapsible summaries - #2599

Merged
ghostdevv merged 1 commit into
npmx-dev:mainfrom
Adebesin-Cell:fix/readme-summary-heading-inline
Apr 20, 2026
Merged

fix(ui): inline headings inside collapsible summaries#2599
ghostdevv merged 1 commit into
npmx-dev:mainfrom
Adebesin-Cell:fix/readme-summary-heading-inline

Conversation

@Adebesin-Cell

@Adebesin-CellAdebesin-Cell commented Apr 20, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Markdown readmes commonly put headings inside <summary> (e.g. <summary><h5>...</h5></summary>). Because headings are block-level, the disclosure marker and the heading text wrapped onto two lines.
  • Inline headings and paragraphs that are direct children of <summary> so the marker sits next to the label. Heading font-size/weight are preserved (still comes from existing [data-level] rules), matching GitHub/JSR rendering.

Closes#2596

Reference of expected behavior: https://jsr.io/@nikelborm/fetch-github-folder

BEFORE

Screenshot 2026-04-20 at 14 42 31

AFTER

Screenshot 2026-04-20 at 14 43 03

Test plan

  • /package/fetch-github-folder → collapsed and expanded disclosures render on one line
  • Heading styling (size/weight) is still visually distinct from body text
  • Other readmes with plain-text summaries are unaffected

Markdown readmes often put headings inside <summary>, which renders the heading on its own line below the disclosure marker. Inline headings/paragraphs that are direct children of summary so the marker and label share a line, matching GitHub/JSR behavior.
Closesnpmx-dev#2596
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@vercel

vercelBot commented Apr 20, 2026

Copy link
Copy Markdown
Contributor

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

ProjectDeploymentActionsUpdated (UTC)
npmx.devReadyReadyPreview, CommentApr 20, 2026 1:42pm
2 Skipped Deployments
ProjectDeploymentActionsUpdated (UTC)
docs.npmx.devIgnoredIgnoredPreviewApr 20, 2026 1:42pm
npmx-lunariaIgnoredIgnoredApr 20, 2026 1:42pm

Request Review

@coderabbitai

coderabbitaiBot commented Apr 20, 2026

Copy link
Copy Markdown
Contributor
📝 Walkthrough

Walkthrough

Updated CSS styling in app/components/Readme.vue for details > summary elements to display immediate child headings (h1–h6) and paragraphs as inline elements with removed margins, allowing them to render on the same line as the disclosure marker.

Changes

Cohort / File(s)Summary
Readme component styling
app/components/Readme.vue
Added CSS rules to make immediate child headings and paragraphs within details > summary display as inline elements with zero margins, preventing line breaks between the disclosure marker and content.
🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check nameStatusExplanation
Linked Issues check✅ PassedThe pull request directly addresses issue #2596 by adding CSS rules to make headings and paragraphs inside summary elements render inline, matching the expected behaviour from GitHub and JSR.
Out of Scope Changes check✅ PassedAll changes in app/components/Readme.vue are directly scoped to fixing the collapsible summary heading rendering issue; no unrelated modifications are present.
Title check✅ PassedThe title clearly and concisely describes the main change: making headings inside collapsible summary elements display inline with the disclosure marker instead of on separate lines.
Description check✅ PassedThe pull request description clearly relates to the changeset. It explains the problem (headings in summary elements wrapping to two lines), the solution (making them inline), and provides before/after screenshots with test verification.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@codecov

codecovBot commented Apr 20, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

📢 Thoughts on this report? Let us know!

@Adebesin-CellAdebesin-Cell changed the title fix(readme): inline headings inside collapsible summariesfix(ui): inline headings inside collapsible summariesApr 20, 2026
@ghostdevv
ghostdevv added this pull request to the merge queueApr 20, 2026
Merged via the queue into npmx-dev:main with commit 8117059Apr 20, 2026
24 of 26 checks passed
@github-actionsgithub-actionsBot mentioned this pull request Apr 20, 2026
ayo-run pushed a commit to ayo-run/npmx.dev that referenced this pull request Aug 5, 2026
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for freeto 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.

Collapsible summaries involving headers are rendered on 2 lines instead of one

2 participants

@Adebesin-Cell@ghostdevv