Skip to content

Add window reveal animations - #459

Merged
AllTerrainDeveloper merged 2 commits into
trunkfrom
add/window-reveal-animations
Jul 31, 2026
Merged

Add window reveal animations#459
AllTerrainDeveloper merged 2 commits into
trunkfrom
add/window-reveal-animations

Conversation

@AllTerrainDeveloper

@AllTerrainDeveloper AllTerrainDeveloper commented Jul 30, 2026

Copy link
Copy Markdown
Collaborator
Example.mov
image

Windows now uncover their content with a clip-path animation when they finish loading, instead of fading in. It plays right after the loading spinner clears — and on reloads and in-window navigation too, same as the spinner does.

Twelve reveals to pick from in OS Settings → Effects, plus a speed setting next to it. Off by default, so nobody gets one they didn't choose.

Sweep · Rise · Diagonal · Iris · Diamond · Curtain · Shutter · Blinds · Slats · Mosaic · Radar · Camera shutter

The animation runs on a layer in the shell that sits above the window content without wrapping it, so it can never interfere with the page it's revealing. Iframe and native windows behave identically.

Camera shutter is a real iris: six equilateral wedges tiling a hexagon over the window, sliding tangentially. Their shared edges offset by the same amount, so they stay flush the whole way while a centred hexagonal aperture opens between them. It's rendered as SVG rather than clip-path layers, because a lens iris has a cyclic overlap — every leaf over the next, the last back under the first — that a linear paint order can't represent.

Theming

Token Default
--desktop-mode-window-reveal-surface white
--desktop-mode-window-reveal-edge transparent (off)
--desktop-mode-window-reveal-edge-thickness unset
--desktop-mode-window-reveal-duration unset

The edge is a band that travels with the animation's leading edge, drawing whatever shape the active reveal has. It's off unless a theme colours it, and costs nothing while it is.

Themes can also recommend a reveal and a speed in their manifest, so the Themes tab button is now "Apply X's recommended layout and effects".

For plugin authors

wp.desktop.registerWindowReveal() takes a from/to clip-path pair, a layers array for effects whose parts overlap, or a render() that builds the DOM outright while the shell keeps the timing. Recipe in docs/examples/window-reveal.md.

Testing

Turn a reveal on in OS Settings → Effects and open or reload a window. Reloading a cached window exercises the fast path where the spinner never appears.

2681 JS tests and 1700 PHP tests pass. The reveals have been checked visually.

🤖 Generated with Claude Code

Open WordPress Playground Preview

AllTerrainDeveloper and others added 2 commits July 31, 2026 01:02
Windows uncover their content with a clip-path animation when they
finish loading, instead of fading in. Twelve reveals to choose from in
OS Settings → Effects, plus a speed setting.

The animation runs on a layer in the shell that sits above the window
content without wrapping it, so it never interferes with the page it is
revealing. Iframe and native windows behave the same.

Themeable via four tokens (surface colour, edge colour, edge thickness,
duration), and themes can recommend a reveal and a speed in their
manifest.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Six equilateral wedges tile a hexagon over the window and slide
tangentially. Their shared edges offset by the same amount, so they
stay flush the whole way while a centred hexagonal aperture opens
between them.

Rendered as SVG rather than clip-path layers: a lens iris has a cyclic
overlap that a linear paint order cannot represent. Adds a `render`
escape hatch to the reveal API for effects layers cannot express, plus
per-layer colours and multi-layer defs.

Reveals now default to None, so nobody gets one they did not choose.

Two fixes worth noting:

- The renderer's play callback lived in module-level state, so the arm
  (window-system bundle) and the play (shell bundle) used different
  copies. Reveals vanished on window open while reload still worked.
  Now shared-store backed.
- Rendered hosts no longer take the surface token's background, which
  had them uncovering an opaque rectangle instead of the page.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

@epeicher epeicher left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for adding those animations, they look cool! I have tested them and they work as expected. I have also reviewed the code and I have not found any blockers. LGTM!

@AllTerrainDeveloper
AllTerrainDeveloper merged commit 1f94934 into trunk Jul 31, 2026
6 checks passed
@AllTerrainDeveloper
AllTerrainDeveloper deleted the add/window-reveal-animations branch July 31, 2026 10:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants