feat: Expo 54 (new arch) support + new in-house download module (#1174)

Signed-off-by: Lance Chant <13349722+lancechant@users.noreply.github.com>
Co-authored-by: sarendsen <coding-mosses0z@icloud.com>
Co-authored-by: Lance Chant <13349722+lancechant@users.noreply.github.com>
Co-authored-by: Gauvain <68083474+Gauvino@users.noreply.github.com>
This commit is contained in:
Fredrik Burmester
2025-11-11 08:53:23 +01:00
committed by GitHub
parent 154788cf91
commit 485dc6eeac
181 changed files with 8422 additions and 4298 deletions

58
docs/nested-modals.md Normal file
View File

@@ -0,0 +1,58 @@
# Nested Modals with PlatformDropdown
## Issue
PlatformDropdowns inside BottomSheetModals don't open on Android.
## Solution
1. **Add controlled state** for each PlatformDropdown:
```tsx
const [open, setOpen] = useState(false);
<PlatformDropdown
open={open}
onOpenChange={setOpen}
// ...
/>
```
2. **Use `View` for triggers, not `TouchableOpacity`**:
```tsx
// ✅ Correct
<PlatformDropdown
trigger={<View>...</View>}
/>
// ❌ Wrong - causes nested TouchableOpacity conflicts
<PlatformDropdown
trigger={<TouchableOpacity>...</TouchableOpacity>}
/>
```
3. **Add `stackBehavior='push'` to parent BottomSheetModal**:
```tsx
<BottomSheetModal
stackBehavior='push'
// ...
/>
```
4. **Reset dropdown states on modal dismiss**:
```tsx
const handleDismiss = useCallback(() => {
setDropdown1Open(false);
setDropdown2Open(false);
// reset all dropdown states
onDismiss?.();
}, [onDismiss]);
<BottomSheetModal
onDismiss={handleDismiss}
// ...
/>
```
## Why
- PlatformDropdown wraps triggers in TouchableOpacity on Android. Nested TouchableOpacity causes touch event conflicts.
- PlatformDropdown's useEffect should only call `showModal()` when `open === true`, not call `hideModal()` when `open === false` (interferes with parent modals).
- Dropdown states must be reset on modal dismiss to prevent them from reopening automatically when parent modal reopens.