Skip to content

style(markdown): align accordion groups with mintlify - #497

Merged
gitfromwildan merged 1 commit into
mainfrom
refactor/markdown-accordion-groups
Nov 7, 2026
Merged

gitfromwildan merged 1 commit into
mainfrom
refactor/markdown-accordion-groups

Conversation

@gitfromwildan

@gitfromwildan gitfromwildan commented Nov 7, 2026 •

Copy link
Copy Markdown
Member

Summary

Accordion groups now render as one connected, rounded container with thin row dividers instead of separate spaced cards.

Changes

  • Refresh shared borders, header typography, icon sizing and content spacing; keep standalone accordions visually consistent.
  • Add hover and keyboard focus styling, respect reduced-motion preferences, and contain long content on narrow screens.
  • Preserve the existing one-open-panel group behavior and ARIA relationships; add interaction regression coverage.
  • Include a patch changeset for @docubook/markdown.

Verification

  • Accordion, accordion-group and nested code-block regression suites: 12 tests passed.
  • pnpm --filter @docubook/markdown typecheck and pnpm --filter @docubook/markdown build passed.
  • Pre-commit formatter and Oxlint passed.
  • Pre-push hooks passed: workspace lint, workspace build (7 successful tasks), and commitlint.
  • Browser checks passed for light/dark themes, desktop/mobile layout, shared borders and dividers, click/Enter/Space interaction, visible keyboard focus, reduced motion and horizontal overflow containment. Temporary preview server was stopped.

Agent Context

  • owner/repo: DocuBook/docubook
  • source: user-request | branch: refactor/markdown-accordion-groups | base: main
  • created-by: Codex (/root)
  • commit: f45da0b
  • evidence-ref: local verification output; /tmp/flame-accordion-build.log, /tmp/flame-accordion-verify.log, /tmp/flame-accordion-pr-push.log

@vercel

vercel Bot commented Nov 7, 2026

Copy link
Copy Markdown

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

1 Skipped Deployment
Project Deployment Actions Updated
docu Ignored Ignored Nov 7, 2026 9:17am UTC

@gitfromwildan gitfromwildan self-assigned this Nov 7, 2026

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No new issues found.

Reviewed changes

Mode: standard (this is a visual refresh of @docubook/markdown components, not on a senior-critical path). Overall assessment: READY. I reviewed the single commit that moves accordion groups to one shared bordered container with row dividers, plus the matching header, focus and motion styling.

  • Group container owns the frame: AccordionsMdx now has the border, 16px radius and overflow: hidden, and group items drop their own border and radius. Rows are separated by the adjacent-sibling border-top rule in styles.css.
  • Header and content restyle: the header is now transparent with weight 500 and inherits its font. The chevron and icon shrink to 1rem through the new .mdx-accordion-icon class. Long titles wrap with overflowWrap: anywhere, and content scrolls horizontally instead of overflowing.
  • Interaction styling: hover tint, an inset :focus-visible outline that stays inside the overflow: hidden frame, and a prefers-reduced-motion rule. Both !important uses are needed to override inline styles (background: transparent and the chevron transition).
  • Regression tests: these cover click/Enter/Space toggling, the aria-controls/aria-labelledby wiring, and one-open-panel behaviour in a group. I ran the Accordion, Accordions and CodeBlockBleed suites locally and all 12 tests passed. The phone code-block bleed exclusion still holds because accordions keep data-mdx-wrapper.

Top priorities: none blocking.

ℹ️ New .mdx-accordion-icon class is missing from the README class table

The README says every component has stable CSS class names you can target for overrides, and it lists all the other accordion classes. The new icon class this PR adds is not in that list, so anyone overriding the styles has no documented way to find it. This doesn't block the merge.

Technical details
# Document `.mdx-accordion-icon`

## Affected sites
- packages/markdown/README.md:147-152 — accordion class table lists `.mdx-accordion`, `-group`, `-group-item`, `-header`, `-chevron`, `-content` but not `-icon`

## Required outcome
- Add a `.mdx-accordion-icon` row (`Accordion`, "Optional Lucide icon wrapper in header") so the documented override surface matches `AccordionMdx.tsx:99`.

Pullfrog  | View workflow run | Using claude-opus-5-5 | 𝕏

@gitfromwildan
gitfromwildan merged commit f03c39f into main Nov 7, 2026
15 checks passed
@gitfromwildan
gitfromwildan deleted the refactor/markdown-accordion-groups branch November 7, 2026 09:19
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.

1 participant