Global dashboard filter bar (date range, granularity, region) #24

Closed
opened 2026-07-28 16:54:06 +00:00 by claude-bot · 1 comment
Collaborator

Problem

The reporting period is baked into every chart factory. months() returns a fixed Jan–Jun list, and each chart gets a fixed six-value series. There is no way to change what the dashboard is showing without editing code.

Proposal

Add a filter bar above the grid:

  • Date range picker (or period selector: month / quarter / year).
  • Optional granularity and region filters.
  • A DashboardContext (or a small event bus) holding the current filter state; widgets subscribe and re-request their data when it changes.

Widgets that do not care about a given filter simply ignore it.

Acceptance criteria

  • Changing the filter updates all subscribed widgets without a page reload.
  • Widgets update in place — no full chart rebuild flash.
  • Filter state is part of what gets restored (see #22) or explicitly documented as not persisted.
  • Copy in German, matching the existing UI language, with i18n keys in all three bundles (translations.properties, _en, _es).

Depends on

  • #20 (data service — filters need a parameterised query path)
  • #23 (incremental updates — otherwise every filter change flashes the whole dashboard)

Scope

Medium.

## Problem The reporting period is baked into every chart factory. `months()` returns a fixed Jan–Jun list, and each chart gets a fixed six-value series. There is no way to change what the dashboard is showing without editing code. ## Proposal Add a filter bar above the grid: - Date range picker (or period selector: month / quarter / year). - Optional granularity and region filters. - A `DashboardContext` (or a small event bus) holding the current filter state; widgets subscribe and re-request their data when it changes. Widgets that do not care about a given filter simply ignore it. ## Acceptance criteria - Changing the filter updates all subscribed widgets without a page reload. - Widgets update in place — no full chart rebuild flash. - Filter state is part of what gets restored (see #22) or explicitly documented as not persisted. - Copy in German, matching the existing UI language, with i18n keys in all three bundles (`translations.properties`, `_en`, `_es`). ## Depends on - #20 (data service — filters need a parameterised query path) - #23 (incremental updates — otherwise every filter change flashes the whole dashboard) ## Scope Medium.
claude-bot added the enhancement label 2026-07-28 16:54:06 +00:00
pitfriedrich added the ai-ready label 2026-07-28 18:36:54 +00:00
claude-bot added ai-wip and removed ai-ready labels 2026-07-28 18:37:14 +00:00
Author
Collaborator

PR: #36

Umgesetzt: Filterleiste (Zeitraum Monat/Quartal/Halbjahr/Jahr + Region) über dem Grid, DashboardContext als Bus, alle Widgets werden über updateData in place nachgefüttert. Filterzustand ist bewusst nicht persistiert (dokumentiert in DashboardContext) — das Grid-Layout bleibt wie gehabt im localStorage.

Abweichung vom Vorschlag: statt eines Date-Range-Pickers ein Perioden-Selector, und keine separate Granularität — der Zeitraum bestimmt sie mit (ein Monat wird als vier Wochen gelesen, alles Längere in Monaten).

./mvnw test: 46 Tests grün, inkl. Playwright-E2E.

PR: https://gitea.pitfriedrich.net/pitfriedrich/chart-app/pulls/36 Umgesetzt: Filterleiste (Zeitraum Monat/Quartal/Halbjahr/Jahr + Region) über dem Grid, `DashboardContext` als Bus, alle Widgets werden über `updateData` in place nachgefüttert. Filterzustand ist bewusst **nicht** persistiert (dokumentiert in `DashboardContext`) — das Grid-Layout bleibt wie gehabt im `localStorage`. Abweichung vom Vorschlag: statt eines Date-Range-Pickers ein Perioden-Selector, und keine separate Granularität — der Zeitraum bestimmt sie mit (ein Monat wird als vier Wochen gelesen, alles Längere in Monaten). `./mvnw test`: 46 Tests grün, inkl. Playwright-E2E.
claude-bot added ai-review and removed ai-wip labels 2026-07-28 18:53:05 +00:00
Sign in to join this conversation.