feat: Enhance dashboard widget configuration and introduce new widgets
- Updated the dashboard layout schema to include new widgets: DashboardGreeting, QuickWeightToday, BodyStatStrip, StatusPills, ProfileGoalsProgress, TrendKcalWeight, NutritionActivitySummary, RecoverySleepRest, and TrainingTypeDistribution. - Improved widget configuration validation to support new features, including chart days for trend and distribution widgets. - Refactored the default lab layout to align with the updated widget catalog and ensure proper default activation. - Bumped app_dashboard version to 1.6.0 to reflect the addition of new widgets and configuration enhancements.
This commit is contained in:
1 parent
c0c512e942
commit
3d498d03c1
28 files changed
+1487
-243
No files matched your search
@@ -15,7 +15,7 @@ class WidgetCatalogEntry(TypedDict):
|
||||
description: str
|
||||
|
||||
|
||||
# Reihenfolge in der Liste = Standard-Layout (alle default_enabled: True im Default-Layout)
|
||||
# Reihenfolge = Default-Layout-Reihenfolge. Aktiv-Flags: DEFAULT_LAB_WIDGET_IDS (Rest zunächst aus).
|
||||
WIDGET_CATALOG: list[WidgetCatalogEntry] = [
|
||||
{
|
||||
"id": "welcome",
|
||||
@@ -42,8 +42,73 @@ WIDGET_CATALOG: list[WidgetCatalogEntry] = [
|
||||
"title": "Aktivität",
|
||||
"description": "Training & Konsistenz (optional: config chart_days 7–90)",
|
||||
},
|
||||
{
|
||||
"id": "dashboard_greeting",
|
||||
"title": "Begrüßung (Produkt)",
|
||||
"description": "Hallo, Datum & letztes Gewicht-Update",
|
||||
},
|
||||
{
|
||||
"id": "quick_weight_today",
|
||||
"title": "Gewicht heute",
|
||||
"description": "Tagesgewicht erfassen (wie Produkt-Dashboard)",
|
||||
},
|
||||
{
|
||||
"id": "body_stat_strip",
|
||||
"title": "Kennzahlen-Kacheln",
|
||||
"description": "Gewicht, KF, Magermasse, Ø-kcal — Oberreihe",
|
||||
},
|
||||
{
|
||||
"id": "status_pills",
|
||||
"title": "Indikatoren (Pills)",
|
||||
"description": "WHR, WHtR, Protein, KF",
|
||||
},
|
||||
{
|
||||
"id": "profile_goals_progress",
|
||||
"title": "Profil-Ziele",
|
||||
"description": "Fortschritt Gewicht/Körperfett aus Profilfeldern",
|
||||
},
|
||||
{
|
||||
"id": "trend_kcal_weight",
|
||||
"title": "Trend Kalorien + Gewicht",
|
||||
"description": "Linienchart (optional config chart_days 7–90, Default 30)",
|
||||
},
|
||||
{
|
||||
"id": "nutrition_activity_summary",
|
||||
"title": "Ernährung & Aktivität Kurz",
|
||||
"description": "Ø 7T Kacheln",
|
||||
},
|
||||
{
|
||||
"id": "recovery_sleep_rest",
|
||||
"title": "Erholung",
|
||||
"description": "Schlaf-Widget & Ruhetage",
|
||||
},
|
||||
{
|
||||
"id": "training_type_distribution",
|
||||
"title": "Training Verteilung",
|
||||
"description": "Kuchen Trainingstypen (optional config distribution_days 7–120, Default 28)",
|
||||
},
|
||||
{
|
||||
"id": "goals_focus_teaser",
|
||||
"title": "Ziele Teaser",
|
||||
"description": "Kurzlink zur Ziele-Seite",
|
||||
},
|
||||
{
|
||||
"id": "ai_pipeline_insight",
|
||||
"title": "KI Pipeline & letzte Analyse",
|
||||
"description": "Pipeline starten + Gesamt-Insight",
|
||||
},
|
||||
]
|
||||
|
||||
DEFAULT_LAB_WIDGET_IDS: frozenset[str] = frozenset(
|
||||
{
|
||||
"welcome",
|
||||
"quick_capture",
|
||||
"kpi_board",
|
||||
"body_overview",
|
||||
"activity_overview",
|
||||
}
|
||||
)
|
||||
|
||||
ALLOWED_WIDGET_IDS: frozenset[str] = frozenset(e["id"] for e in WIDGET_CATALOG)
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user