Flagsmith / Flagsmith/flagsmith

Remove @material-ui/core dependency from AccordionCard

Open
#7,021 0 comments 0 reactions 0 assignees View on GitHub
front-end tech-debt
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.