Repository navigation
✨ Motion M4: surfaces in the page bud, reshape in place and give way where they stand - #119
Merged
Merged
Conversation
…ce bud and give way as surfaces
… reshaped in place, giving way where they stand
…hat it did, then dismissed
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.
Motion milestone M4, "in the page" (plan 071), as approved 2026-11-19: A, Bud, with the first option of every decision 25–35.
What it does
One primitive,
web/src/lib/morph/surface.ts, behind every surface in the page. A surface is one box at its true size and radius: while it moves, the engine's own box draws its look (fill, edges, shadow) and the element, clipped to that box, keeps only its words, which never move. At rest nothing of the engine is left.watchPressesnotes the control pressed; its place is read on the press only for a control that opens something (aria-haspopup,aria-expanded), one inside a surface, or one markeddata-buds. Any other press (Play included) costs aclosestand no layout read. A right-click's menu is born at the pointer, a submenu at its item's chevron, a toast and the selection bar at the floor. Bud on--morph-fast(editors on--morph), words @30 (@90).GainConfirmis now a face of the menu, not a second surface. The same goes for File info, a phone's Add to playlist, Undo's toast, the match sheet's review and its Back (no slide from the left), Export's steps and a merge's new plan. Old words give way as a picture and the new come @140 (@90 on a toast); the box's look (the confirm's fox edge and misprint) turns on the same spring.Morphs.layAgain, choreographylaid-again): the editor's picture goes undermain, and the page gathers 0.04 around the press.<dialog>and buds from its button. No sheets on a phone: GainConfirm, Add to playlist, Sort, the merge confirm and the bar's More are the menu or confirm reshaped in place at the phone's width, clear of the island.Floatingand the toasts take the page's 1.25 size step (a 375 px menu and a 525 px confirm at 3840).--curve-settleis gone from every surface, the selection bar and the toasts. Reduced motion: a 120 ms blend, shapes set at once.Proof
web/e2e/surfaces.e2e.tsadds 13 structural tests on a clock slowed almost to a stop: the menu is born at the ⋯ at the ⋯'s size; the confirm is the same element and starts where the menu was drawn; the menu leaves in place; a reopen hands over; a submenu is born at its chevron; a toast is born at the floor and Undo changes it in place; a second toast stands in front; the bar is born at the floor and its count re-pressed; the editor goes under the page while the page's units arrive; the phone confirm stays in place with no scrim; reduced motion; the 4K step. The three phone tests that asserted sheets now assert the reshape, and Trash's Undo test asserts "Brought back".surfaces×20, 240/240;surfaces journeys rooms moment×10, 680/680;momentalone ×10, 160/160. One earlier run of the combined set lost 2 of 680 tolandedtimeouts inmoment's 3840 tests under 16 workers. They didn't recur alone or in the next combined run.GOWORK=off mise run check: exit 0 (170 e2e).Perf
The browser suite (
web/perf) on this branch and on agit archiveof origin/main, withKITSUNE_PERF_PORT=15790. The Go speed tests were left out because no Go changed (main's own run trippedTestStreamFirstByteSpeedon this shared machine). The machine has no GPU and other sessions were running on it, so main itself breaks 6 budgets per full run. Two specs changed, because Undo's toast now stays to say what it did and a leaving toast's picture also has the.toastclass:perf/trash.perf.tsandperf/playlists.perf.tsdismiss the toast after Undo and ignore pictures.Full runs, one each (p95 ms):
The first full branch run's 1k album block (Play on the album page, Next, Previous, both Stars) and its 50k Home cover play were outliers. None of those touches a surface. The alternating re-runs of those specs below put base and branch in the same band. Each spec runs base, branch, base, branch (p95 ms):
Trash's fold at 50k is the press that also closes a menu, so it was run twice more on its own, alternating. Base p95 was 35.1 and 28.6, branch 34.6 and 34.3; medians were 22.9 and 22.0 against 22.7 and 25.9. All are within the 36 ms budget. The menu opening (
row-menu16.4 → 16.4,columns-menu17.0 → 17.2) and the add-to-playlist toast (16.5–16.9 against 17.5) are unchanged: a bud writes its first pose before the first paint and adds no frame.Screenshots
Every press was caught at 0/12/30/55/110% of its settle: menu, confirm, close, submenu, toast, Undo, bar, count, popover, editor in and out, the phone's confirm and list, and the 4K confirm. They are kept outside the repo, in the session's scratchpad
m4build-shots/. The boards' runtime (support.js) isn't on disk, so the build was compared with the boards' documented poses and lengths, not with rendered board frames.Departures from the boards and decisions made
motionfield is removedstilldimming backdroplayInFront)--curve-settlestays intokens.cssfor motion outside M4: the hero's growth, the island, the rail's letter, the shuffle card and a column's drop. The 140/180/200/240/260 ms lengths are gone rather than tokenised, because surfaces run on the springs.DESIGN.md (motion: Bud verb, "Surfaces in the page (M4)", Open drift) and the plan's Status line are updated in the docs repo, which this PR doesn't touch.