Skip to content

feat: add toast alert system #210

Open
cheryl7114 wants to merge 5 commits into
serverlessworkflow:mainfrom
cheryl7114:toast-185
Open

feat: add toast alert system #210
cheryl7114 wants to merge 5 commits into
serverlessworkflow:mainfrom
cheryl7114:toast-185

Conversation

@cheryl7114

@cheryl7114 cheryl7114 commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

closes #185

Summary

This PR introduces a toast notification system with 4 different types of variants: Success, Error, Warning, and Info (default). Toasts are anchored to the top left of the screen.

Preview:
Screenshot 2026-06-29 at 2 25 46 p m
Screenshot 2026-06-29 at 2 26 41 p m

Cheryl Kong added 4 commits June 30, 2026 10:13
Signed-off-by: Cheryl Kong <cherylkong50@gmail.com>
Signed-off-by: Cheryl Kong <cherylkong50@gmail.com>
Signed-off-by: Cheryl Kong <cherylkong50@gmail.com>
Signed-off-by: Cheryl Kong <cherylkong50@gmail.com>
Copilot AI review requested due to automatic review settings June 30, 2026 09:32
@netlify

netlify Bot commented Jun 30, 2026

Copy link
Copy Markdown

Deploy Preview for swf-editor ready!

Name Link
🔨 Latest commit 5a46120
🔍 Latest deploy log https://app.netlify.com/projects/swf-editor/deploys/6a438fe755c3030008813065
😎 Deploy Preview https://deploy-preview-210--swf-editor.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds a toast notification system to surface operational failures (e.g., clipboard and download actions) and wires it into the diagram editor UI.

Changes:

  • Introduces a global toast store (useToast) and UI renderer (Toaster) based on Radix Toast primitives.
  • Updates Mermaid export actions to show success/error toasts and expands unit tests to cover those cases.
  • Adds a minimap toggle control button in the React Flow controls (currently duplicated—see review comments).

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
packages/serverless-workflow-diagram-editor/tests/side-panel/MermaidActions.test.tsx Adds toast-related assertions for copy/download success & failure flows.
packages/serverless-workflow-diagram-editor/src/side-panel/MermaidActions.tsx Emits toast notifications for clipboard and download outcomes.
packages/serverless-workflow-diagram-editor/src/react-flow/diagram/Diagram.tsx Adds an additional minimap toggle control button (currently duplicates existing one).
packages/serverless-workflow-diagram-editor/src/i18n/locales/en.ts Adds toast-related translation strings.
packages/serverless-workflow-diagram-editor/src/hooks/useToast.ts Implements a lightweight global toast store + helper function.
packages/serverless-workflow-diagram-editor/src/diagram-editor/DiagramEditor.tsx Mounts the toast provider + toaster at the editor level.
packages/serverless-workflow-diagram-editor/src/components/ui/toast.tsx Implements toast rendering (variants, icons, viewport positioning).
.changeset/toast-alerts.md Declares a minor version bump for the toast feature.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread packages/serverless-workflow-diagram-editor/src/react-flow/diagram/Diagram.tsx Outdated
Signed-off-by: Cheryl Kong <cherylkong50@gmail.com>

@fantonangeli fantonangeli left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

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.

feat: Add reusable error toast for failure feedback

3 participants