Add view transitions to the shell - #567
Open
AllTerrainDeveloper wants to merge 1 commit into
Open
Conversation
A new `src/view-transitions/` layer built on the View Transitions API. Transitions are CSS, not JavaScript: the player starts a transition carrying a view-transition *type* and `assets/css/view-transitions.css` owns every keyframe, so a plugin ships one as a registry entry plus a stylesheet. Two settings, one registry partitioned on a def's `scope`: - Screen (25) — switching Space, and any appearance change. - Window (7) — a window opening, closing, minimizing, restoring or maximizing. On open the window morphs out of whatever the user pressed, inferred from the last pointerdown rather than threaded through every caller. Separately, `chromeless.css` opts framed admin pages into cross-document transitions, so navigating inside a window animates. Both default to `none`; every wired surface keeps its original un-animated path behind a `hasActiveViewTransition()` guard. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.
Animates the moments the shell changes state, using the browser's View Transitions API.
A transition is CSS, not JavaScript — the player starts one carrying a view-transition type, and
assets/css/view-transitions.cssowns every keyframe. A plugin ships one as a registry entry plus a stylesheet, with no animation code and no teardown.What's in it
Two settings (OpenStation Preferences → Effects), one registry partitioned on a def's
scope:pointerdownrather than threaded through every caller — so it works for launchers that don't exist yet, including a plugin's (data-os-vt-launcher).Cross-document transitions are separate and always on:
chromeless.cssopts framed admin pages in, so navigating inside a window animates instead of flashing blank.Both settings default to
none, and every wired surface keeps its original un-animated code path behind ahasActiveViewTransition()guard.How to test
Turn something on in Preferences → Effects. Picking a transition plays it immediately; "Play it again" replays.
Morph, then click a wallpaper icon or a dock tile. The icon should stretch into the window. Then close it, minimize it, click its dock tile to bring it back, and double-click a title bar to maximize. TryGenie,Slam,Unfoldfor different character.Cube, then press Left / Right to change Space. Direction-aware ones should mirror between the two.Ripple, then swap the wallpaper (or the accent, or a desktop theme). The new look should flood out from where you clicked.Three deliberate non-animations, so they don't read as bugs: session restore at boot, keyboard/programmatic opens (no click to morph from), and
prefers-reduced-motion.Chrome/Edge 126+ for the full path; older engines degrade a step at a time rather than breaking.
🤖 Generated with Claude Code