Flagsmith / Flagsmith/flagsmith
Remove @material-ui/core dependency from AccordionCard
- Dominant language
- Python
- Stars
- 6.6k
- Forks
- 567
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 121
Description
## Problem
`@material-ui/core` is used across **4 files** (not just AccordionCard as originally reported):
| File | Imports |
|------|---------|
| `AccordionCard.tsx` | `Collapse`, `IconButton` |
| `EventTextBlocks.tsx` | `Collapse` |
| `ChipInput.tsx` | `Chip` |
| `SegmentSelect.tsx` | `SelectProps` (type-only) |
Additionally, `material-ui-chip-input` has a transitive dependency on `@material-ui/core`.
## Solution
1. Replace `Collapse` with a CSS transition or native ``/`` (2 files)
2. Replace `IconButton` with our own `Button` with `theme="icon"` (1 file)
3. Replace `Chip` with a lightweight styled component (1 file)
4. Replace `SelectProps` type import with our own type definition (1 file)
5. Handle `material-ui-chip-input` transitive dependency
6. Remove `@material-ui/core` from `package.json`
## Acceptance criteria
- [ ] All 4 files migrated off `@material-ui/core`
- [ ] `material-ui-chip-input` transitive dependency handled
- [ ] `@material-ui/core` removed from dependencies
- [ ] No visual regressions
---
Part of the Design System Audit (#6606) · Epic: #6882
Contributor guide
Assessment
This issue has not been assessed yet.