Port the background-layer core seams from the dev core (Android) - #287
Merged
Conversation
Adds the LocalBackgroundLayerPresent composition local and its tabs Scaffold consumption, ported from super-native-web commit 210c941 ("neutral core seams"). When a root host provides the local as true (e.g. mobile-ui's background_layer map), the tabs Scaffold's container goes transparent so the persistent layer shows through; otherwise the themed surface is unchanged. mobile-ui#37 depends on this seam and mobile-ui#40 removed the reference as a stopgap; the plugin restores its provider once this ships. Android only — iOS transparency coordination remains a gap. Co-Authored-By: Claude Fable 5 <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.
What
Ports the Android background-layer core seams from the dev core (super-native-web, commit
210c941"neutral core seams") into mobile-air. Two files, port-only — no new behavior beyond what already ships in the dev core.The composition local
NativeCompositionLocals.ktgains:It signals that a root host renders a persistent background layer beneath the content (e.g. mobile-ui's
background_layermap), so chrome that normally paints an opaque canvas should go transparent.The tabs transparency consumption
NativeRootTabsRenderer.kt'sScaffoldnow derives itscontainerColorfrom the local:Color.Transparentwhen a background layer is present, otherwise the existingMaterialTheme.colorScheme.background(which is also the Material3 default, so behavior is unchanged when no provider sets the local).These are the only two
LocalBackgroundLayerPresentsites committed on the dev core's main.Why
The mobile-ui background-layer feature (NativePHP/mobile-ui#37) references this composition local, but it only existed in the dev core — every app on mobile-air failed to compile on Android until NativePHP/mobile-ui#40 removed the reference as a stopgap. With this seam in the distribution core, the plugin can restore its provider and the transparency signal.
Notes
vendor/bin/pest tests/Unitpasses (437 passed, 2 skipped, 2 risky).🤖 Generated with Claude Code