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

Offen
#387 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Anfängerfreundlichkeit
50/100
Issue-Typ
Refactoring
Klarheit
Größtenteils klar
Aktivitätsstatus
Aktiv
Tech-Stack
react, storybook, typescript
Bereich
frontend

Rechercherichtung

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.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

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
Vorherrschende Sprache
TypeScript
Sterne
9
Forks
4
Ø Merge
4 T. 18 Std.
Gemergte PRs (30 T.)
10

Entwicklungsumgebung

In Codespaces öffnen

Startet den Dev-Container des Projekts im Browser, mit Ihrem eigenen GitHub-Konto.

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus DiamondLightSource/sci-react-ui

Alle Issues in DiamondLightSource/sci-react-ui

Ähnliche Issues

Weitere Issues zu TypeScript

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.