Removal proposal: Deprecate `NavMenu` in favour of MUI's `Menu`

Aperta
#387 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
50/100
Tipo di issue
Refactoring
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
react, storybook, typescript
Ambito
frontend

Direzione di ricerca

The NavMenu and NavMenuLink component files and their exports are the entry point; the MuiMenu/MuiMenuItem overrides live in DiamondDSTheme. Step 1 is self-contained: add @deprecated JSDoc pointing to Menu with Button and MenuItem, tag the existing stories deprecated with a [DEP] marker in the sidebar, and add a changelog note. Done means the Storybook build passes and the sidebar shows the tag. Steps 2 and 3 depend on a maintainer decision, so confirm before starting them.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

needs-triage

Summary

We don't need our own NavMenu, because MUI's Menu can be overridden and extended through the theme.

NavMenu is a Button that opens a Menu, with a chevron, brand-coloured paper and link-styled items. We'll deprecate it first, then move its styling into the theme, then remove it.

Steps

Step What When
1. Mark as deprecated Add @deprecated JSDoc to NavMenu and NavMenuLink, pointing to Menu with a Button and MenuItem. Add a deprecated Storybook tag with a [DEP] marker in the sidebar. Add a changelog note. Behaviour is unchanged. Chosen next release
2. Replace with the theme If kept, move the brand paper and item styling into the MuiMenu and MuiMenuItem overrides in DiamondDSTheme. Replace the NavMenu stories with a Menu example, and add a migration snippet to the docs. Together or shortly after step 1
3. Remove Remove NavMenu, NavMenuLink and their exports. Add a Breaking changelog entry. Before this, check that known consumers no longer import NavMenu. ~Three months after step 1
Lingua principale
TypeScript
Stelle
9
Fork
4
Merge medio
4g 18h
PR unite (30g)
10

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di DiamondLightSource/sci-react-ui

Tutte le issue di DiamondLightSource/sci-react-ui

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.