Document multi-warning Brīdinājumi selection and chip restyle
This commit is contained in:
@@ -87,7 +87,7 @@ Monda Regular and Bold are bundled locally and used by the interface and generat
|
||||
|
||||
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. Each warning is listed as a compact phenomenon-icon chip (icon from the already-bundled `lucide-solid` set, keyword-matched against the LVĢMC phenomenon text). Selecting a warning for the map and viewing its full text are deliberately independent actions on the same chip: a checkbox drives map selection, while clicking the chip body opens that warning's full text in a dialog rendered through a Solid `Portal` above a dimmed, blurred backdrop — so an operator can read a warning without disturbing whichever warning is currently on the map. The chip grid stays uniform regardless of how long an individual warning's description is.
|
||||
The canvas renders every operator-checked warning at once, composited onto one offscreen layer before the shared feather blur is applied; there is no on-canvas legend. Polygons are drawn in ascending severity order (yellow, then orange, then red) so a higher severity painting over a lower one on the same ground reads as the dominant color where warnings overlap — this is how the tool supports the newsroom practice of combining multiple severity levels of one phenomenon (e.g. yellow + orange wind) onto a single export, while mixing different phenomena together remains an operator responsibility rather than something the UI prevents. The title is derived from the first checked warning's phenomenon (`Brīdinājums: {phenomenon}`) but stays manually editable. Each warning is listed as a compact phenomenon-icon chip (icon from the already-bundled `lucide-solid` set, keyword-matched against the LVĢMC phenomenon text) with a fully severity-colored background and white icon/text; a checkbox (custom-styled, not the browser default) independently controls map selection — any number may be checked — while clicking the chip body opens that warning's full text in a dialog rendered through a Solid `Portal` above a dimmed, blurred backdrop, without affecting the selection.
|
||||
|
||||
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.
|
||||
|
||||
|
||||
@@ -110,15 +110,15 @@ 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. Matching newsroom practice, the exported map always shows exactly one warning at a time rather than compositing every active warning together.
|
||||
Purpose: prepare a newsroom map from the current LVĢMC open hydrometeorological-warning dataset without tracing warning areas manually. The operator checks as many or as few warnings as should appear together on one export; newsroom practice is to combine multiple severity levels of the *same kind* of warning (e.g. a yellow and an orange wind warning) but never different phenomena (e.g. wind and rain) on one map — the tool does not currently enforce that boundary, so keeping selections to one phenomenon at a time is an operator responsibility.
|
||||
|
||||
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 narrow the warning list by day and phenomenon.
|
||||
4. Each warning card has its own checkbox and is independently clickable. The checkbox chooses which single warning is drawn on the map, without opening anything. Clicking the card itself opens that warning's full detail — intensity, regions, validity period, description, and risk text — in a popup dialog above a dimmed, blurred background, without changing which warning is selected for the map. Closing the popup (✕, backdrop click, or Escape) leaves the map selection untouched.
|
||||
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.
|
||||
4. Each warning card has its own checkbox and is independently clickable. The checkbox adds or removes that warning from the map (any number can be checked at once; at least one is auto-checked so the map is never empty). Clicking the card itself opens that warning's full detail — intensity, regions, validity period, description, and risk text — in a popup dialog above a dimmed, blurred background, without changing the map selection. Closing the popup (✕, backdrop click, or Escape) leaves the selection untouched.
|
||||
5. The title field is pre-filled as "Brīdinājums: {phenomenon}" (e.g. "Brīdinājums: vējš") from the first checked warning and remains manually editable — useful since a combined-severity selection needs one title regardless of how many checkboxes are on; 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. There is no on-canvas severity-color legend. Each warning card is a compact chip showing only its phenomenon icon, name, and severity color (left border); the full text lives in the detail popup so it stays readable regardless of length.
|
||||
|
||||
@@ -133,10 +133,12 @@ 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.
|
||||
- [x] Limit the Brīdinājumi canvas to one operator-selected warning (superseded below by multi-warning selection), 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.
|
||||
- [x] Redesign Brīdinājumi warning cards as compact phenomenon-icon chips and move full warning text into a dialog popup over a dimmed, blurred backdrop.
|
||||
- [x] Give Brīdinājumi chips a hover state where the severity-colored icon capsule expands to fill the chip, adapted from a reviewed external Uiverse.io reference component.
|
||||
- [x] Split Brīdinājumi's warning selection (checkbox, drives the map) from viewing a warning's detail (clicking the chip, opens the popup) so choosing a map warning no longer forces the popup open; widen the detail popup for readability.
|
||||
- [x] Replace single-warning selection with multi-select checkboxes so combined-severity newsroom maps (e.g. yellow + orange wind together) can be produced; re-add severity-ordered compositing of every checked warning's polygons. Restyle chips as narrower, fully severity-colored, white-icon/white-text buttons, and port a reviewed Uiverse.io checkbox component for the selection control.
|
||||
- [ ] Decide whether Brīdinājumi should actively prevent checking warnings of different phenomena together, or continue leaving that as an operator responsibility.
|
||||
- [ ] 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.
|
||||
@@ -213,3 +215,4 @@ Record completed work here by date and commit after the Git workflow is establis
|
||||
| 2026-08-22 | `cafc75a` | Redesign Brīdinājumi warning cards as compact phenomenon-icon chips and move full warning text into a dialog popup over a dimmed, blurred backdrop | Yes — Rocky typecheck, build, and headless-browser screenshot verification of the popup open/close flow; VPS deployment pending |
|
||||
| 2026-08-22 | `70fd24c` | Give Brīdinājumi chips a hover-expanding severity capsule, adapted from a reviewed Uiverse.io reference component | Yes — Rocky typecheck, build, and headless-browser screenshot verification of rest/hover/active chip states; VPS deployment pending |
|
||||
| 2026-08-22 | `6fbf672` | Split Brīdinājumi warning selection (checkbox) from viewing detail (chip click) and widen the detail popup | Yes — Rocky typecheck, build, and headless-browser verification that checkbox clicks change the map selection without opening the popup and chip clicks open the correct warning's detail without changing the selection; VPS deployment pending |
|
||||
| 2026-08-22 | `56b8716` | Replace single-warning Brīdinājumi selection with multi-select checkboxes and severity-ordered polygon compositing, and restyle chips as narrower, fully severity-colored, white-icon/white-text buttons with a ported Uiverse.io checkbox component | Yes — Rocky typecheck, build, and headless-browser screenshot verification of multiple simultaneous checked warnings compositing correctly on the map; VPS deployment pending |
|
||||
|
||||
Reference in New Issue
Block a user