Phase 2 — Cross-Platform Features
These are core library features (Sources/SwiftOpenUI/) with backend rendering on all platforms. Design in core first, then implement per-backend.
1. Navigation
NavigationStack view, NavigationLink view, NavigationPath
- Each backend manages a back stack (Compose navigation, GTK stack, Win32 pages, browser history, etc.)
2. Gestures
.onTapGesture {}, .onLongPressGesture {}
DragGesture with .onChanged / .onEnded
- Core modifier views + per-backend event wiring
3. Animations
withAnimation { } block
.animation(.easeInOut, value:) modifier
- Initial scope: opacity and offset transitions
- Compose has built-in animation APIs; other backends need platform-specific interpolation
4. Input-State Preservation
- Cursor position, selection range, IME composition, focus survival across rebuilds
- Currently all backends use full-rebuild model — cursor/focus is lost on state change
- Options: save/restore snapshots (like Win32's FocusSnapshot), or cross-platform diff engine
- Trigger: TextField UX on any platform
Platforms
Work happens across all 5 platforms: macOS, Linux (GTK4), Windows (Win32), Web (Wasm), Android (Compose).
Branch
Work on develop. Create experimental/phase2-* branches for individual features if needed.
Phase 2 — Cross-Platform Features
These are core library features (
Sources/SwiftOpenUI/) with backend rendering on all platforms. Design in core first, then implement per-backend.1. Navigation
NavigationStackview,NavigationLinkview,NavigationPath2. Gestures
.onTapGesture {},.onLongPressGesture {}DragGesturewith.onChanged/.onEnded3. Animations
withAnimation { }block.animation(.easeInOut, value:)modifier4. Input-State Preservation
Platforms
Work happens across all 5 platforms: macOS, Linux (GTK4), Windows (Win32), Web (Wasm), Android (Compose).
Branch
Work on
develop. Createexperimental/phase2-*branches for individual features if needed.