Repository navigation
A glass or blur background resizes with its box's layout transition on iOS - #544
Open
rami-maalouf wants to merge 1 commit into
Open
rami-maalouf wants to merge 1 commit into
rami-maalouf wants to merge 1 commit into
Conversation
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.
Summary
On iOS, a box with
backgroundMaterial(glass or a blur) and-exact-layout-transitionjumped to its new size in one frame, while its border and shadow animated. The transition sizes the painted surface each frame (applySurface), but the material is a view the node holds (materialView, orglassSlotin a glass group), and it kept the laid-out frame.applySurfacenow sets the material's frame to the surface's box each frame, andendSurfacegives it the laid-out bounds back. In a glass group, UIKit then draws a resizing glass merging with and separating from its neighbours.Evidence
In an app, a glass text field in a glass group widens by 167 points when a neighbouring glass button leaves. Before the change, Simulator recordings showed the glass reach its new width between two 60 Hz frames, in both directions. After it, the glass follows the transition over about 250 ms, and the neighbour's glass pulls away from the field's end as the field shrinks.
Validation
BoxLayerIOSTests.testLayoutResizeSizesTheMaterialAndGivesItBack, forglassandultra-thin: fails without the change and passes with it (bun host/apple/build.mjs --test --ios --only BoxLayerIOSTests, iOS 26 Simulator, at29e5bbd724). All 19 tests in the class pass with the change.bun host/apple/build.mjs --tvos --no-install: passed.bun scripts/caps.mjs: passed.os(iOS) || os(tvOS).🤖 Generated with Claude Code