Repository navigation
Edge collision ratchet: a browser sweep that fails when one control covers another (Feature #388) - #1157
Merged
Conversation
#388) A browser sweep reads every visible control (button, a[href], input, select, textarea, [role=button], focusable [tabindex]) on workspace home, a space, the table, the board, the table with the View panel, the table with the Share panel, a record beside the table, a record page, a document and the command menu, at 1920, 1440, 1280, 1024, 960 and 768 px in Chromium and 390 x 844 in WebKit as the phone format. It reports two controls whose boxes meet by more than 2 x 2 px (neither inside the other) with elementFromPoint saying which is on top, a control cut by an overflow hidden box, and a control off the screen. Known findings sit in test/edge-collision-baseline.json per platform, each naming its Issue: #1861, #1875 and #1876. An entry with no Issue is refused, and an entry that no longer reproduces fails, so the baseline only shrinks. Light only: a theme moves no box, and test/theme-loop-guard.test.mjs refuses a theme loop over a geometry-only case. ponytail: content that scrolls out from under a sticky or fixed control is skipped per scroll box, not per axis; a sticky-left cell under a fixed control is still compared. Upgrade path: track sticky offsets per axis in stickyRoot when a finding needs it. Change-Id: I1131d1a1295311710ac49e81349be2cb3f1308ab
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Tracker: Feature #388 (https://weave.grunion.ai/w/weave/e/056ea404-eced-4023-a6df-65cb432a1737). Holds Issues #1861, #1875 and #1876.
What changed
test/lib/edge-collision.mjs: a page probe that reads every visible control (button,a[href],input,select,textarea,[role=button], focusable[tabindex]) and reports:overlap: two controls whose visible boxes meet by more than 2 x 2 px, neither inside the other;elementFromPointat the centre of the overlap names the one on top.clipped: a control cut by an overflow hidden or clip box, or past the start of a scroll box that cannot scroll back to it.off-screen: a control past the viewport's left or right edge, or past its bottom on a page that does not scroll.test/edge-collision-browser.test.mjs: 14 probe fixtures, then one case per screen: workspace home, space, table, board, View panel, Share panel, record beside the table, record page, document, command menu. Each runs 1920, 1440, 1280, 1024, 960 and 768 px x 900 in Chromium and 390 x 844 in WebKit (iPhone 15 profile) as the phone format.test/edge-collision-baseline.json: per platform, each entry names screen, width, theme, kind, both names and its Issue.test/edge-collision-core.test.mjsrefuses an entry with no Issue or listed twice. The gate fails on an unlisted collision and on an entry that no longer reproduces.changelog.d/edge-collision-ratchet-388.md.Matrix cut
Light only. A theme changes no box, and
test/theme-loop-guard.test.mjsrefuses a theme loop around a case that reads only geometry (DEVELOPMENT.md, Theme loops). The key still carries the theme. Every screen and width runs: about 85 s locally for the whole file, so no split was needed.Baseline (first run, darwin; linux seeded with the same and corrected from CI)
The
table-yieldlayout (table hides when the record, the View panel and the table cannot fit) is accepted as designed: a hidden table has no controls to collide.Verification
npm test -- --targeted test/edge-collision-core.test.mjs: green, 9 cases.npm test -- --targeted test/edge-collision-browser.test.mjs: green, 24 cases.npm test -- --targetedover no-inline-comments, theme-loop-guard, changelog-fragments, doc-owners, temp-dirs, spawn-timeout, ci-test, docs-drift: green.