App::spawn_root() creates the root widget, applies a default
fill-viewport style (grow: Fixed::ONE, ColorToken::Surface,
FlexDirection::Column), and registers it via set_root in one call,
returning a RootBuilder whose chainable .bg_color() / .layout()
override the defaults. Gallery demo bodies no longer patch the
caller-supplied parent's Style — root styling now lives at the spawn
site.
The web gallery builds and serves with trunk:
a <link data-trunk rel="rust"> plus Trunk.toml replace the manual
wasm-bindgen + python -m http.server steps, and register_demos!
generates the sidebar and routes from one table covering all 46 demos.
Added
App::spawn_root() -> RootBuilder— spawns the root, applies a default fill-viewport style, and registers it viaset_root.RootBuilderchains.bg_color()/.layout()to override defaults;.id()finalizes. Available onno_std.
Changed
- Gallery demo bodies —
build_widgetsno longer sets the root'sStyle; callers obtain a styled root fromApp::spawn_root(). Demos that previously hand-built children withWidgetBuilder+ manualParent/Childrenwiring (app_demo, click, rounded, text, image) are rewritten as pureui!trees.
Fixed
- Button releases
Tap/DragEndto user handlers —button's internal gesture handler returnedtrueonTap/DragEnd, which stopped bubble dispatch and prevented a user-attachedGestureHandlerfrom ever firing. It now returnsfalseso user handlers run; thepressedstate toggle andDirtyinsert still happen. web-canvasno longer panics on offscreen effects —WebCanvasRenderernow overridessample_target_region/modify_target_regionto returnNone/falseinstead of inheriting the defaultunimplemented!()panic.BackgroundBlur/MirrorOf/TemporalMixdegrade gracefully on the web backend rather than freezing the frame loop.
Internal
gallery-webmigrated to trunk:index.htmlcarriesdata-trunk rel="rust"with--all-featureswired intodata-wasm-opt-params(rustc emits bulk-memory ops for wasm32 that binaryen validates against only when told).Trunk.tomlpins dist/serve/watch.cargo xtask wasm-buildshells out totrunk build --release; newcargo xtask web-serverunstrunk serve.register_demos!macro ingallery/src/lib.rsemits aDEMOStable (slug / label / category / size / setup fn) pluslookup_demoand a wasm-bindgennav_html(); the web sidebar groups all 46 demos by category.