Skip to content

feat(dify-ui): add Alert - #45266

Merged
lyzno1 merged 1 commit into
mainfrom
yyh/snp-1035-dify-ui-alert
Nov 2, 2026
Merged

lyzno1 merged 1 commit into
mainfrom
yyh/snp-1035-dify-ui-alert

Conversation

@lyzno1

@lyzno1 lyzno1 commented Nov 1, 2026 •

Copy link
Copy Markdown
Member
  • Add @langgenius/dify-ui/alert: Alert, AlertTitle, AlertDescription, AlertActions, AlertClose, following the Dify Design Kit Alert (in-page Toast Small surface)
  • type (info / success / warning / error) sets the icon, halo, and default role (alert for errors, status otherwise); the icon cannot be replaced
  • Buttons sit in AlertActions below the text; AlertClose is a stateless close button on the right that requires a translated name
  • Stories (with the usage boundary in the component description) and a role test
  • shadcn/no-restyle contract: callers may only place and size Alert; the parts keep their own typography, spacing and position

Fixes SNP-1035

@github-actions github-actions Bot added the web This relates to changes on the web. label Nov 1, 2026
@lyzno1
lyzno1 added this pull request to stack #45269 November 1, 2026 15:16
@github-actions github-actions Bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Nov 1, 2026
@codecov

codecov Bot commented Nov 1, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 50.00000% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 89.85%. Comparing base (a79e211) to head (99f6316).

Files with missing lines Patch % Lines
packages/dify-ui/src/alert/index.tsx 50.00% 6 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main   #45266   +/-   ##
=======================================
  Coverage   89.85%   89.85%           
=======================================
  Files        6251     6252    +1     
  Lines      398214   398226   +12     
  Branches    80249    80250    +1     
=======================================
+ Hits       357831   357844   +13     
+ Misses      34072    34071    -1     
  Partials     6311     6311           
Flag Coverage Δ
cli 94.26% <ø> (ø)
dify-ui 92.39% <50.00%> (-0.26%) ⬇️
web 89.84% <ø> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@lyzno1
lyzno1 force-pushed the yyh/snp-1035-dify-ui-alert branch 5 times, most recently from a69eed7 to e3cce28 Compare November 1, 2026 15:50
@lyzno1
lyzno1 force-pushed the yyh/snp-1035-dify-ui-alert branch from e3cce28 to 99f6316 Compare November 1, 2026 16:00
@lyzno1
lyzno1 marked this pull request as ready for review November 2, 2026 01:57
@lyzno1
lyzno1 requested a review from hyoban as a code owner November 2, 2026 01:57
@lyzno1
lyzno1 added this pull request to the merge queue Nov 2, 2026
Merged via the queue into main with commit 93891d0 Nov 2, 2026
58 of 59 checks passed
@lyzno1
lyzno1 deleted the yyh/snp-1035-dify-ui-alert branch November 2, 2026 02:05
@laipz8200 laipz8200 mentioned this pull request Nov 3, 2026
1 task done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L This PR changes 100-499 lines, ignoring generated files. web This relates to changes on the web.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants