Repository navigation
fix: the Controls rail keeps its frame buttons while the canvas is locked, and the phone's text fields no longer zoom the page (v0.21.4) - #339
Merged
Conversation
…le the canvas is locked (v0.21.4) Part of #338. Since v0.12.0 the "Group frame" tool and "Clear all frames" were removed from the Controls rail while the canvas was edit-locked, so the rail grew shorter by a button's height for each and every button above them moved down. They now stay in place as native disabled buttons, left out of the Tab order like the other controls the lock disables (#334); in the same document the rail has the same buttons, the same 26 px button height and the same overall height locked and unlocked. The stores already refused both edits while locked. Locking also turns an armed frame tool off (editPolicy), however the lock comes on: its button is disabled while locked, and an armed tool kept drag-to-pan off and started a frame draft the stores then refused. A disabled rail button takes the disabled text colour (GrayText in forced colours) and no hover fill. Tests: three e2e tests (the rail's buttons, heights and height locked vs unlocked, with and without a frame, light / dark / forced; the two buttons disabled, skipped by Tab and inert, working again unlocked; arming then locking turns the tool off and a drag pans), a unit test for the disarm, and the large-graph frame test now expects the two buttons disabled instead of absent. Baselines: the gacha and Early MMO Template views, light and dark, show the disabled frame button(s) in the rail (both Templates open locked) and are replaced; the two MMO ones also take in the drift v0.21.3 kept. The other 72 are byte-identical. Release 0.21.4 with three release-note lines in 18 languages; the copy guards move only their exact pins (catalog 1040 to 1043, runtime 1262 to 1265), pt-PT's difference stays 277.
Deploying cozy-loop-studio with
|
| Latest commit: |
703f00d
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://45c86fc0.cozy-loop-studio.pages.dev |
| Branch Preview URL: | https://fix-rail-frame-buttons-locke.cozy-loop-studio.pages.dev |
…sing the language search no longer zooms the page in (v0.21.4) Part of #340. On an iPhone, Safari zooms in on a focused text field smaller than 16 px and does not zoom back out. The More sheet's language search was 12 px (font: inherit from its menu), so after a search the page stayed zoomed until it was pinched back. docs/mobile.md MV4b had fixed this for the Monte-Carlo fields alone, and #300 for the share password field alone. Under the mobile media query every text-like field (input of any type but checkbox, radio, range, file, colour, button, submit, reset and hidden; textarea; select) now takes font-size max(16px, 1em), so a field added later cannot bring the zoom back. Zoom itself is never blocked: the viewport meta keeps no maximum-scale and no user-scalable=no. The desktop is unchanged. Tests: a phone-project e2e test reads every visible text field's computed size on the canvas, in the More sheet, in the language menu (typing into its search and closing it), in the share panel and in the Monte-Carlo dialog; it fails without the rule. No screenshot baseline changes. Release 0.21.4 gains a fourth release-note line in 18 languages; the copy guards move only their exact pins (catalog 1043 to 1044, runtime 1265 to 1266), pt-PT's difference stays 277.
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.
Part of #338 and #340. Released together as v0.21.4 (the release date is set to the actual merge day in Seoul before merging): two small, independent fixes in one patch release, each with its own issue for tracking and verification.
#338 — the Controls rail under the lock
The bug
While the canvas is edit-locked, two buttons disappeared from the Controls rail instead of staying disabled: "Group frame" (the draw-a-frame tool) always, and "Clear all frames" in a document with frames. The rail is anchored at the bottom, so it grew shorter and every button above them moved down by a 26 px button height. Measured on
mainat70a9c37in light, dark and forced colours: 12 to 10 buttons with saved frames (rail top 531 to 583 px, height 314 to 262 px), 10 to 9 without. This has been the case since v0.12.0 (#243); it is not a v0.21.3 regression: #334 made the other editing controls disabled while locked but did not cover these two.A frame tool armed before locking also stayed armed: a drag on the empty canvas started a frame draft the stores refused, and drag-to-pan stayed off.
The change
disabledbuttons (src/components/Canvas.tsx), left out of the Tab order like every control fix(canvas): a new document starts unlocked, and the edit lock blocks every user edit (v0.21.3) #334 disables. In the same document the rail has the same buttons, the same 26 px button height and the same overall height locked and unlocked. The stores already refused a frame drawn or cleared while locked (fix(canvas): a new document starts unlocked, and the edit lock blocks every user edit (v0.21.3) #334), so nothing else changes.src/store/editPolicy.ts).GrayTextin forced colours, and no hover fill (src/index.css), like the fix(canvas): a new document starts unlocked, and the edit lock blocks every user edit (v0.21.3) #334 chips.Measured on this branch, light, dark and forced colours: 12 to 12 buttons with saved frames and 10 to 10 without; the rail's top, height and bottom and every button's place and height identical locked and unlocked.
Tests
e2e/canvas-lock.spec.ts, three new tests: the rail's buttons, each button's height and the rail's top and height are identical locked and unlocked, with and without a frame, in light, dark and forced colours, and a disabled button's colour differs from an enabled one's; while locked both buttons aredisabled, Tab skips them and clicking them changes nothing, and unlocked they work again; arming the tool and then locking turns it off, and a drag on the empty canvas then pans and draws no frame. All three fail onmain.src/store/editPolicy.test.ts: locking disarms the tool; unlocking does not arm it again.e2e/large-graph-readability.spec.ts"under the edit-lock and on mobile a saved frame is view + select only": its two assertions that the buttons are absent while locked now expect them disabled (same title).#340 — the phone's language search zoomed the page in
The bug
On an iPhone, tapping the language search in the phone's ⋯ sheet zoomed the page in, and after the search and the menu closed the page stayed zoomed until it was pinched back. iOS Safari zooms in on a focused text field smaller than 16 px and does not zoom back out. Measured on production (
v0.21.3) in a phone layout: the search field computed to 12 px (font: inheritfrom its menu); on the desktop it is 16 px.docs/mobile.md§MV4b had fixed this for the Monte-Carlo fields alone, as "the only place a mobile user focuses a field", and #300 for the share password field alone; the language search came later.The change
inputof any type but checkbox, radio, range, file, colour, button, submit, reset and hidden,textarea,select) takesfont-size: max(16px, 1em)(src/index.css), so a field added later cannot bring the zoom back and one already larger keeps its size.maximum-scaleand nouser-scalable=no, and nothing forces the page scale back.Tests
e2e/mobile.spec.ts, one new test in the phone project: every visible text field is at least 16 px on the canvas, in the More sheet, in the language menu, in the share panel and in the Monte-Carlo dialog; the language search stays on screen, filters as typed and gives up focus when the menu closes. It fails without the rule.703f00d, checked by Hanrim, in Safari and in the Home Screen app installed from the preview: search, type, choose a language, close the menu; and search, type, cancel, close the menu. In all four runs the search field stayed visible above the keyboard, and after the menu closed the page was back at its original scale with no pinch needed. Passed.Visual baselines
4 of the 76 PNGs change, by approval; the other 72 are byte-identical to
main.mainitself (ko-desktop-app,ko-long-label-and-tip,frames-activity,state-inspector-light), which are kept.flow-colour-views-visualflow-views-template-gacha-lightand-dark(onmainthey rendered exactly as committed; the fix adds the disabled "Group frame" and "Clear all frames"), andflow-views-template-mmo-lightand-dark(the fix adds the disabled "Group frame"). The two MMO baselines also carried the earlier drift that v0.21.3 deliberately kept (about 800 px at the dot nodes, and the lock button's pre-v0.21.3 drawing); replacing them takes that drift in too, since the fix's change and the old drift together no longer fit the tolerance.Release
.changes/rail-frame-buttons-locked.json(one declaration per change, for the whole release), release noterelease:0.21.4with four lines in 18 languages, 16 without native review. The keyboard line says "the keyboard", not the Tab key's name, and the phone line says "a phone", not the iPhone, so no guard has to declare an English word.docs/canvas-edit-lock.md(where the lock is enforced, and its tests),docs/mobile.md§MV4b (every phone text field),CHANGELOG.md,README.md.Verification (local, at the head commit)
npx tsc -b, oxlint (39 warnings, the existing baseline, 0 errors), 3,271 unit tests, all 21 source checks of the CIchecksjob, and the web, portable and PWA builds with their closure and notice checks;git diff --check.main, none added or removed.main's 2,030 and the 4 added, none removed); each chromium and mobile test in exactly one of the 5 shards.Not claimed