-
Notifications
You must be signed in to change notification settings - Fork 636
improve banner wrapping behavior #6914
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
🦋 Changeset detectedLatest commit: 7c6a33d The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
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 |
👋 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! |
🟢 ci completed with status |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR improves the Banner component's wrapping behavior and layout flexibility, particularly for variants with hidden titles and actions. The changes address layout issues when banner content needs to wrap or when actions are displayed alongside content of varying lengths.
- Updated CSS styling to improve flex layout, alignment, and container queries for better responsiveness
- Added new story variant for short messages with hidden titles and actions
- Updated test coverage to include the new story variant and reflect story name changes
Reviewed Changes
Copilot reviewed 5 out of 31 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
packages/react/src/Banner/Banner.module.css | Updated flex layout, alignment properties, and container queries to improve banner wrapping behavior |
packages/react/src/Banner/Banner.features.stories.tsx | Added new short message story and renamed existing long message story for better test coverage |
packages/react/src/Banner/Banner.docs.json | Updated documentation references to reflect story name changes |
e2e/components/Banner.test.ts | Added test coverage for new story variant and updated existing test references |
.changeset/cold-papers-say.md | Added changeset entry for the patch release |
👋 Hi, there are new commits since the last successful integration test. We recommend running the integration workflow once more, unless you are sure the new changes do not affect github/github. Thanks! |
👋 Hi from github/github-ui! Your integration PR is ready: https://github.com/github/github-ui/pull/3444 |
Changelog
New
This pull request updates the Banner component's stories and refines its layout and styling to better support variants with hidden titles and actions. The changes include adding a new story for a short message variant, renaming an existing stories, and making several CSS adjustments to improve layout flexibility and responsiveness.
before demo
before.mov
after demo
after.mov
New Banner Variants and Test Coverage:
WithHiddenTitleAndActionsShort
and renamed the existingWithHiddenTitleAndActions
story toWithHiddenTitleAndActionsLong
inBanner.features.stories.tsx
to provide better coverage for banners with hidden titles and varying action/description lengths.Banner.test.ts
to include the newWithHiddenTitleAndActionsShort
story and reflect the renaming of the long variant, ensuring both are tested across small viewports.Changed
.BannerContainer
and.BannerContent
inBanner.module.css
to improve alignment, wrapping, and max-width handling, especially when the title is hidden or actions are present. This includes changes to flex/grid usage and container alignment for better responsiveness. [.BannerActions
CSS to control the display of primary actions based on their position (leading/trailing) and to prevent shrinking, ensuring consistent action button placement.Removed
Rollout strategy
Testing & Reviewing
Merge checklist