Further refactor modifier classnames

Offen
#425 0 Kommentare 1 Reaktion 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Anfängerfreundlichkeit
35/100
Issue-Typ
Refactoring
Klarheit
Größtenteils klar
Aktivitätsstatus
Veraltet
Tech-Stack
react, typescript
Bereich
frontend

Rechercherichtung

Review the modifier class names and the CSS class naming rules linked in the issue. Check how modifier classes are defined and used across the components, then assess the scope of renaming them to the proposed patterns. Done means the affected class names follow the agreed patterns and part 4 of the contribution guide documents the rules.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

BC

Looking at the modifier classes, I think we could further unify their names instead of attempting to build sentence-like names: .isToolbarAlignedToTop ➡️ .isToolbarAlignTop, etc. The pattern would be:

  1. .is<ELEMENT><PROP-NAME><PROP-VALUE> for oneOf prop types, e.g. .isRootColorPrimary,
  2. .is<ELEMENT><PROP-NAME> for truthy boolean prop types, e.g. .isRootBlock.

If you agree, I'd do it in a separate PR (or a commit at least) and also document it in part 4.

Originally posted by @adamkudrna in https://github.com/react-ui-org/react-ui/pull/424#discussion_r974374485

Vorherrschende Sprache
TypeScript
Sterne
23
Forks
10
Ø Merge
5 T. 14 Std.
Gemergte PRs (30 T.)
9

Entwicklungsumgebung

In Codespaces öffnen

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

  • Kein Dockerfile und keine Docker-Compose-Datei
  • Keine Pull-Request-Vorlage
  • Kein Beitragsleitfaden

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 react-ui-org/react-ui

Alle Issues in react-ui-org/react-ui

Ähnliche Issues

Weitere Issues zu TypeScript

Neue Issues direkt in Ihr Postfach

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