Skip to content

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

Merged
ghostdevv merged 1 commit intonpmx-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 intonpmx-dev:mainfrom
Adebesin-Cell:fix/readme-summary-heading-inline

Conversation

@Adebesin-Cell
Copy link
Copy Markdown
Contributor

@Adebesin-Cell Adebesin-Cell commented Apr 20, 2026

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.

Closes npmx-dev#2596

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel bot commented Apr 20, 2026

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

Project Deployment Actions Updated (UTC)
npmx.dev Ready Ready Preview, Comment Apr 20, 2026 1:42pm
2 Skipped Deployments
Project Deployment Actions Updated (UTC)
docs.npmx.dev Ignored Ignored Preview Apr 20, 2026 1:42pm
npmx-lunaria Ignored Ignored Apr 20, 2026 1:42pm

Request Review

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 20, 2026

📝 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 name Status Explanation
Linked Issues check ✅ Passed The 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 ✅ Passed All changes in app/components/Readme.vue are directly scoped to fixing the collapsible summary heading rendering issue; no unrelated modifications are present.
Title check ✅ Passed The 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 ✅ Passed The 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
Copy link
Copy Markdown

codecov bot commented Apr 20, 2026

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-Cell Adebesin-Cell changed the title fix(readme): inline headings inside collapsible summaries fix(ui): inline headings inside collapsible summaries Apr 20, 2026
@ghostdevv ghostdevv added this pull request to the merge queue Apr 20, 2026
Merged via the queue into npmx-dev:main with commit 8117059 Apr 20, 2026
24 of 26 checks passed
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.

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

2 participants