Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions public/dagi-filter.js
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,15 @@
'. The count covers all nodes, before the other filters.';
}

/** hiddenNotice's count in a few words, for a one-line notice (Live,
* #1055 owner report): short enough that the line, with the rule, fits
* a 360 px phone. '' for none. */
function hiddenShort(n) {
n = Number(n) || 0;
if (n <= 0) return '';
return (n === 1 ? '1 node' : n + ' nodes') + ' not on map';
}

/** GET /api/config/dagi/polygons as Leaflet rings: every feature's
* rings, each [lon0, lat0, dlon, dlat, …] in quantum degrees with the
* closing vertex implicit, summed and swapped to [lat, lon]. The rings
Expand Down Expand Up @@ -1020,6 +1029,7 @@
selectedEntry: selectedEntry,
creditElement: creditElement,
hiddenNotice: hiddenNotice,
hiddenShort: hiddenShort,
hiddenCount: hiddenCount,
notAppliedNotice: notAppliedNotice,
search: search,
Expand Down
112 changes: 93 additions & 19 deletions public/live.css
Original file line number Diff line number Diff line change
Expand Up @@ -568,8 +568,7 @@
transform: translate(-50%, -50%);
}
/* #1055 M2: the Danish areas (DAGI) filter beside Area, at the same 30 px
row height with the same 48 px hit area, so the row does not grow; and the
feed's "only adverts are shown" notice on a line of its own. */
row height with the same 48 px hit area, so the row does not grow. */
.live-controls-body .live-dagi-filter-container { font-size: 11px; }
.live-controls-body .live-dagi-filter-container .dagi-trigger {
font-size: inherit;
Expand All @@ -590,7 +589,53 @@
}
/* The clear's hit area stays inside the 4 px gap, off the trigger's. */
.live-controls-body .live-dagi-filter-container .dagi-clear::after { width: calc(100% + 8px); }
.live-controls-body .live-scope-notice { flex: 0 0 100%; padding: 0; font-size: 11px; }
/* #1055 owner report: the notice is one line at the start of the scope row
(the rule, and the count for DAGI), not a paragraph on a row of its own;
the explanation (the line's title) opens under "why?" on its own line. */
.live-controls-body .live-scope-notice {
flex: 0 1 auto;
min-width: 0;
max-width: 100%;
display: flex;
flex-wrap: wrap;
align-items: center;
column-gap: 6px;
padding: 0;
font-size: 11px;
}
.live-controls-body .live-scope-notice[hidden],
.live-scope-notice-why[hidden] { display: none; }
.live-controls-body .live-scope-notice:has(.live-scope-notice-why:not([hidden])) { flex-basis: 100%; }
.live-scope-notice-line {
flex: 0 1 auto;
min-width: 0;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.live-scope-notice-count:not(:empty)::before { content: " \00b7 "; /* the escape takes one space */ }
.live-scope-notice-why-btn {
flex: none;
position: relative;
padding: 0;
border: 0;
background: none;
color: var(--accent);
font: inherit;
text-decoration: underline;
cursor: pointer;
}
/* A 24px hit area inside the row, on a text-sized link. */
.live-scope-notice-why-btn::after {
content: "";
position: absolute;
top: 50%;
left: 50%;
width: max(100%, 24px);
height: 24px;
transform: translate(-50%, -50%);
}
.live-scope-notice-why { flex: 0 0 100%; white-space: normal; }
/* #1055 M3: the area rule selector, two radios as one segmented control,
next to the Area and DAGI filters. 30 px tall with the 48 px hit area of
the controls beside it; 48 px on a touch screen (the pointer: coarse
Expand Down Expand Up @@ -1036,6 +1081,15 @@ body.kiosk .live-node-detail:not(.hidden) ~ .live-kiosk-exit { display: none; }



/* #1055 owner report: the panel stops short of the map's right-hand button
column (zoom, layers, Fullscreen, Settings, Legend), which sits in the
same band above 640px. live.js publishes the column's measured width plus
a 6px gap as --live-map-rail (12px until it is measured). Fullscreen
keeps .live-header's own width: the controls are hidden there (#1572). */
@media (min-width: 641px) {
body:not(.live-fullscreen) .live-header { max-width: calc(100vw - 12px - var(--live-map-rail, 12px)); }
}

/* ---- Medium breakpoint (#279) + collapse toggles (#1178, #1179) ---- */
@media (max-width: 768px) {
.live-feed { width: 280px; max-height: 200px; }
Expand Down Expand Up @@ -1090,13 +1144,13 @@ body.kiosk .live-node-detail:not(.hidden) ~ .live-kiosk-exit { display: none; }
/* #664 — the gear (#liveControlsToggle) lives in the Leaflet top-right
stack, outside #liveHeader. With region groups the expanded panel grew
down over the gear and swallowed every tap, so it could not be closed.
While expanded, keep the panel out of the control rail (10px Leaflet
margin + 52px control + 6px gap) so no panel height can cover it.
While expanded, keep the panel out of the control rail (its measured
width, #1055: --live-map-rail) so no panel height can cover it; at
≤ 640px the collapsed header sits above the rail and keeps its width.
Not a max-height + scroll: overflow would clip the absolutely
positioned region/area dropdown menus. */
body:not(.live-fullscreen) .live-header:has(.live-controls.is-expanded) {
--live-ctrl-rail: 68px;
max-width: calc(100vw - 12px - var(--live-ctrl-rail));
max-width: calc(100vw - 12px - var(--live-map-rail, 68px));
}
}

Expand Down Expand Up @@ -1452,19 +1506,17 @@ body.live-fullscreen #liveFullscreenToggle:hover,
gear ends under the VCR bar or below the .live-page clip. Lay the stack
out as one row instead (y 74–174, gear still in the corner). The legend
toggle is the last control of that row (#875), so nothing overlaps it. Short desktop windows (≤ 500px tall) get the row too.
The header stops short of the row (5 × 10px Leaflet margin + 52 + 48 +
52 + 52 + 52px controls + 6px gap: zoom, layers, Fullscreen, Settings,
Legend) while expanded, so it cannot cover the controls either. At
≤ 640px wide the legend control is hidden (#875), so the row is four
controls (250px) again. */
The header stops short of the row while expanded, so it cannot cover the
controls either: --live-map-rail is the row's measured width (#1055),
four controls at ≤ 640px wide where the legend control is hidden (#875),
five above. */
@media (orientation: landscape) and (max-height: 500px) {
.live-page .leaflet-top.leaflet-right {
display: flex;
align-items: flex-start;
}
body:not(.live-fullscreen) .live-header:has(.live-controls.is-expanded) {
--live-ctrl-rail: 312px;
max-width: calc(100vw - 12px - var(--live-ctrl-rail));
max-width: calc(100vw - 12px - var(--live-map-rail, 312px));
}
}
/* #875: a narrow window (the bottom navigation takes 58px) 501-620px tall has
Expand All @@ -1474,11 +1526,6 @@ body.live-fullscreen #liveFullscreenToggle:hover,
@media (max-width: 768px) and (min-height: 501px) and (max-height: 620px) {
.live-legend, .live-legend-toggle-ctl { display: none !important; }
}
@media (orientation: landscape) and (max-height: 500px) and (max-width: 640px) {
body:not(.live-fullscreen) .live-header:has(.live-controls.is-expanded) {
--live-ctrl-rail: 250px;
}
}

/* #875: just above the row breakpoint (501–540px) the five-control column is
* 418px tall and its last control, Legend, ends under the credit that sits on
Expand Down Expand Up @@ -1543,6 +1590,27 @@ body.live-fullscreen #liveFullscreenToggle:hover,
/* #1055 M3: the area rule selector at the house size. */
.live-area-rule button { height: 48px; }
}
/* #1087 review N2: the DAGI control and the area rule sit in one wrapper.
Above 640px it lays nothing out (display: contents), so both stay items
of the controls row. At 640px and below they share one row instead of
the selector taking a 48 px row of its own: the radios show their short
labels ("From", "Touches"; the full name is each radio's aria-label, and
the notice line names the rule in full), and the DAGI label gives way
(its ellipsis) before the selector would wrap. */
.live-dagi-rule { display: contents; }
@media (max-width: 640px) {
.live-controls-body .live-dagi-rule:has(> .live-area-rule:not([hidden])) {
display: flex;
align-items: center;
gap: 8px;
min-width: 0;
max-width: 100%;
}
.live-dagi-rule > .live-dagi-filter-container { min-width: 0; }
.live-dagi-rule > .live-area-rule { flex: none; }
.live-area-rule-more { display: none; }
.live-area-rule button { padding: 2px 6px; }
}
.live-controls.is-expanded.is-capped .live-controls-body :is(.live-region-filter-container, .live-area-filter-container):has(.region-dropdown-menu:not([hidden])) { flex: 0 0 100%; }
.live-controls.is-expanded.is-capped .live-controls-body .region-dropdown-wrap:has(> .region-dropdown-menu:not([hidden])) { flex: 0 0 100%; }
.live-controls.is-expanded.is-capped .live-controls-body .region-dropdown-menu { min-width: 0; max-width: 100%; }
Expand Down Expand Up @@ -2014,6 +2082,12 @@ input.live-node-filter-input:focus {
* 10px control margin + ~50px control + gap, the same rail .live-header uses. */
.live-legend[data-position="tr"],
.live-legend[data-position="br"] { right: var(--live-ctrl-rail-legend, 68px); }
/* #1055 owner report: a legend in a bottom corner grew up to the nav band,
* under the open MESH LIVE panel, and hid its right end. It now stops under
* the panel (live.js publishes the panel's bottom as --live-panel-bottom)
* and scrolls the rest, as it does on a short window. */
.live-legend[data-position="bl"],
.live-legend[data-position="br"] { --live-legend-top: max(64px, var(--live-panel-bottom, 0px)); }

/* #875: in short landscape viewports the control stack is a row across the top
* right (see #666), not a column, so the right-hand corners keep below it
Expand Down
Loading
Loading