Layouts for iPhone, iPad, MacBook and 1K/2K/4K screens - #19
Merged
Merged
Conversation
Audited every view (landing, Rietveld, magnetic, PDF, single crystal, the header menus) at 20 viewports — iPhone 16e / 17 Pro / Air / 17 Pro Max (portrait and landscape), iPad mini / Air 11" / Pro 13" (both orientations), MacBook Air 13"/15", MacBook Pro 14"/16", iMac 24", Pro Display XDR, 720p, 1080p, 1440p and 2160p — for clipped or overflowing text, overlapping text and controls, overlapping layout siblings and horizontal scroll. All come back clean, on the dev server and the production build. Large screens - The page column is capped at 2560px (was 2100), so a QHD / Studio Display window is used edge to edge. - Dense large screens zoom the whole UI (--ui-zoom: 1.125 at the XDR's 3008px, 1.5 on a 4K monitor at 100%, 2 on 5K+). A 4K@1x screen had sub-2mm type in a 2100px island. The height guard keeps a 3440×1440 ultrawide at 1:1. The shell height, the magnetic plot height, the tooltip position and the 3D canvas's pixel ratio divide by the zoom (src/app/ui/cssZoom.ts). - WorkbenchPlot draws in CSS px: the viewBox is the measured box, and the bands are laid out from the bottom. At 560px tall it is the old layout unit for unit. The fixed 560-unit viewBox scaled every glyph with the card height, so labels were ~5px on an iPad and ~30px at 4K. Now they follow the UI's micro type. The left margin fits the widest y label, the x tick count fits the width, the last x label stays inside the plot (PDF "30.0" was cut off), and the legend is laid out from its label widths (the "calc" swatch butted into "diff") and wraps on narrow plots. iPhone / iPad - viewport-fit=cover with safe-area insets in the column edge, the header and the footer. The shell uses 100dvh, since iOS 100vh hid the footer under the toolbar. text-size-adjust is on. On iOS only, maximum-scale=1 stops the zoom-in whenever a 12px value field gets focus; pinch zoom still works. theme-color and home-screen web-app metas are added. - When the working row stacks (≤820px, portrait ≤1100px, or ≤540px tall), the page scrolls as one document, so the header and beta bar scroll away. They used to take 40% of an iPhone screen, and over half in landscape. - Header: on phones and small tablets, two ordered rows (brand + menus, then navigation + GPU) instead of four wrapped ones. Phones drop the Powder|Crystal indicator and the beta pill. 901–1180px fits one row. On touch screens the chip heights now match. - On phones the beta bar keeps its point (reproduce in the named tools) and the limitations link in two lines instead of five. - Fixed: the landing's demo card overlapped the load cards on phones. The PDF page overflowed a phone sideways, because its step grid had an auto column and the five-way view toggle forced it wider. On an iPad in portrait the stacked row shrank, so the plot card's caption ran into the parameter card. Summary cards no longer leave an orphan beside a hole in the two-column band. The coarse-pointer 34px rule no longer bloats a phase chip's ×. The README screenshot is regenerated. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016EDizNur3M6PHzmycLpjis
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.
Tunes the workbench layout for current Apple devices and for 1080p, 1440p and 2160p monitors.
How it was checked
A Playwright audit loaded every view at 20 viewports:
The views were the landing page, Rietveld, magnetic, PDF and single crystal, plus the header menus. For each one it took a screenshot and measured with
getBoundingClientRect(and text ranges), looking for:overflow:hiddenboxBefore the change it found real overlaps and overflow on phones and tablets. After it, every view at every viewport is clean, on the dev server and on the production build.
Large screens
--ui-zoom): 1.125 at the XDR's 3008px, 1.5 on a 4K monitor at 100%, and 2 on 5K and up. Before, a 4K@1x screen showed sub-2mm type in a 2100px island. A height guard keeps ultrawides at 1:1.src/app/ui/cssZoom.ts).WorkbenchPlotnow draws in CSS pixels. The old fixed 560-unit viewBox scaled every glyph with the card height, so labels were ~5px on an iPad and ~30px at 4K. At a 560px-tall plot the new layout is identical to the old one.iPhone / iPad
viewport-fit=coverwith safe-area insets.100dvhfor the shell, because iOS100vhhid the footer under the toolbar.text-size-adjustis set.maximum-scale=1stops the page zooming into a focused 12px input. Pinch zoom still works.theme-colorand home-screen web-app metas are added.Verification
npm run build,npm run lintandtsc -bare clean.npm test: 1430 passed, 111 skipped.Merging deploys the GitHub Pages demo (
deploy.yml).🤖 Generated with Claude Code
https://claude.ai/code/session_016EDizNur3M6PHzmycLpjis
Generated by Claude Code