Skip to content

feat: add dismissible option to progress toasts#1056

Merged
tenphi merged 6 commits intomainfrom
fix-toast-overlay-zindex
Feb 26, 2026
Merged

feat: add dismissible option to progress toasts#1056
tenphi merged 6 commits intomainfrom
fix-toast-overlay-zindex

Conversation

@tenphi
Copy link
Copy Markdown
Member

@tenphi tenphi commented Feb 26, 2026

Note

Medium Risk
Medium risk: introduces a breaking prop rename (isDismissibleisDismissable) and changes overlay notification/toast lifecycle behavior (restore, in-place updates, z-index), which could affect UI stacking and dismissal/persistence edge cases.

Overview
Adds an isDismissable option to progress toasts, showing a temporary Hide action during loading, and updates progress toasts in-place via updateToast to avoid unnecessary exit/enter animations when content changes.

Renames isDismissibleisDismissable across Banner and Notification (docs/stories/tests included), and adds notification restore support: actions now dismiss immediately, but if an async onPress returns false the notification is restored, including undoing any persistent side effects.

Also removes legacy notification CSS from GlobalStyles and lowers the overlay container zIndex (10000→100).

Written by Cursor Bugbot for commit 3c03ae9. This will update automatically on new commits. Configure here.

Add ability to restore dismissed notifications when async actions return false.
This allows notifications to reappear if an action (e.g., opening a confirmation
dialog) is cancelled by the user.

Made-with: Cursor
Update progress toasts in-place instead of removing and re-adding,
preventing unnecessary exit/enter animations when data changes.

Made-with: Cursor
Add isDismissible option that shows a 'Hide' action button during loading,
allowing users to temporarily dismiss progress toasts. The toast will not
re-appear during the same loading cycle after being dismissed.

Made-with: Cursor
@vercel
Copy link
Copy Markdown

vercel Bot commented Feb 26, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
cube-ui-kit Ready Ready Preview, Comment Feb 26, 2026 5:57pm
cube-ui-kit-cursor Ready Ready Preview, Comment Feb 26, 2026 5:57pm

Request Review

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Feb 26, 2026

🦋 Changeset detected

Latest commit: 3c03ae9

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

This PR includes changesets to release 1 package
Name Type
@cube-dev/ui-kit Minor

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
Copy link
Copy Markdown
Contributor

github-actions Bot commented Feb 26, 2026

📦 NPM canary release

Deployed canary version 0.0.0-canary-9583469.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Feb 26, 2026

🏋️ Size limit report

Name Size Passed?
All 356.75 KB (+0.05% 🔺) Yes 🎉
Tree shaking (just a Button) 60.52 KB (0% 🟰) Yes 🎉
Tree shaking (just tasty) 36.78 KB (0% 🟰) Yes 🎉

Click here if you want to find out what is changed in this build

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Feb 26, 2026

🧪 Storybook is successfully deployed!

Comment thread src/components/overlays/Notifications/NotificationAction.tsx
Comment thread src/components/overlays/Notifications/use-persistent-state.ts
Comment thread src/components/overlays/Notifications/OverlayContainer.tsx
Comment thread src/components/overlays/Toast/useProgressToast.tsx
Comment thread src/components/overlays/Notifications/use-notification-state.ts
Rename isDismissible prop to isDismissable across Banner and Notification
components to match the naming convention used in Dialog, LayoutPanel, and
other components. This is a breaking change documented in changeset.

Made-with: Cursor
Copy link
Copy Markdown
Contributor

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Comment thread src/components/overlays/Notifications/use-notification-state.ts
@tenphi tenphi merged commit fada43b into main Feb 26, 2026
17 checks passed
@tenphi tenphi deleted the fix-toast-overlay-zindex branch February 26, 2026 18:14
@github-actions github-actions Bot mentioned this pull request Feb 26, 2026
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.

1 participant