Skip to content

Detail panel polish: centered title, no id or angle rows, DD.MM.YYYY dates, softer backdrop, themed filters - #31

Merged
egorikftp merged 25 commits into
mainfrom
center-detail-title
Nov 14, 2026
Merged

egorikftp merged 25 commits into
mainfrom
center-detail-title

Conversation

@egorikftp

@egorikftp egorikftp commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

Summary

A tuning pass over the detail drawer, the theming, and the map overlays.

Detail panel

  • The title centers against the close glyph: the ✕ touch target bleeds symmetrically instead of upward-only, so both share an exact center line (measured delta 0).
  • The drag handle is hidden from 768px — a bottom-sheet affordance on a side panel.
  • Closing plays the entry animation in reverse (slide-down on mobile, slide-out-right on desktop, backdrop fades with it; fade-only under prefers-reduced-motion) before unmounting on animationend, with a timer fallback.
  • Rows dropped: id, the angles, Тип, Проверено — dashboard bookkeeping, not reader facts.
  • Dates read DD.MM.YYYY everywhere (the repair range and every Обновлено); non-ISO values pass through.
  • The speed row reads like the dashboard's queue meta: the car/truck icons over the same mask trick, one icon + number + км/ч per limit, the truck figure only when the CDN carries one.
  • Регион: grodno became Область: Гродненская — latin slugs map to the Belarusian oblast names (regionName in lib/cdn).
  • The direction reads Двухсторонняя / Односторонняя, the dashboard's own wording.
  • The repair note renders as a GitHub-style blockquote below the fact rows: accent bar on the left, muted freely wrapping prose.
  • The desktop panel breathes 16px from the top edge.

Theming

  • A theme toggle rides beside the filter one: an explicit light/dark lands in localStorage and <html data-theme>; with no choice the device scheme wins and follows its flips. An inline head script resolves the theme before the first paint.
  • The token blocks key off data-theme instead of the media query; new --panel-hover, --error-text, --divider tokens.
  • The map follows the theme too: OpenFreeMap's pitch-black Dark under the dark scheme, swapped live on theme change — the style.load replay redraws the overlays, the DOM markers survive. The repairs red reads a lighter step on the dark basemap.
  • The filter popover, the maplibre zoom/geolocate cards and the install banner join the themed surfaces (they were always-white).
  • The maplibre control glyphs re-tie their background-image in its own sheet, so the baked black glyphs no longer surface over the currentcolor masks on dark.

Map overlays

  • The medium-speed and repairs lines draw with round caps and joins, full opacity.
  • The lines take a pointer cursor on hover, the same targets the click handlers listen on.

Conventions

  • AGENTS.md records the icon rules: SVG only, no baked colors; reused icons live in public/icons and draw through the mask trick; one-off stateful glyphs may stay inline; store badges stay PNG. The filter funnel and the theme sun/moon moved into public/icons accordingly.

Test plan

  • npm run lint, npm run build on every push (CI).
  • Built out/ checked in the browser: panel layout in both themes, close via backdrop / ✕ / Escape animates out, theme toggle persists across reload, basemap swaps live, line hover cursor, rounded line ends.

The close button's touch target bled upward only (-8px top), so its
glyph center sat below the title's. The header now centers its items
and the button bleeds symmetrically, keeping the glyph in place while
the title shares its center.
The short CDN id meant nothing to a reader; every detail type now ends
on its data rows. The now-unused .detail-muted rule goes with it.
@egorikftp egorikftp changed the title Center the detail title against the close glyph Detail panel polish: centered title, no id line Nov 14, 2026
The CDN serves ISO YYYY-MM-DD; the panel now prints every date (the
repair range and the three Updated rows) in the day-first numeric
shape. Values without the ISO shape pass through untouched.
@egorikftp egorikftp changed the title Detail panel polish: centered title, no id line Detail panel polish: centered title, no id line, DD.MM.YYYY dates Nov 14, 2026
The camera bearing meant nothing to a reader; the stationary panel
loses "Угол" and the medium-speed one its start/end angle pair.
@egorikftp egorikftp changed the title Detail panel polish: centered title, no id line, DD.MM.YYYY dates Detail panel polish: centered title, no id or angle rows, DD.MM.YYYY dates Nov 14, 2026
A half-black veil over a map that the reader may want to glance at was
too heavy; 30% keeps the modal separation with the map still readable.
@egorikftp egorikftp changed the title Detail panel polish: centered title, no id or angle rows, DD.MM.YYYY dates Detail panel polish: centered title, no id or angle rows, DD.MM.YYYY dates, softer backdrop Nov 14, 2026
The popover and its toggle stayed always-white from the earlier
map-surface call while the detail drawer follows the scheme — one dark
card next to a white one reads as a bug. Both now ride the panel
tokens; hover and error text get matching scheme tokens.
@egorikftp egorikftp changed the title Detail panel polish: centered title, no id or angle rows, DD.MM.YYYY dates, softer backdrop Detail panel polish: centered title, no id or angle rows, DD.MM.YYYY dates, softer backdrop, themed filters Nov 14, 2026
The speed row reads like the dashboard's queue meta: an icon + number
per limit type, the truck figure only when the CDN carries one. The
car/truck icons come from the dashboard's icons/ and draw through the
mask trick in currentColor, so they follow the scheme.

Also rename the region row to «Область» and map the CDN's latin slugs
to the Belarusian oblast names (regionName in lib/cdn, unknown slugs
pass through).
The sign markers take their pointer from CSS; the canvas lines had no
hover affordance. The same two layers the click handlers listen on now
set the cursor on mouseenter and clear it on mouseleave.
The dashboard's own wording for the bidirectional flag — «Оба
направления» described the camera's coverage, not the road.
The check mark is dashboard bookkeeping; the reader judges the dates
and the note.
The unit read as trailing text after both figures — one «км/ч» for the
pair; now every icon+number group carries its unit, the truck figure
only when the CDN carries one.
The UI surfaces all ride prefers-color-scheme while the map stayed
Liberty in both. The map now boots into OpenFreeMap's Dark under the
dark scheme and swaps on the matchMedia change; the style.load replay
redraws the overlays, and the DOM markers survive the swap on their
own. On the dark basemap the repairs red sinks into the near-black
land fill, so the dark scheme reads a lighter step of the same red.
The last always-white surfaces — the zoom/geolocate cards and the
banner — join the filter popover on the panel tokens.
The note is prose, not a fact: it leaves the rows and reads as a
GitHub-style quote under the header — the accent bar on the left,
muted freely wrapping text.
Butt caps chopped the line flush at the sign markers and the corners
came out mitered; round caps and joins read like the dashboard's
route strokes.
The 8px top padding belongs to the mobile sheet with its handle; the
bare desktop panel starts flush against the top edge.
The toggle rides beside the filter one: an explicit light/dark lands in
localStorage and <html data-theme>, no choice falls back to the device
scheme and follows its flips. The token blocks key off the attribute
(bootstrapped by an inline script ahead of the first paint), the
basemap and the overlay colors subscribe to the theme store.

Also on the way:
- the popover rows sit flush against the card edges, the group padding
  kept the hover fill off the title and footer borders;
- the maplibre control glyphs re-tie their background-image in its own
  sheet (equal specificity, later import), so the baked black glyphs
  surfaced over the currentcolor masks on the dark theme — the override
  now outranks it.
The dark card read the shared panel-border seam harsh — hairlines get
their own --divider token, a step below the border in dark and the
dashboard's #e0e0e0 in light. The blockquoted repair note closes the
panel after the fact rows instead of splitting the header from them.
The point/line distinction is map bookkeeping; the icon on the map and
the marker itself already carry it.
SVG only, no baked colors: reused icons live in public/icons and draw
through the mask trick, one-off stateful glyphs may stay inline in
currentColor, the store badges stay PNG artwork.
The filter funnel and the theme sun/moon leave their inline markup for
public/icons and draw through the same mask utility — the conventions
rule in AGENTS.md, applied to its own exceptions.
The mask utility sizes to 1em — inside the 34px buttons that collapsed
to the inherited 13px; the glyphs take the map controls' 18px.
The round yellow disc carries dark slate lettering: on the light card
it melts into the white fill and wears a dark ring in its own stroke
color; on the dark card the lettering sits on transparent fill and
vanishes behind a white chip.
The ring reads at half a pixel in a translucent slate, and Android's
square blue tap flash over the round buttons goes the dashboard's way:
-webkit-tap-highlight-color: transparent on the html.
@egorikftp
egorikftp merged commit 39e8ad1 into main Nov 14, 2026
1 check passed
@egorikftp
egorikftp deleted the center-detail-title branch November 14, 2026 21:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant