Repository navigation
🤖 fix: allow zoom, and keep phone text fields at 16 px so iOS does not zoom on focus - #5992
Merged
Merged
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1411e9995e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
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.
Summary
The app's viewport meta blocked pinch zoom, so users with low vision could not enlarge text, and Lighthouse failed
meta-viewport. This PR removes the zoom lock. iOS Safari zooms the page when a text field with text smaller than 16 px gets focus, and the zoom lock had suppressed that. So this PR also raises text fields to 16 px on phone-width touch screens. Desktop does not change.Fixes #5972
Changes
index.html: the viewport content dropsmaximum-scale=1.0anduser-scalable=no. It keepswidth=device-width, initial-scale=1.0, viewport-fit=cover, interactive-widget=resizes-content.globals.css, in a new block(pointer: coarse) and (max-width: 768px), (pointer: coarse) and (orientation: landscape) and (max-height: 500px): the width branch covers phones in portrait, and the height branch covers phones in landscape, which are wider than 768 px. The existing(max-width: 768px) and (pointer: coarse)block keeps its scope.--min-text-entry-font-size: 16pxis defined there, so it does not exist on desktop.inputwithout a type and with types text, search, email, url, tel, password and number, plustextarea,selectandcontenteditable. Buttons, checkboxes, radios and ranges are not affected.text-xsandtext-smclasses.text-lgup totext-3xl) are skipped, so they keep their size.max(16px, 1em)cannot do this: insidefont-size,1emis the parent's size, and in Chromium it shrank the 18 px workspace-name input to 16 px.VimTextArea.tsx(the composer): the composer sets its size as an inline style, which beats any stylesheet rule. Its ghost-hint overlay copies that style to stay aligned. The inline size is nowmax(13px, var(--min-text-entry-font-size, 0px)). On desktop the variable is undefined, so the composer stays at 13 px. The style object keeps the same keys.Validation
viewportHeight.test.tsgains "lets users zoom the page". It reads the viewport meta fromindex.htmland fails ifuser-scalableisnoor0, or ifmaximum-scaleis below 5. It fails on main. Addingmaximum-scale=1.0alone, oruser-scalable=0alone, makes it fail.maximum-scale=5passes.isMobile,hasTouch), and(max-width: 768px) and (pointer: coarse)matched. I measured every visible text field on the seeded workspace, the command palette, all 16 Settings sections, the forms behind "Add" buttons in Providers, Models, Plugins and Layouts, the first-run wizard and the project creation page. Both runs found the same 31 fields. Before this PR, 30 were below 16 px. After it, none are. The 18 px workspace-name input keeps its size.make static-checkpasses.make check-react-compilerreports 23/24 (the 1 known skip isProjectSidebarInner).Limits
text-[18px]would get 16 px on phone-width touch screens. No field uses one today.pointer: coarse, so ordinary Pixel snapshots cannot show the rule. TheApp/TouchTextFields/Contractstory reads the shipped rule from CSSOM instead, likecoarsePointerMinHeightinApp.phoneViewports.stories.tsx. It checks both media branches, the 16px minimum, which fields the selector matches (composer, palette, compact Settings inputs, a type-less input) and skips (the 18 px workspace-name input), and that the composer's inlinemax()resolves to 16px once the variable is set. Reverting each part of the fix makes it fail. Real touch emulation in the Storybook runner was tried and not used: Chromium keeps(hover: none)after touch emulation is turned off, so touched stories would need their own file, isolated from every other story.#5995 tracks the device checks this PR could not run (the terminal's contenteditable root, the unmeasured forms, a real iPhone). #5993 tracks an unrelated flaky E2E test (
remoteConnection.spec.tsclipboard permission) that failed once on this PR and passed on rerun.Screenshots
390 px with touch emulation, before on the left, after on the right.
Composer:
Command palette:
Settings > Models:
Settings > Backup:
Generated with
xum• Model:anthropic:claude-opus-5-5• Thinking:high• Cost:$43.79