Skip to content

Commit

Permalink
Chore/replace disabling inputs with splash (#1799)
Browse files Browse the repository at this point in the history
* Configuration for jest snapshots

* Change join community component

* Change create community component

* Lint fix

* Update Podfile.lock

* Fix snapshots

* Update CHANGELOG

* Include app version information in loading component

* Lint fix

* Remove jest snapshotResolver

* Fix create community snap
  • Loading branch information
siepra authored Sep 15, 2023
1 parent 8a285e0 commit 1366d05
Show file tree
Hide file tree
Showing 18 changed files with 1,132 additions and 907 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
[unreleased]

* Replaced greying out inputs with splash screen on joining/creating screens.

* Fixes empty space between chat's input and a soft keyboard on iOS devices.

* Changed registration process - user connects to the libp2p network directly instead of using registrar. Invitation link format changed. User csr is now saved to database.
Expand Down
10 changes: 8 additions & 2 deletions packages/mobile/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,8 @@ PODS:
- react-native-config/App (= 1.5.0)
- react-native-config/App (1.5.0):
- React-Core
- react-native-document-picker (9.0.1):
- React-Core
- react-native-randombytes (3.6.1):
- React-Core
- react-native-safe-area-context (4.4.1):
Expand Down Expand Up @@ -357,7 +359,7 @@ PODS:
- SDWebImageWebPCoder (~> 0.8.4)
- RNFS (2.20.0):
- React-Core
- RNGestureHandler (2.8.0):
- RNGestureHandler (2.12.0):
- React-Core
- RNScreens (3.18.2):
- React-Core
Expand Down Expand Up @@ -406,6 +408,7 @@ DEPENDENCIES:
- React-logger (from `../node_modules/react-native/ReactCommon/logger`)
- react-native-blob-util (from `../node_modules/react-native-blob-util`)
- react-native-config (from `../node_modules/react-native-config`)
- react-native-document-picker (from `../node_modules/react-native-document-picker`)
- react-native-randombytes (from `../node_modules/react-native-randombytes`)
- react-native-safe-area-context (from `../node_modules/react-native-safe-area-context`)
- react-native-webview (from `../node_modules/react-native-webview`)
Expand Down Expand Up @@ -488,6 +491,8 @@ EXTERNAL SOURCES:
:path: "../node_modules/react-native-blob-util"
react-native-config:
:path: "../node_modules/react-native-config"
react-native-document-picker:
:path: "../node_modules/react-native-document-picker"
react-native-randombytes:
:path: "../node_modules/react-native-randombytes"
react-native-safe-area-context:
Expand Down Expand Up @@ -573,6 +578,7 @@ SPEC CHECKSUMS:
React-logger: 9332c3e7b4ef007a0211c0a9868253aac3e1da82
react-native-blob-util: 99f4d79189252f597fe0d810c57a3733b1b1dea6
react-native-config: 5330c8258265c1e5fdb8c009d2cabd6badd96727
react-native-document-picker: 2b8f18667caee73a96708a82b284a4f40b30a156
react-native-randombytes: 421f1c7d48c0af8dbcd471b0324393ebf8fe7846
react-native-safe-area-context: 99b24a0c5acd0d5dcac2b1a7f18c49ea317be99a
react-native-webview: 994b9f8fbb504d6314dc40d83f94f27c6831b3bf
Expand All @@ -596,7 +602,7 @@ SPEC CHECKSUMS:
RNDevMenu: 72807568fe4188bd4c40ce32675d82434b43c45d
RNFastImage: 5c9c9fed9c076e521b3f509fe79e790418a544e8
RNFS: 4ac0f0ea233904cb798630b3c077808c06931688
RNGestureHandler: 62232ba8f562f7dea5ba1b3383494eb5bf97a4d3
RNGestureHandler: dec4645026e7401a0899f2846d864403478ff6a5
RNScreens: 34cc502acf1b916c582c60003dc3089fa01dc66d
RNShare: eaee3dd5a06dad397c7d3b14762007035c5de405
RNSVG: c1e76b81c76cdcd34b4e1188852892dc280eb902
Expand Down
3 changes: 2 additions & 1 deletion packages/mobile/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,8 @@
"jest": {
"preset": "react-native",
"modulePathIgnorePatterns": [
"<rootDir>/codegen/"
"<rootDir>/codegen/",
"__snapshots__"
],
"setupFiles": [
"./src/setupTests.tsx",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { Typography } from '../Typography/Typography.component'
import { TextWithLink } from '../TextWithLink/TextWithLink.component'

import { CreateCommunityProps } from './CreateCommunity.types'
import { Loading } from '../Loading/Loading.component'

export const CreateCommunity: FC<CreateCommunityProps> = ({
createCommunityAction,
Expand Down Expand Up @@ -46,46 +47,52 @@ export const CreateCommunity: FC<CreateCommunityProps> = ({
}, [networkCreated])

return (
<View
style={{ flex: 1, backgroundColor: defaultTheme.palette.background.white }}
testID={'create-community-component'}
>
<KeyboardAvoidingView
behavior='height'
style={{
flex: 1,
justifyContent: 'center',
paddingLeft: 20,
paddingRight: 20,
}}
>
<Typography fontSize={24} fontWeight={'medium'} style={{ marginBottom: 30 }}>
{'Create a community'}
</Typography>
<Input
onChangeText={onChangeText}
label={'Add a name for your community'}
placeholder={'Community name'}
disabled={loading || !ready}
validation={inputError}
ref={inputRef}
/>
<View style={{ marginTop: 32 }}>
<TextWithLink
text={'You can %a instead'}
links={[
{
tag: 'a',
label: 'join a community',
action: redirectionAction,
},
]}
/>
<>
{ready ? (
<View
style={{ flex: 1, backgroundColor: defaultTheme.palette.background.white }}
testID={'create-community-component'}
>
<KeyboardAvoidingView
behavior='height'
style={{
flex: 1,
justifyContent: 'center',
paddingLeft: 20,
paddingRight: 20,
}}
>
<Typography fontSize={24} fontWeight={'medium'} style={{ marginBottom: 30 }}>
{'Create a community'}
</Typography>
<Input
onChangeText={onChangeText}
label={'Add a name for your community'}
placeholder={'Community name'}
disabled={loading}
validation={inputError}
ref={inputRef}
/>
<View style={{ marginTop: 32 }}>
<TextWithLink
text={'You can %a instead'}
links={[
{
tag: 'a',
label: 'join a community',
action: redirectionAction,
},
]}
/>
</View>
<View style={{ marginTop: 32 }}>
<Button onPress={onPress} title={'Continue'} loading={loading} />
</View>
</KeyboardAvoidingView>
</View>
<View style={{ marginTop: 32 }}>
<Button onPress={onPress} title={'Continue'} loading={loading} />
</View>
</KeyboardAvoidingView>
</View>
) : (
<Loading />
)}
</>
)
}
Loading

0 comments on commit 1366d05

Please sign in to comment.