mirror of
https://github.com/garrytan/gstack.git
synced 2026-12-02 04:43:59 +01:00
Crowded-screen layout check catches cut-off and overlapping text it used to miss (GST-4159) (#4894)
The first-use layout check now catches overlapping text below the bottom of the window and cut-off text inside nested boxes, reports a screen with too much text as not measured instead of passing it, and saves its result in one step. Why: four gaps found in the final review of #4893 could let a crowded screen pass the first-use check with text that's cut off or painted over. Nothing to do: the play spec and commands are unchanged. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> Review-Finding: p1/specialist-batched#1 reader=red-team Review-Finding: p2/adversarial-native#1 reader=adversarial-native Review-Finding: p3/outside-voice#1 reader=outside-voice
This commit is contained in:
1 parent
b2e9522b2f
commit
e4a69b0b52
8 files changed
+98
-17
No files matched your search
+2
-1
@@ -379,7 +379,7 @@ finding a waiver did not answer makes the section open.
|
||||
| `note-in-row-weight` | ask | in a list of rows, a note with no icon and no surface of its own, OKLCH lightness within 0.15 of the name's and size 0.9 or more of it; or, at 1200px and wider, a note of three lines or more | mute the note, or give it an icon or a callout |
|
||||
| `small-hit-area` | ask | at 480px and narrower, a control inside a list row under 32px in either dimension (an input's label counts toward its box; a link inside a run of text is exempt) | a 32px target that keeps the glyph its size |
|
||||
| `section-overflow` | ask | an element inside the section whose right edge passes the viewport (outside any scroller), or a non-scrolling element whose content is wider than its box | wrap or shrink it, or give it a scroller |
|
||||
| `text-clipped` | ask | `--full-house` only: an element that hides its horizontal overflow (`overflow-x` hidden or clip, ellipsis included) holds text wider than its box by more than 1px; boxes under 4px and visually hidden text (`clip` or `clip-path`, the screen-reader-only pattern) are skipped, and only the innermost of nested clippers reports. The evidence says how much of the text shows | let the text wrap, shrink it to fit, or give the box room for the longest value |
|
||||
| `text-clipped` | ask | `--full-house` only: an element that hides its horizontal overflow (`overflow-x` hidden or clip, ellipsis included) holds text wider than its box by more than 1px; boxes under 4px and visually hidden text (`clip` or `clip-path`, the screen-reader-only pattern) are skipped, and text inside a nested clipper that already reports counts only toward that box, so an outer box reports only the rest of the text it cuts. The evidence says how much of the text shows | let the text wrap, shrink it to fit, or give the box room for the longest value |
|
||||
| `text-overlap` | ask | `--full-house` only: two text runs from different elements (an absolutely or fixed positioned child counts against its parent's own text), whose line boxes (glyph rows trimmed to the line height and cut to any clipping ancestor) overlap by more than 2px in both directions. The pair is skipped only when an opaque surface on one side, at least four times the other run's area and painted above it (positioned, or on its own layer, and topmost at the overlap), hides that run's whole line (a dialog over the page), sits in a fixed overlay (a toast or callout floating over the page), or is a sticky bar. A badge with its own background over part of a score, and text spilling into the next row's background, still report. Up to 50 findings per rule and screen, so waivers can't hide an unwaived one | put the badge or label in the flow beside the text, or reserve space for it |
|
||||
|
||||
How it reads the page, with no test hooks (no `data-testid`, no attribute at
|
||||
@@ -439,6 +439,7 @@ them all:
|
||||
| <a id="app-code-state_mismatch"></a>`STATE_MISMATCH` | the state's `expect` selector matched nothing | make the URL load the state it names, or fix `expect` |
|
||||
| <a id="app-code-within_no_match"></a>`WITHIN_NO_MATCH` | `--within` matched nothing in the document or any open shadow root | pass the custom element's tag or a selector inside the light DOM |
|
||||
| <a id="app-code-closed_shadow"></a>`CLOSED_SHADOW` | a custom element in the section (or, when nothing matched, on the page) renders a closed shadow root: no shadow root, no light DOM, 40px or taller | attach the shadow root with mode "open" in development, or pass a `--within` outside it |
|
||||
| <a id="app-code-too_much_text"></a>`TOO_MUCH_TEXT` | with `--full-house`, the section holds over 2000 lines of text, more than `text-overlap` can check | pass a `--within` that holds only the crowded part of the screen, then rerun |
|
||||
| <a id="app-code-probe_error"></a>`PROBE_ERROR` | a probe threw or answered in a shape the lint does not know | read the trace file; a page script that redefines DOM APIs breaks the probes |
|
||||
| <a id="app-code-asset_missing"></a>`ASSET_MISSING` | a linked stylesheet did not load (a font that did not load is only a `LINT_APP_NOTE`) | fix the stylesheet path or wait for the server, then rerun |
|
||||
|
||||
|
||||
@@ -129,5 +129,5 @@ With a handful of builds, this is a case series, not an eval. For each first ver
|
||||
- It doesn't dispatch the checker by itself; the thread that owns the build starts it with the brief.
|
||||
- It doesn't check the wording of other messages sent to the owner.
|
||||
- The crowded-screen check measures only horizontal cuts and overlapping text on web pages. It doesn't catch text cut off vertically, a `line-clamp` that hides lines, a number that wraps onto a second line, a screen the fixture doesn't seed, or native iOS, Android and Mac screens.
|
||||
- The crowded-screen measurement trusts the fixture URL: it doesn't check that the server there runs the build being sent (the record lists the origins it opened). It measures only text that paints on screen, so text marked `aria-hidden` still counts when it is visible. It waits for `wait_for` once before measuring each viewport rather than at each one, and compares at most 2000 line boxes per screen.
|
||||
- The crowded-screen measurement trusts the fixture URL: it doesn't check that the server there runs the build being sent (the record lists the origins it opened). It measures only text that paints on screen, so text marked `aria-hidden` still counts when it is visible. It waits for `wait_for` once before measuring each viewport rather than at each one, and checks at most 2000 line boxes per screen; a screen with more is reported as not measured (`TOO_MUCH_TEXT`).
|
||||
- It doesn't push a build through rough play (idling past a timer, a wrong answer, a dropped player). A pilot of that check caught the bug it was aimed at in 1 of 3 tries, so it was left out.
|
||||
Reference in new issue
Block a user