Skip to content

✨(toast) add new Toast component - #279

Open
Ovgodd wants to merge 20 commits into
mainfrom
feat/new-toast-ui
Open

Ovgodd wants to merge 20 commits into
mainfrom
feat/new-toast-ui

Conversation

@Ovgodd

@Ovgodd Ovgodd commented Jul 7, 2026 •

Copy link
Copy Markdown
Collaborator

Purpose

Adapt the existing Toast to the new Figma design, using react-toastify under the hood.

The public API stays the same (useToastProvider, toast(message, type, options), current props). New features are additive (progress, structured actions, toastExtended, updateToast, dismissToast).

Two variants

  • Simple , one line, optional icon, progress, See/Cancel actions
  • Extended , file list with transfer status, summary bar, collapse/expand

Lien maquettes : ici

toast.mp4

Apps keep wrapping with CunninghamProvider / ToastProvider and calling toast() as today. Nothing to migrate.

Proposal

  • Install react-toastify
  • Keep useToastProvider / ToastProvider and delegate the lifecycle to react-toastify
  • Refresh the simple toast UI (Cunningham semantic tokens, borderless actions)
  • Add progress, structured actions, toastExtended, updateToast, dismissToast
  • Storybook stories + Docs (existing examples kept, new ones added)

@Ovgodd
Ovgodd marked this pull request as draft July 7, 2026 10:07
@Ovgodd Ovgodd changed the title Feat/new toast UI ✨(toast) add new Toast component Jul 7, 2026
@Ovgodd
Ovgodd force-pushed the feat/new-toast-ui branch 2 times, most recently from da06727 to 90e3e6b Compare July 7, 2026 12:18
@Ovgodd
Ovgodd requested a review from NathanVss July 7, 2026 13:02
@Ovgodd Ovgodd self-assigned this Jul 7, 2026
@Ovgodd Ovgodd added the enhancement New feature or request label Jul 7, 2026
@Ovgodd
Ovgodd marked this pull request as ready for review July 7, 2026 13:02
@Ovgodd
Ovgodd force-pushed the feat/new-toast-ui branch 3 times, most recently from 68d58d6 to 0a4a2fd Compare August 25, 2026 10:58
@Ovgodd
Ovgodd force-pushed the feat/new-toast-ui branch 3 times, most recently from 442b2dd to 3475255 Compare September 15, 2026 09:41

@PanchoutNathan PanchoutNathan left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Hi! Thanks for the work! There are a few minor UX issues. Currently, I feel like the icons aren't quite right. The neutral variant is white. The info is labeled "brand," but I don't think we're actually using the brand. Is the notification's display direction configurable? The progress bar is now useless since we're no longer including it. The height of the Toast isn't consistent depending on whether there are buttons or not. I'm wondering if there should be some standardization between Alerts and Toasts, at least in terms of content.

Image

@Ovgodd
Ovgodd force-pushed the feat/new-toast-ui branch 4 times, most recently from 50b96bf to 3cbb432 Compare September 17, 2026 14:47
Comment thread packages/ui-components/src/components/toast/ToastExtendedContent.tsx Outdated
Comment on lines +34 to +40
<span className="c__toast-extended__item-status">
{item.status === "completed" ? (
<CircleCheckFilled size={16} />
) : (
<Loader size={16} className="c__toast-extended__item-loader" />
)}
</span>

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

The completed and loading states are represented only by unnamed SVGs. Chromium's accessibility tree exposes the file title and an unnamed image, but no transfer state. Please provide a localized status text, visually hidden if necessary, and make the icons decorative.

Comment thread packages/ui-components/src/components/toast/ToastExtendedContent.tsx Outdated
Comment thread packages/ui-components/src/components/toast/ToastExtendedContent.tsx Outdated
Comment thread packages/ui-components/src/components/toast/ToastProvider.tsx Outdated
Comment thread packages/ui-components/src/components/toast/index.tsx
Comment thread packages/ui-components/src/components/toast/index.scss
Comment thread packages/ui-components/src/components/alert/Utils.tsx Outdated
@@ -0,0 +1,94 @@
/**

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

To delete

@Ovgodd
Ovgodd force-pushed the feat/new-toast-ui branch 3 times, most recently from 42bd471 to a0f6cf2 Compare September 21, 2026 12:18
@Ovgodd
Ovgodd force-pushed the feat/new-toast-ui branch 2 times, most recently from 4326494 to 6c01982 Compare September 24, 2026 08:10
@Ovgodd Ovgodd mentioned this pull request Sep 24, 2026
2 tasks
@Ovgodd
Ovgodd force-pushed the feat/new-toast-ui branch 2 times, most recently from 79eed8a to 2e9ab3a Compare October 5, 2026 21:55
@Ovgodd
Ovgodd force-pushed the feat/new-toast-ui branch from 2e9ab3a to dfa25fd Compare October 5, 2026 22:00
Comment thread packages/ui-components/src/components/notification/NotificationContent.tsx Outdated
Comment thread packages/ui-components/src/components/toast/index.tsx
Comment thread packages/ui-components/src/components/toast/index.tsx Outdated
Comment thread packages/ui-components/src/components/toast/index.tsx Outdated
Comment thread packages/ui-components/src/components/toast/index.tsx Outdated
Comment thread packages/ui-components/src/components/notification/NotificationContent.tsx Outdated
Comment thread packages/ui-components/src/components/notification/NotificationContent.tsx Outdated
Comment thread packages/ui-components/src/components/toast/index.scss Outdated
Comment thread packages/ui-components/src/components/alert/Utils.tsx Outdated
Comment thread packages/ui-components/src/components/notification/content.spec.tsx Outdated
Ovgodd added 4 commits October 6, 2026 12:06
Move the alert message row (icon, message, labelled buttons, close button)
into an internal NotificationContent component, prefixed by the BEM block of
the component embedding it. AlertProps now extends the exported
NotificationProps. The markup, the buttons and the styles are unchanged, so
the alert looks exactly the same.
Give the alert its new look: full tint, 8px radius, 24px icon, 14px text and
8px padding. The labelled buttons become borderless 32px buttons tinted with
the variant, info uses the brand palette and neutral gets its own variant.
The theme override in alert.scss is gone.

NotificationContent gains the props behind it: actions as a list of
{ label, onClick } descriptors, hideIcon, and an icon moved after the message
when it is interactive. On mobile, the actions wrap under the message,
centered, with the close button kept top-right.
Install react-toastify and rebuild the toast on it. The toast keeps the
current call site and gains a position, live updates through updateToast and
its own lifecycle when mounted alone. It renders its message row through
NotificationContent, like the alert, and is centered on mobile whatever its
position.

The old ProgressBar exported by the toast goes away with it. Its replacement
comes in the next commit.
Add a standalone ProgressBar, in the brand color, with its own tokens. It
replaces the one the old toast used to export.
@Ovgodd
Ovgodd force-pushed the feat/new-toast-ui branch from dfa25fd to 36aa923 Compare October 6, 2026 10:21
@Ovgodd
Ovgodd force-pushed the feat/new-toast-ui branch from 4bf8f2b to dfa61dd Compare October 6, 2026 12:11
@Ovgodd
Ovgodd requested a review from PanchoutNathan October 7, 2026 09:02

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants