[Feat] Add EuiBanner component#9673
Open
mgadewoll wants to merge 10 commits into
Open
Conversation
69eee87 to
d73c61e
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new EuiBanner announcement component to EUI, along with Storybook/docs coverage and i18n token wiring, to support full-width promotional/informational messaging similar to Kibana’s prior AnnouncementBanner.
Changes:
- Introduces
EuiBannercomponent implementation, styles, Storybook stories, and RTL unit tests - Adds new docs page for Banner and exposes the component via the public components index
- Updates i18n tokens and adds a changelog entry
Reviewed changes
Copilot reviewed 8 out of 17 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/website/docs/components/display/banner.mdx | Adds EuiBanner documentation, usage examples, and prop table |
| packages/eui/src/components/index.ts | Exports the new banner component entry point |
| packages/eui/src/components/banner/index.ts | Public export surface for EuiBanner and its props |
| packages/eui/src/components/banner/banner.tsx | Implements EuiBanner UI, actions, dismiss, and live announcement behavior |
| packages/eui/src/components/banner/banner.styles.ts | Emotion styles, including container-query based responsive layouts |
| packages/eui/src/components/banner/banner.stories.tsx | Storybook stories and interactive playground scenarios |
| packages/eui/src/components/banner/banner.test.tsx | RTL unit tests for rendering, props, actions, dismiss, and live region behavior |
| packages/eui/i18ntokens.json | Adds i18n token for the dismiss button aria-label (plus regen reordering) |
| packages/eui/changelogs/upcoming/9673.md | Changelog entry for new component |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Collaborator
💚 Build Succeeded
History
cc @mgadewoll |
Collaborator
💚 Build SucceededHistory
cc @mgadewoll |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds a new
EuiBannercomponent.This component is based on the previous Kibana custom implementation of
AnnouncementBanner(PR)API Changes
titlestringtextReactNodemediaReactNodesizes | mcolorhighlighted | plainhighlightedactionProps{ primary: EuiBannerActionPrimaryProps, secondary: EuiBannerActionSecondaryProps }undefinedonDismiss() => voidundefineddismissButtonPropsEuiButtonIconPropsundefinedEuiButtonIconheadingElementh2 | h3 | h4 | h5 | h6h2titleannounceOnMountbooleanfalsetrue, the content is announced by screen readers on mount.Screenshots
msImpact Assessment
Note: Most PRs should be tested in Kibana to help gauge their Impact before merging.
Impact level: 🟢 None
This is a new component that's not used so far.
ℹ️ Kibana is using the custom
AnnouncementBannercomponent, which we should update to returnEuiBannerinstead.Release Readiness
Migration guide: {steps or link, for breaking/visual changes or deprecations}Adoption plan (new features): {link to issue/doc or outline who will integrate this and where}QA instructions for reviewer
💻 EuiBanner storybook
EuiBannermatches design specsEuiBannerprops work as expectedChecklist before marking Ready for Review
Breaking changes: Addedbreaking changelabel (if applicable)Reviewer checklist