freshyo/change-log.txt
2026-10-13 13:57:57 +05:30

41 lines
2.1 KiB
Text

2026-10-13 13:54:47 AddressForm keyboard + layout fix (user-ui), re-applied on branch `main`.
Note: `main` is the pre-region base; its AddressForm is the older form (region dropdown + Google Maps URL paste).
These two fixes are self-contained and do not depend on the region work.
1/2 apps/user-ui/src/components/AddressForm.tsx:
- import { View, ScrollView, Dimensions } from 'react-native';
- import {KeyboardAwareScrollView} from 'react-native-keyboard-aware-scroll-view';
+ import { View, ScrollView, KeyboardAvoidingView, Platform } from 'react-native';
- <KeyboardAwareScrollView
- style={[tw`px-4 pt-4 pb-32 bg-white`, {maxHeight: Dimensions.get('window').height * 0.7}]}
- keyboardShouldPersistTaps="always"
- keyboardDismissMode="on-drag"
- >
+ <KeyboardAvoidingView
+ style={tw`flex-1 bg-white`}
+ behavior={Platform.OS === 'ios' ? 'padding' : undefined}
+ >
+ <ScrollView
+ style={tw`flex-1`}
+ contentContainerStyle={tw`px-4 pt-4 pb-10`}
+ keyboardShouldPersistTaps="handled"
+ showsVerticalScrollIndicator={false}
+ >
...content unchanged...
- </KeyboardAwareScrollView>
+ </ScrollView>
+ </KeyboardAvoidingView>
2/2 apps/user-ui/app/(drawer)/(tabs)/me/addresses/index.tsx:
- import { View, Alert } from 'react-native';
+ import { View, Alert, Dimensions } from 'react-native';
- <RawBottomDialog ...><AddressForm .../></RawBottomDialog>
+ <RawBottomDialog ...>
+ <View style={[tw`bg-white rounded-t-2xl`, { height: Dimensions.get('window').height * 0.85 }]}>
+ <AddressForm .../>
+ </View>
+ </RawBottomDialog>
(RawBottomDialog renders children bare, so the form needs a bounded height.)
Why: AddressForm was the only form using react-native-keyboard-aware-scroll-view (0.9.5, pre-New-Architecture),
which mis-handles the keyboard on iOS (input focused but keyboard missing/off-screen); every other working form uses
KeyboardAvoidingView. The old `pb-32` (viewport padding) + hardcoded `maxHeight: 70%` also left a blank band and
clipped content.
No dependency added. No migration. No tests run.