Skip to content
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

Chore/replace disabling inputs with splash #1799

Merged
merged 14 commits into from
Sep 15, 2023
Merged
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.

* 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.

* Fixed android stucking on username registration screen introduced in previous alpha.
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
8 changes: 8 additions & 0 deletions packages/mobile/jest/snapshotResolver.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
module.exports = {
testPathForConsistencyCheck: 'some/example.test.js',

resolveSnapshotPath: (testPath, snapshotExtension) =>
testPath.replace(/\.test\.([tj]sx?)/, `.test.$1${snapshotExtension}`),

resolveTestPath: (snapshotFilePath, snapshotExtension) => snapshotFilePath.replace(snapshotExtension, ''),
}
4 changes: 3 additions & 1 deletion packages/mobile/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,10 @@
},
"jest": {
"preset": "react-native",
"snapshotResolver": "./jest/snapshotResolver.js",
"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
Loading