SolidOS / SolidOS/solid-ui

Proposal: Splitting modules into three types of modules - low-level, widgets, and controls

Offen
#254 2 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

enhancement
Vorherrschende Sprache
TypeScript
Sterne
153
Forks
46
Ø Merge
1 T. 8 Std.
Gemergte PRs (30 T.)
7

Beschreibung

(I've spoken to @timbl about this earlier, and we think this is a good idea, but not written it down here, so thought I would create an issue to open it up for discussion.)

Currently the API of Solid UI is split up into modules that usually have a mix of low- and high-level functionality. To clear up these we propose a convention that splits modules into three types: low-level, widgets, and controls. The idea is that the types handle increasingly complex methods in terms of the DOM elements that are returned.

  1. The low-level methods do not deal with DOM elements at all, but deal with data manipulation and utility functions that are useful when working with Solid.
  2. Widgets return simple DOM elements, such as buttons and other elements that are meant to be woven into a larger compositions.
  3. Controls are complete DOM elements in the sense that they can work stand-alone and can expose complex interactions.

The modules would follow a name convention given their type, e.g. low-level modules would simply be named the functionality they expose, widget modules would be postfixed Widget, and control modules would be postfixed Control. This way a range of functionality that all reflect the same type of functionality could all start with the same name, but the two latter would expose higher complexity, e.g. acl, aclWidget, and aclControl.

We also propose that existing API endpoints that would be deprecated as part of this restructure to be deprecated slowly, giving people who depend on the existing API ample time to update their dependencies.

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Beginne damit, die aktuellen Solid UI API-Module zu überprüfen und zu katalogisieren, welche Endpunkte Low-Level-Hilfsfunktionen, Widgets und Controls vermischen. Vergleiche die bestehenden Namen und DOM-Verantwortlichkeiten mit den vorgeschlagenen Konventionen und dokumentiere anschließend den Umfang der Migration und der Deprecation. Als abgeschlossen gilt die Aufgabe, wenn die Modulgrenzen, die Namensänderungen und der schrittweise Deprecation-Plan vereinbart sind.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
typescript
Bereich
frontend
Issue-Typ
Refactoring
Schwierigkeit
5/5
Geschätzter Aufwand
Über eine Woche
Aktivitätsstatus
Veraltet
Klarheit
Muss geklärt werden
Anfängerfreundlichkeit
20/100

Neue Issues direkt in Ihr Postfach

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