Skip to content
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

feat: Unify Alert and Banner under a single Banner component with new designs #855

Merged
merged 7 commits into from
Jan 7, 2025

Conversation

pedroalves0
Copy link
Member

@pedroalves0 pedroalves0 commented Dec 26, 2024

Short description

Recently, in the "Downgrade" squad, the team put together new designs that included banners that didn't match the current version of the banner component in Reactist. The design team has since updated the design system product library, and we're now ready on the frontend side to implement those changes.

Although not strictly necessary, we're taking this opportunity to unify the Alert and the Banner components under a single component, as in the design system library, there's only a "Banner" component, and both have similar use cases.

One caveat is that the banner variant with an image is not responsive. I tried to implement a CSS-only solution but wasn't successful; we might have to resort to using JavaScript. That said, there aren't any instances of the new variant in our apps, so I propose revisiting this limitation in the future, if necessary.

Figma ref
Twist: Banner Component

PR Checklist

  • Added tests for bugs / new features
  • Updated docs (storybooks, readme)
  • Executed npm run validate and made sure no errors / warnings were shown
  • Described changes in CHANGELOG.md
  • Bumped version in package.json and package-lock.json (npm --no-git-tag-version version <major|minor|patch>) ref
  • Reviewed and approved Chromatic visual regression tests in CI

📸 Demo

CleanShot.2024-12-26.at.15.59.56.mp4

Versioning

Major - Breaking change as the Banner API is changing and Alert is removed.

@pedroalves0 pedroalves0 requested a review from a team December 26, 2024 18:03
@pedroalves0 pedroalves0 self-assigned this Dec 26, 2024
@pedroalves0 pedroalves0 requested review from Bloomca and removed request for a team December 26, 2024 18:03
Copy link
Contributor

@Bloomca Bloomca left a comment

Choose a reason for hiding this comment

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

Left a few small comments, looks good!

src/banner/promo-image.tsx Outdated Show resolved Hide resolved
src/icons/banner-icon.tsx Show resolved Hide resolved
src/banner/banner.tsx Outdated Show resolved Hide resolved
src/banner/banner.tsx Outdated Show resolved Hide resolved
@pedroalves0 pedroalves0 merged commit 663458d into main Jan 7, 2025
5 checks passed
@pedroalves0 pedroalves0 deleted the pedroa/new-banner branch January 7, 2025 10:52
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.

2 participants