Document the Brīdinājumi icon-chip and popup redesign
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.
|
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 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); clicking a chip both selects it for the map and opens its full text in a dialog rendered through a Solid `Portal` above a dimmed, blurred backdrop, keeping the chip grid uniform regardless of how long an individual warning's description is.
|
||||||
|
|
||||||
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.
|
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.
|
||||||
|
|
||||||
|
|||||||
@@ -117,11 +117,11 @@ Operator flow:
|
|||||||
1. Open **Brīdinājumi**; warning metadata and ordered polygon coordinates load through the WeatherTool backend.
|
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.
|
2. Select the independent 1920×1080 or 3840×1440 production canvas.
|
||||||
3. Optionally narrow the warning list by day and phenomenon.
|
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.
|
4. Click a warning card to select it for the map and open its full detail — intensity, regions, validity period, description, and risk text — in a popup dialog above a dimmed, blurred background. Closing the popup (✕, backdrop click, or Escape) keeps the selection; only that warning's polygons are drawn on the map.
|
||||||
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.
|
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.
|
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; severity color and the warning name are shown on the card itself.
|
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.
|
||||||
|
|
||||||
## Apskats
|
## Apskats
|
||||||
|
|
||||||
|
|||||||
@@ -134,6 +134,7 @@ Status: pending
|
|||||||
- [x] Add production border overlay artwork and feathered warning-polygon fills to Brīdinājumi.
|
- [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] 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, 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.
|
||||||
- [ ] Tune Brīdinājumi feather-blur bleed at sharp coastline curves (e.g. the Gulf of Rīga indentation).
|
- [ ] 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.
|
- [ ] Test target resolutions and real workplace display conditions.
|
||||||
- [ ] Check keyboard navigation, contrast, focus states, and screen-reader labeling.
|
- [ ] Check keyboard navigation, contrast, focus states, and screen-reader labeling.
|
||||||
@@ -207,3 +208,4 @@ Record completed work here by date and commit after the Git workflow is establis
|
|||||||
| 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 | `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 | `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 |
|
| 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 |
|
||||||
|
| 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 |
|
||||||
|
|||||||
Reference in New Issue
Block a user