Skip to content

Conversation

CON3JITO
Copy link

@CON3JITO CON3JITO commented Oct 7, 2025

Changelog

New

  • Content-length–based wrapping logic: Introduced a new getContentLength function in Banner.tsx to help determine when action buttons should wrap in banners without titles or dismiss buttons.
  • Added new Storybook variants (WithHiddenTitleAndActionsShort, WithHiddenTitleAndActionsLong) to demonstrate and test different wrapping scenarios when titles are hidden or absent.
  • Registered new stories in Banner.docs.json to ensure documentation accurately reflects responsive wrapping behavior.

Changed

  • Banner layout and wrapping logic updated:
    • Banner.module.css now uses container queries and more targeted selectors to handle wrapping based on presence/absence of titles and dismiss buttons.
    • Banners with titles always wrap action buttons for better readability.
    • Banners without titles or dismiss buttons now use container queries (plus getContentLength) for responsive wrapping.
  • CSS and layout refactoring:
    • Updated Banner.module.css to use container queries instead of broader media queries.
    • Refined selector specificity for more consistent wrapping behavior and button alignment across screen sizes.
  • Documentation and Storybook refined to showcase updated wrapping rules across different layouts and screen sizes.

Removed

  • Removed older CSS selectors and media query rules that previously controlled wrapping behavior.
  • Removed reliance on less specific selectors in Banner.module.css, consolidating layout rules under container query–driven logic.

demo

Screen.Recording.2025-10-08.at.1.43.15.PM.mov

Rollout strategy

  • Patch release
  • Minor release
  • Major release; if selected, include a written rollout or migration plan
  • None; if selected, include a brief description as to why

Testing & Reviewing

Merge checklist

Copy link

changeset-bot bot commented Oct 7, 2025

🦋 Changeset detected

Latest commit: c2e3524

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@primer/react Patch
@primer/styled-react Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions github-actions bot added the integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm label Oct 7, 2025
Copy link
Contributor

github-actions bot commented Oct 7, 2025

👋 Hi, this pull request contains changes to the source code that github/github depends on. If you are GitHub staff, we recommend testing these changes with github/github using the integration workflow. Thanks!

@github-actions github-actions bot requested a deployment to storybook-preview-6961 October 8, 2025 18:51 Abandoned
@github-actions github-actions bot temporarily deployed to storybook-preview-6961 October 8, 2025 19:00 Inactive
@github-actions github-actions bot temporarily deployed to storybook-preview-6961 October 8, 2025 20:41 Inactive
@primer-integration
Copy link

👋 Hi from github/github-ui! Your integration PR is ready: https://github.com/github/github-ui/pull/4118

@github-actions github-actions bot added integration-tests: failing Changes in this PR cause breaking changes in gh/gh and removed integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm labels Oct 8, 2025
@primer-integration
Copy link

🔴 ci completed with status failure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
integration-tests: failing Changes in this PR cause breaking changes in gh/gh
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant