diff --git a/docs/ARCHITECTURE.md b/docs/ARCHITECTURE.md index 887f7df..d92e7b3 100644 --- a/docs/ARCHITECTURE.md +++ b/docs/ARCHITECTURE.md @@ -85,7 +85,9 @@ Monda Regular and Bold are bundled locally and used by the interface and generat ### Brīdinājumi -Brīdinājumi renders the current LVĢMC warning polygons over the same `map_1920x1080`/`map_3840x1440` backgrounds used by Kartes, plus a production border-outline overlay drawn last so it stays crisp above the softened data layer. Warning severities are blurred and filled onto an offscreen layer before compositing, giving the broadcast graphic a feathered rather than hard-edged warning area. +Brīdinājumi renders the current LVĢMC warning polygons over the same `map_1920x1080`/`map_3840x1440` backgrounds used by Kartes, plus a production border-outline overlay drawn last so it stays crisp above the softened data layer. Warning severity is blurred and filled onto an offscreen layer before compositing, giving the broadcast graphic a feathered rather than hard-edged warning area. + +The canvas always renders exactly one operator-selected warning, matching how these graphics are produced for air; there is no multi-warning composite and no on-canvas legend. The title is derived from the selected warning's phenomenon (`Brīdinājums: {phenomenon}`) but stays manually editable. The backend returns warning polygons as raw latitude/longitude points; the frontend projects them to pixel space with a per-resolution affine transform (`x = a·lon + b·lat + c`, `y = d·lon + e·lat + f`). Each transform is a least-squares fit of well-spread Latvian cities' real-world coordinates against the pixel positions already validated for these same map backgrounds by Kartes/Faktiskā (`cityCoords.ts` + `mapConsts.ts`), rather than an independently eyeballed calibration. An earlier 4-corner bounding-box version of this projection could not represent the source artwork's rotation/shear and drifted up to ~200px on the 3840 canvas; the affine fit lands within ~35px. diff --git a/docs/PRODUCT_WORKFLOWS.md b/docs/PRODUCT_WORKFLOWS.md index a1e1160..68f6c91 100644 --- a/docs/PRODUCT_WORKFLOWS.md +++ b/docs/PRODUCT_WORKFLOWS.md @@ -110,17 +110,18 @@ Implementation status: both native exports are implemented and visually validate ## Brīdinājumi -Purpose: prepare a newsroom map from the current LVĢMC open hydrometeorological-warning dataset without tracing warning areas manually. +Purpose: prepare a newsroom map from the current LVĢMC open hydrometeorological-warning dataset without tracing warning areas manually. Matching newsroom practice, the exported map always shows exactly one warning at a time rather than compositing every active warning together. Operator flow: 1. Open **Brīdinājumi**; warning metadata and ordered polygon coordinates load through the WeatherTool backend. 2. Select the independent 1920×1080 or 3840×1440 production canvas. -3. Optionally filter the current warning period by day and phenomenon. -4. Enter the editorial title. Warning geometry, severity colors, legend, source data, and validity information remain data-driven. -5. Preview and download the native-resolution PNG. +3. Optionally narrow the warning list by day and phenomenon. +4. Click a warning card to select it for the map. The selected card expands to show its full intensity, regions, validity period, description, and risk text; other cards stay collapsed to just their phenomenon name and severity color. Only the selected warning's polygons are drawn. +5. The title field is pre-filled as "Brīdinājums: {phenomenon}" (e.g. "Brīdinājums: vējš") from the selected warning and remains manually editable; the LVĢMC source mark stays fixed. +6. Preview and download the native-resolution PNG. -The two exports use separate geographic-to-pixel calibration and layout values. Neither output is produced by resizing the other. Upstream times are interpreted in the `Europe/Riga` timezone. Empty warning data is a valid state and produces an uncolored base map. +The two exports use separate geographic-to-pixel calibration and layout values. Neither output is produced by resizing the other. Upstream times are interpreted in the `Europe/Riga` timezone. Empty warning data is a valid state and produces an uncolored base map. There is no on-canvas severity-color legend; severity color and the warning name are shown on the card itself. ## Apskats diff --git a/docs/UPDATE_ROADMAP.md b/docs/UPDATE_ROADMAP.md index 5001090..ac9c062 100644 --- a/docs/UPDATE_ROADMAP.md +++ b/docs/UPDATE_ROADMAP.md @@ -133,6 +133,7 @@ Status: pending - [x] Add a separate Latvian-named Brīdinājumi workspace that renders current LVĢMC warning polygons without manual tracing. - [x] Add production border overlay artwork and feathered warning-polygon fills to Brīdinājumi. - [x] Replace Brīdinājumi's 4-corner bounding-box projection with an affine fit calibrated against the same validated Kartes/Faktiskā city pixel positions. +- [x] Limit the Brīdinājumi canvas to one operator-selected warning, remove the on-canvas legend, collapse card detail to phenomenon/severity by default with full detail on click, and pre-fill the title from the selected warning's phenomenon. - [ ] Tune Brīdinājumi feather-blur bleed at sharp coastline curves (e.g. the Gulf of Rīga indentation). - [ ] Test target resolutions and real workplace display conditions. - [ ] Check keyboard navigation, contrast, focus states, and screen-reader labeling. @@ -205,3 +206,4 @@ Record completed work here by date and commit after the Git workflow is establis | 2026-08-22 | `bc5bee1` | Add the Brīdinājumi LVĢMC warning-map workflow with metadata/polygon ingestion, day/phenomenon filtering, and manual title entry | Yes — Rocky browser verification; VPS deployment pending | | 2026-08-22 | `13115f0` | Add production border overlay artwork and feathered warning-polygon fills to Brīdinājumi | Yes — Rocky browser verification; VPS deployment pending | | 2026-08-22 | `4395935` | Replace Brīdinājumi's 4-corner bounding-box projection, which drifted up to ~200px on the 3840 canvas, with an affine fit calibrated against the validated Kartes/Faktiskā city pixel positions | Yes — Rocky typecheck, build, and headless-browser screenshot comparison at both native export resolutions; VPS deployment pending | +| 2026-08-22 | `924e410` | Limit Brīdinājumi to one selected warning per export, remove the on-canvas legend, collapse card detail until clicked, and pre-fill the title from the selected warning's phenomenon | Yes — Rocky typecheck, build, and headless-browser screenshot verification of selection switching and card detail; VPS deployment pending |