Skip to content

Do not treat pinch zoom as keyboard contraction - #3105

Draft
Chris0Jeky wants to merge 2 commits into
codex/1739-layout-viewport-resizefrom
codex/1867-ignore-pinch-zoom
Draft

Chris0Jeky wants to merge 2 commits into
codex/1739-layout-viewport-resizefrom
codex/1867-ignore-pinch-zoom

Conversation

@Chris0Jeky

@Chris0Jeky Chris0Jeky commented Sep 15, 2026

Copy link
Copy Markdown
Owner

Purpose

Take #1867 item 1 as a bounded, stacked policy decision. useVisualViewport treated every VisualViewport resize identically, so browser pinch zoom (scale > 1) shrank and offset CardModal/TdDialog exactly like a software keyboard.

The rule is now explicit:

  • at scale 1, follow visualViewport.height and offsetTop as before;
  • above scale 1, let browser zoom own navigation and use the caller's existing fallback;
  • layout callers expose window.innerHeight / 0px;
  • unset callers remove the custom properties so their CSS dvh/vh ladder remains authoritative;
  • returning to scale 1 resumes visual-viewport geometry on the next event.

Red → green evidence

RED — exact test-only head. Commit b5affc810ec4f660f8d12103113fe0b94db4782a added only useVisualViewportPinchZoom.spec.ts. CI run 34916243641, Ubuntu frontend job 104214661061, passed lint, typecheck, production build, and PWA validation, then failed the frontend test phase. Its archived JUnit receipt contains exactly two failures, both in the new spec:

  • layout caller: received 260px, expected 900px;
  • unset caller: received 260px, expected an absent custom property.

No unrelated frontend test failed.

GREEN candidate. Commit 5f13a9f94d5db7dc8ee0b3c280aa62b4eae40d67 adds the scale-aware classification and documents the policy. Its exact-head hosted matrix is the evidence gate; this PR remains draft until that matrix completes and because it is stacked on #3104.

Scope

Refs #1867

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Pending

Development

Successfully merging this pull request may close these issues.

1 participant