Skip to content

Ensure stable responsive width for Accordion and safe Button links - #39

Merged
ribborges merged 3 commits into
mainfrom
fix/accordion-storybook-width
Aug 2, 2026
Merged

Ensure stable responsive width for Accordion and safe Button links#39
ribborges merged 3 commits into
mainfrom
fix/accordion-storybook-width

Conversation

@ribborges

Copy link
Copy Markdown
Owner

This pull request introduces two user-facing improvements to the jaci-ui package: it enhances the accessibility and server compatibility of Button links, and improves the responsive behavior of Accordions. Additionally, it includes supporting documentation and code updates to reflect these changes. The most significant updates are outlined below.

Button Link Improvements:

  • Updated the Button component to allow safe rendering as a link (<a>) from Next.js server components. The implementation ensures that when a Button is rendered as an anchor, it does not attach client-only event handlers during server render, and disables the link appropriately when needed. This improves server compatibility and accessibility for Button links. (packages/ui/src/components/button/button.tsx, .changeset/bright-buttons-link.md, fixtures/next/app/page.tsx, packages/ui/README.md) [1] [2] [3] [4] [5] [6]

Accordion Responsive Behavior:

  • Improved the Accordion component's root width handling to maintain a stable, responsive width when all panels are collapsed, preventing layout shifts. (.changeset/fresh-accordions-grow.md, apps/storybook/src/accordion.stories.tsx) [1] [2] [3]

Supporting Documentation and Maintenance:

  • Updated documentation and code samples to demonstrate the improved Button link usage in server components. (packages/ui/README.md, fixtures/next/app/page.tsx) [1] [2]
  • Refactored and reformatted the docs/api-contract/0.9.0.json file for consistency, expanding single-line arrays to multi-line format for better readability. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16] [17] [18] [19] [20] [21] [22]
  • Removed outdated references to the Button component in client boundary and API contract files, aligning with the new server-compatible rendering approach. (packages/ui/scripts/verify-client-boundaries.mjs, docs/api-contract/0.9.0.json) [1] [2]

@ribborges ribborges self-assigned this Aug 1, 2026
@ribborges
ribborges merged commit c492634 into main Aug 2, 2026
8 checks passed
@ribborges
ribborges deleted the fix/accordion-storybook-width branch August 4, 2026 17:40
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