Sprint B: 5 neue UI-Helper für konsistente Patterns, SW by-v1103
Neue zentrale Komponenten in ui.js:
1. UI.errorState({icon, title, message, retry})
Dedizierte Error-UI statt nur Toast. Mit optionalem Retry-Button
(asyncButton-integriert). Analog zu UI.emptyState. Behebt
Inkonsistenzen: Toast vs. ad-hoc HTML vs. Empty-State-Reuse.
2. UI.skeletonList(count)
Karten-Skeleton für Listen-Loading (Avatar + 2 Zeilen pro Item).
Erweitert UI.skeleton(lines) — beide bleiben verfügbar.
3. UI.moneyInput({name, value, currency='€', placeholder})
Euro-Input mit Prefix + locale-Format (Komma als Dezimal-
trenner). Extrahiert aus expenses.js Best-Practice.
Plus UI.parseMoney(str) als Parser-Helper.
4. UI.datePicker({name, label, value, min, max, required})
Standard-Date-Input mit Label, min/max ('today' wird zu ISO-
Datum konvertiert). Vereinfacht Form-Boilerplate.
5. UI.map.create(containerId, opts)
Zentraler Leaflet-Init mit OSM-Tiles + Dark-Mode-Filter-Option.
Konstanten OSM_URL + OSM_MAX_ZOOM zentral. Plus UI.map.svgMarker
für eigene divIcon-Marker (für events.js Diamant, lost.js Puls).
Alle Helper sind backward-kompatibel — bestehende Patterns funktionieren
weiter. Tests 19/19 grün. Migration der Aufrufer kommt in Sprint C+D.
This commit is contained in:
parent
459cd425f2
commit
1de39536af
6 changed files with 171 additions and 20 deletions
2
VERSION
2
VERSION
|
|
@ -1 +1 @@
|
|||
1102
|
||||
1103
|
||||
Loading…
Add table
Add a link
Reference in a new issue