-
-
Notifications
You must be signed in to change notification settings - Fork 122
Fix : Add an Appointment modal UI and scrolling behaviour #190
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 3 commits
7659489
52de91b
26c0834
bdeef85
1e6d652
ca6da31
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,6 @@ | ||
| import React, {useEffect, useRef, useState} from 'react'; | ||
| import { KeyboardAvoidingView, Platform } from 'react-native'; | ||
|
|
||
| import { | ||
| View, | ||
| Text, | ||
|
|
@@ -425,7 +427,6 @@ const ScheduleScreen = () => { | |
|
|
||
| <Modal | ||
| visible={isAddAppointmentModalVisible} | ||
| transparent={true} | ||
| animationType="fade" | ||
| onRequestClose={hideAddAppointmentModal}> | ||
| <View style={styles.overlay}> | ||
|
|
@@ -451,13 +452,20 @@ const ScheduleScreen = () => { | |
| </Text> | ||
|
|
||
| {/* Form Inputs */} | ||
| <KeyboardAvoidingView | ||
| behavior={Platform.OS === 'ios' ? 'padding' : undefined} | ||
| style={{ flex: 1 }} | ||
| > | ||
coderabbitai[bot] marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| <ScrollView | ||
| style={styles.formContainer} | ||
| showsVerticalScrollIndicator={false}> | ||
| contentContainerStyle={{ flexGrow: 1 , paddingBottom: 20}} | ||
| keyboardShouldPersistTaps="handled" | ||
| showsVerticalScrollIndicator={false}> | ||
| {/* Title Input */} | ||
| <View style={styles.inputWrapper}> | ||
| <TextInput | ||
| placeholder="Appointment title" | ||
| placeholder="Appointment Title" | ||
| placeholderTextColor="#999" | ||
| style={styles.input} | ||
| value={newAppointment.title} | ||
|
|
@@ -523,7 +531,7 @@ const ScheduleScreen = () => { | |
| } | ||
| /> | ||
| </View> | ||
| </ScrollView> | ||
|
|
||
|
|
||
| {/* Action Buttons */} | ||
| <View style={styles.buttonContainer}> | ||
|
|
@@ -538,7 +546,8 @@ const ScheduleScreen = () => { | |
| <Text style={styles.cancelButtonText}>Cancel</Text> | ||
| </TouchableOpacity> | ||
| </View> | ||
|
|
||
| </ScrollView> | ||
| </KeyboardAvoidingView> | ||
| {/* Decorative Element */} | ||
| <View style={styles.decorativeBottom} /> | ||
| </View> | ||
|
|
@@ -828,20 +837,23 @@ const styles = StyleSheet.create({ | |
| justifyContent: 'center', | ||
| alignItems: 'center', | ||
| padding: 20, | ||
|
|
||
| }, | ||
| modalContent: { | ||
| backgroundColor: '#fff', | ||
| borderRadius: 24, | ||
| padding: 24, | ||
| width: '100%', | ||
| maxWidth: 400, | ||
| maxHeight: '90%', | ||
| shadowColor: '#000', | ||
| shadowOffset: {width: 0, height: 10}, | ||
| shadowOpacity: 0.15, | ||
| shadowRadius: 20, | ||
| elevation: 10, | ||
| }, | ||
| modalContent: { | ||
| backgroundColor: '#fff', | ||
| borderRadius: 24, | ||
| paddingLeft: 24, | ||
| paddingRight:24, | ||
| width: '100%', | ||
| maxWidth: 400, | ||
| maxHeight:'90%', | ||
| shadowColor: '#000', | ||
| shadowOffset: {width: 0, height: 10}, | ||
| shadowOpacity: 0.15, | ||
| shadowRadius: 20, | ||
| elevation: 10, | ||
| } | ||
| , | ||
|
Comment on lines
844
to
858
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested fix (dialog that grows but doesn't fill the screen) modalContent: {
backgroundColor: '#fff',
borderRadius: 24,
- paddingLeft: 24,
- paddingRight:24,
+ paddingHorizontal: 24,
width: '100%',
maxWidth: 400,
- flex: 1, // β IMPORTANT
+ maxHeight: '90%',
shadowColor: '#000',
shadowOffset: {width: 0, height: 10},
shadowOpacity: 0.15,
shadowRadius: 20,
elevation: 10,
-}
-,
+},π€ Prompt for AI Agents |
||
| closeButton: { | ||
| position: 'absolute', | ||
| top: 16, | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.