Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat: migrate Alert component from MUI to shadcn#18412

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
blink-so wants to merge1 commit intomain
base:main
Choose a base branch
Loading
fromfeat/migrate-alert-to-shadcn

Conversation

blink-so[bot]
Copy link
Contributor

Summary

This PR migrates the Alert component from MUI to shadcn implementation while maintaining full backward compatibility with the existing API.

Changes

Core Alert Component

  • Replaced MUI Alert with shadcn-based implementation usingclass-variance-authority
  • Maintained backward compatibility with all existing props:
    • severity (info, success, warning, error)
    • dismissible for showing dismiss button
    • actions for custom action buttons
    • onDismiss callback
  • Added proper Tailwind CSS styling with dark mode support
  • Preserved accessibility features withrole="alert"
  • Kept smooth animations using MUI Collapse for consistency

Updated Imports

Updated 6 files that were importingAlertTitle from MUI to use our new implementation:

  • ChangeWorkspaceVersionDialog.tsx
  • ProvisionerAlert.tsx
  • GitDeviceAuth.tsx
  • OverviewPageView.tsx
  • Workspace.tsx
  • SetupPageView.tsx

Benefits

  • Zero breaking changes - all existing usage works without modification
  • Modern styling with Tailwind CSS instead of MUI styling system
  • Better customization through shadcn design system
  • Consistent with other shadcn components in the codebase
  • Improved maintainability with cleaner component structure

Testing

The component maintains the exact same API as before, so all existing tests should continue to pass. The styling has been updated to use Tailwind classes with proper color variants for each severity level.

Files Changed

  • site/src/components/Alert/Alert.tsx - Main Alert component migration
  • site/src/components/Alert/ErrorAlert.tsx - Updated import
  • 6 other files - Updated AlertTitle imports

This migration aligns with the project's move towards shadcn components and provides a more maintainable and customizable Alert system.

- Replace MUI Alert with shadcn-based implementation using class-variance-authority- Maintain backward compatibility with existing Alert API (severity, dismissible, actions, onDismiss)- Update AlertTitle imports across codebase to use new implementation- Add proper Tailwind CSS styling with dark mode support- Preserve accessibility features and smooth animations- Support all existing severity levels: info, success, warning, errorCo-authored-by: jaaydenh <1858163+jaaydenh@users.noreply.github.com>
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

0 participants

[8]ページ先頭

©2009-2025 Movatter.jp