Background layer: persistent content beneath every screen - #37
Conversation
A chrome contributor + native root hosts that render arbitrary content (a map, a video, a canvas) BENEATH the screen content at a stable structural position, mounted once at the root so it persists across tab switches and pushes instead of re-initializing per screen. Same discovery shape as the floating overlay: layouts opt in with HasBackgroundLayer / a backgroundLayer() builder, screens can override via backgroundLayerOverride() or hide with hidesBackgroundLayer. The sentinel background_layer element travels in the published tree; the iOS and Android hosts registered on core's NativeRootHostRegistry pull it out and compose it under the content.
…e hand-off The registration passed a hostedByChrome argument the host composable never declared (compile error), and a leftover bisect experiment composed content first, drawing the layer OVER the screen. The chrome hand-off returns when core's tabs Scaffold actually hosts the layer. Also: InteractsWithBackgroundLayer trait mirroring the overlay/drawer pattern, the floating-overlay docblock reunited with its method, and a BackgroundLayerTest mirroring FloatingOverlayTest. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Pushed fixes from review: the Android host now compiles (dropped the Still blocked before undrafting: Android touch routing under tabs needs the core-side change (hosting the layer inside the Scaffold body) that currently lives uncommitted in the core working tree, and iOS tabs have no transparency coordination yet ( 🤖 Generated with Claude Code |
|
Field note from building a demo against this branch: the iOS transparency gap applies to NavigationStack chrome too, not just tabs — core folds root hosts around the whole tree outside the nav container ( 🤖 Generated with Claude Code |
A chrome contributor + native root hosts that render arbitrary content (a map, a video, a canvas) beneath the screen content at a stable structural position — mounted once at the root, so it persists across tab switches and pushes instead of re-initializing per screen.
HasBackgroundLayer/ abackgroundLayer()builder; screens override viabackgroundLayerOverride()or hide withhidesBackgroundLayer.background_layersentinel element travels in the published tree; iOS (NativeUIBackgroundLayerHost.swift) and Android (NativeUIBackgroundLayerHost.kt) hosts registered on core'sNativeRootHostRegistrypull it out and compose it under the content (tabs-hosted variant handled on Android).Draft — in-flight feature branch packaged from the working tree so it has a home; review/finish at leisure.