Webview, Number Switcher and Counter demos on mobile-ui ^0.2 - #6
Merged
Conversation
Adds the <webview> element demo screen with four modes: - Remote: sandboxed https URL with opt-in JavaScript - Inline: slot HTML delivered verbatim (opaque origin) - PHP: the app's own runtime in an embedded webview — new /webview-embedded route + page proving the shared session (visit counter), runtime identity, and window.Native availability (polled, since Android injects at page finish vs iOS document start) - Full: v3-style takeover — webview as sole screen content behind the safe areas Plus: launcher menu entry, package-rename adaptations for nativephp/mobile-ui (providers, layouts, config), APP_KEY for the test env (session cookies), and tests covering the element attribute mapping, precompiler contract, demo modes, and the embedded route. Composer targets nativephp/mobile-ui ^0.2 and nativephp/mobile dev-main (as 4.0.x-dev). The lock is intentionally untouched: 0.2.0 isn't tagged yet — regenerate with `composer update nativephp/mobile nativephp/mobile-ui` once minted. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- Number Switcher: content-transition showcase — rolling numeric hero with step/jump/random controls and a side-by-side row rendering the same value through numeric / opacity / no transition. - Counter: the count now rolls via content-transition="numeric", and the pressables gained press-and-hold repeat — @pressdown steps once (taps still count one) and arms a #[Poll(110)] tick that repeats with acceleration (±1 → ±2 → ±5) until @pressup disarms it; idle ticks publish identical trees the shadow compare drops, and a tick cap auto-releases a hold whose pressUp never arrived. - Lock finalized now that the train has merged: nativephp/mobile dev-main + nativephp/mobile-ui 0.2.0 (native-ui removed). Full suite against the released versions: 101 passed. 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.
Demo coverage for the webview + content-transition release train, now fully resolvable against released versions:
nativephp/mobile-ui ^0.2(locked to 0.2.0) andnativephp/mobile dev-main as 4.0.x-dev.Webview demo
The
<webview>element screen with four modes:javascript/webview-embeddedroute + page demonstrating the shared session, runtime identity, andwindow.Native(polled — Android injects at page finish, iOS at document start)Number Switcher demo
content-transitionshowcase: a rolling numeric hero (numeric, 400ms) with step/jump/random controls, plus a side-by-side row rendering the same value throughnumeric/opacity/ none.Counter upgrades
content-transition="numeric"(SwiftUI numericText on iOS, directional slide on Android)@pressDownsteps once (a tap still counts exactly one) and arms a#[Poll(110)]repeat that accelerates (±1 → ±2 → ±5);@pressUp(release or cancel) disarms; idle poll ticks are wire-free via the shadow compare, and a tick cap auto-releases stuck holdsAlso
nativephp/mobile-uipackage-rename adaptations,APP_KEYfor the test env, and 22 new/updated tests (element mapping, precompiler contract, demo trees, hold/acceleration semantics, embedded route)Verified: full suite green (101 passed / 697 assertions) against the locked released versions; both new demos exercised live on the Android emulator (hold-to-repeat acceleration confirmed frame-accurate), iOS builds clean.
🤖 Generated with Claude Code