Skip to content

Commit 105b243

Browse files
committed
Record the AndroidSwiftUI additions and their known gaps
1 parent d6cc255 commit 105b243

1 file changed

Lines changed: 21 additions & 3 deletions

File tree

Documentation/AndroidSwiftUIMigration.md

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,15 +59,33 @@ AndroidSwiftUI first (branch `feature/swiftui-containers`):
5959
- `NavigationStack` — reusing the existing `NavigationContext`, so `NavigationLink` push and
6060
hardware-back pop are shared with `NavigationView` rather than duplicated
6161
- `LazyVStack` / `LazyHStack` — eager, mapping onto the same LinearLayout path as `VStack`/`HStack`
62-
- `TabView` with `.tabItem` and selection
63-
- `.sheet(isPresented:content:)`
64-
- `.refreshable`
62+
- `TabView` with `.tabItem` and selection — tab items are read back by walking the modifier chain
63+
for trait-writing modifiers; only the selected tab is mounted
64+
- `.sheet(isPresented:content:)` — a full-screen overlay in the same view hierarchy rather than an
65+
Android `Dialog`, because the fiber renderer mounts children into the parent's `ViewGroup` and has
66+
no path to a `Dialog`'s separate decor view
67+
- `.refreshable` — stores a `RefreshAction` in the environment as SwiftUI does, but no gesture
68+
triggers it: binding `SwipeRefreshLayout` would need an androidx dependency the package lacks
6569
- Swift **Observation** support — `.environment(object)` and `@Environment(Type.self)`, with
6670
invalidation driven by `withObservationTracking`
6771

6872
`.fileImporter` is not needed on Android: the plugin import button is already gated behind
6973
`#if !os(Android)`.
7074

75+
### Known gaps in those additions
76+
77+
All four compile and were verified to build together for Android, but none has been exercised on a
78+
device or emulator. Notable limitations, each documented in the source:
79+
80+
- **Observation**: `@Bindable` is not implemented, and `@Environment(Store.self) var store: Store?`
81+
(the optional form) is unsupported — a missing injection traps rather than yielding `nil`.
82+
- **TabView**: unselected tabs are unmounted, so their `@State` resets; no `TabViewStyle`, paging or
83+
badges.
84+
- **Sheet**: no animation, detents or drag-to-dismiss, and no `@Environment(\.dismiss)` — content
85+
must dismiss itself through the binding.
86+
- **NavigationStack**: `NavigationStack(path:)` and value-based `navigationDestination(for:)` are
87+
not implemented; `NavigationContext.path` holds type-erased views, not a `Hashable` data path.
88+
7189
## Platform status
7290

7391
- **Apple platforms** — the package resolves and every target builds with no Skip involvement.

0 commit comments

Comments
 (0)