Stop the fitness gate reporting Mapbox's own wrappers as clipped
Some checks are pending
build-gate / build (push) Waiting to run
Some checks are pending
build-gate / build (push) Waiting to run
On its first real verdict, clause E failed on ALL EIGHT viewport/target
combinations with docOverflow=0 and the same two elements every time:
mapboxgl-canvas-container and mapboxgl-control-container. Both are GL-JS's own
wrappers, legitimately zero-height with children -- the canvas container
collapses because the canvas is absolutely positioned, the control container is
an empty positioning shell. Neither is a layout defect.
That was 8 of the gate's 12 failures: a false signal loud enough to drown the
one real finding underneath it (clause B -- a wheel below the map scrolls
nothing on the composite leaf). A gate that reports four-fifths noise teaches
its reader to skim the summary line, which is the failure this file was written
to end. So the exemption is a correctness fix, not a convenience.
Scoped by PREFIX rather than an exact class list, because GL-JS composes these
as multi-class strings ("mapboxgl-canvas-container mapboxgl-interactive") and
adds more across versions. Kept narrow to mapboxgl-/maplibregl- so it cannot
silently swallow a real defect in our own markup.
Negative-tested as a predicate, 7/7: both real false-positives and the maplibre
equivalent are exempt; rd-shell, pgg-root and region-card__footer are NOT; and
"my-mapboxgl-thing" does not match mid-string. check:mjs-parse passes.
The gate could not be re-run end-to-end for a before/after verdict -- the shared
build queue has been busy continuously (check:settled reported dirs=2/17
leaves=0/40 mid-clean). Predicate proven in isolation; the full verdict is owed.
This commit is contained in:
parent
1a00cac2f7
commit
4d9b90f3e3
1 changed files with 19 additions and 0 deletions
|
|
@ -396,10 +396,29 @@ async function runResponsiveSweep(url, label) {
|
|||
// Elements clipped to zero height: anything with real content but 0 rendered height.
|
||||
// Exempt .rd-td/.rd-th (text-overflow:ellipsis is EXPECTED there — the brief's own carve-out)
|
||||
// and anything with zero content (legitimately-empty containers are not a clipping defect).
|
||||
// ★ MAPBOX INTERNALS ARE EXEMPT TOO (added 2026-09-23, after the first real verdict).
|
||||
// On its first run this clause failed on ALL EIGHT viewport/target combinations with
|
||||
// docOverflow=0 and the SAME two elements every time: mapboxgl-canvas-container and
|
||||
// mapboxgl-control-container. Both are GL-JS's own wrappers, legitimately zero-height with
|
||||
// children — the canvas container collapses because the canvas is absolutely positioned, and
|
||||
// the control container is an empty positioning shell. Neither is a layout defect.
|
||||
//
|
||||
// That was 8 of this gate's 12 failures on its first verdict: a false signal loud enough to
|
||||
// drown the ONE real finding (clause B, a wheel below the map scrolling nothing). A gate that
|
||||
// reports four-fifths noise teaches its reader to skim the summary line, which is the same
|
||||
// failure this file was written to end — so the exemption is a correctness fix, not a
|
||||
// convenience.
|
||||
//
|
||||
// Scoped by PREFIX rather than an exact class list, because GL-JS composes these as
|
||||
// multi-class strings ("mapboxgl-canvas-container mapboxgl-interactive") and adds more of
|
||||
// them across versions. Kept NARROW to mapboxgl-/maplibregl- so it cannot silently swallow a
|
||||
// real defect in our own markup.
|
||||
const VENDOR_ZERO_HEIGHT = /(^|\s)(mapboxgl|maplibregl)-/;
|
||||
const all = __walk('*');
|
||||
const clipped = [];
|
||||
for (const el of all) {
|
||||
if (el.classList && (el.classList.contains('rd-td') || el.classList.contains('rd-th'))) continue;
|
||||
if (el.className && VENDOR_ZERO_HEIGHT.test(String(el.className))) continue;
|
||||
const r = el.getBoundingClientRect();
|
||||
const hasText = (el.textContent || '').trim().length > 0;
|
||||
const hasOwnChildren = el.children && el.children.length > 0;
|
||||
|
|
|
|||
Loading…
Reference in a new issue