Commit 4242f05c authored by Doris Tam's avatar Doris Tam
Browse files

Merge branch '99-deprecation-coming-need-to-upgrade-react-navigation-to-v5' into 'master'

Resolve "Deprecation coming - Need to upgrade React Navigation to V5"

Closes #99

See merge request elearning/mahara-mobile-react-native!211
parents da677a75 0c2720fc
Pipeline #1417 passed with stages
in 8 minutes and 38 seconds
......@@ -140,7 +140,7 @@ android {
abi {
reset()
enable enableSeparateBuildPerCPUArchitecture
universalApk false // If true, also generate a universal APK
universalApk true // If true, also generate a universal APK
include "armeabi-v7a", "x86", "arm64-v8a", "x86_64"
}
}
......
......@@ -8,3 +8,5 @@
# http://developer.android.com/guide/developing/tools/proguard.html
# Add any project specific keep options here:
-keep public class com.horcrux.svg.** {*;}
......@@ -316,10 +316,12 @@ PODS:
- React-jsi (= 0.63.3)
- rn-fetch-blob (0.11.2):
- React-Core
- RNAudioRecorderPlayer (2.5.3):
- RNAudioRecorderPlayer (2.5.4):
- React
- RNCAsyncStorage (1.12.0):
- React
- RNCMaskedView (0.1.10):
- React
- RNDeviceInfo (5.6.5):
- React
- RNGestureHandler (1.8.0):
......@@ -407,6 +409,7 @@ DEPENDENCIES:
- rn-fetch-blob (from `../node_modules/rn-fetch-blob`)
- RNAudioRecorderPlayer (from `../node_modules/react-native-audio-recorder-player`)
- "RNCAsyncStorage (from `../node_modules/@react-native-community/async-storage`)"
- "RNCMaskedView (from `../node_modules/@react-native-community/masked-view`)"
- RNDeviceInfo (from `../node_modules/react-native-device-info`)
- RNGestureHandler (from `../node_modules/react-native-gesture-handler`)
- RNLocalize (from `../node_modules/react-native-localize`)
......@@ -510,6 +513,8 @@ EXTERNAL SOURCES:
:path: "../node_modules/react-native-audio-recorder-player"
RNCAsyncStorage:
:path: "../node_modules/@react-native-community/async-storage"
RNCMaskedView:
:path: "../node_modules/@react-native-community/masked-view"
RNDeviceInfo:
:path: "../node_modules/react-native-device-info"
RNGestureHandler:
......@@ -580,8 +585,9 @@ SPEC CHECKSUMS:
React-RCTVibration: 8e9fb25724a0805107fc1acc9075e26f814df454
ReactCommon: 4167844018c9ed375cc01a843e9ee564399e53c3
rn-fetch-blob: f525a73a78df9ed5d35e67ea65e79d53c15255bc
RNAudioRecorderPlayer: c2b7deeab6ff758d8ffdb8ae37af928b30467377
RNAudioRecorderPlayer: edfede932d2d95fb708d87749fc24d4935fe3087
RNCAsyncStorage: 3eea36d9460c5159b592f9ecbe5a77f8aca98006
RNCMaskedView: f5c7d14d6847b7b44853f7acb6284c1da30a3459
RNDeviceInfo: e841619c3dac5495a095c5455473579ff04908d4
RNGestureHandler: 7a5833d0f788dbd107fbb913e09aa0c1ff333c39
RNLocalize: c388679af021ddd6069c215f7fdd2acf4e77ede5
......
module.exports = {
preset: "react-native",
"setupFiles": [
"<rootDir>/jest/setup.js"
],
transformIgnorePatterns: [
'node_modules/(?!react-native|react-navigation|react-native-gesture-handler|react-native-animatable|react-native-vector-icons)/',
'<rootDir>/lib/'
......
import 'react-native-gesture-handler/jestSetup';
jest.mock('react-native-reanimated', () => {
const Reanimated = require('react-native-reanimated/mock');
// The mock for `call` immediately calls the callback which is incorrect
// So we override it with a no-op
Reanimated.default.call = () => {};
return Reanimated;
});
// Silence the warning: Animated: `useNativeDriver` is not supported because the native animated module is missing
jest.mock('react-native/Libraries/Animated/src/NativeAnimatedHelper');
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -46,7 +46,7 @@ export default {
touchableTextColor: '#757575',
// Android
androidRipple: true,
androidRipple: false,
androidRippleColor: 'rgba(256, 256, 256, 0.3)',
androidRippleColorDark: 'rgba(0, 0, 0, 0.15)',
buttonUppercaseAndroidText: true,
......@@ -130,11 +130,11 @@ export default {
checkboxTickColor: '#fff',
// Color
brandPrimary: '#4c762c',
brandInfo: '#b9a34b',
brandPrimary: '#576c36',
brandInfo: '#ba9b59',
brandSuccess: '#3c4c23',
brandDanger: '#d9534f',
brandWarning: '#f0ad4e',
brandDanger: '#a9000d',
brandWarning: '#b9a34b',
brandDark: '#000',
brandLight: '#FFF',
......
......@@ -135,11 +135,11 @@ export default {
// Color
brandPrimary: platform === PLATFORM.IOS ? '#007aff' : '#3F51B5',
brandInfo: '#62B1F6',
brandSuccess: '#5cb85c',
brandSuccess: '#576c36',
brandDanger: '#d9534f',
brandWarning: '#f0ad4e',
brandWarning: '#b9a34b',
brandDark: '#000',
brandLight: '#a9a9a9',
brandLight: '#fff',
// Container
containerBgColor: '#fff',
......
This diff is collapsed.
......@@ -12,7 +12,7 @@
"add-locale": "lingui add-locale",
"extract": "lingui extract",
"compile": "lingui compile",
"postinstall": "jetifier -r"
"postinstall": "npx jetify"
},
"dependencies": {
"@babel/runtime": "7.6.2",
......@@ -20,9 +20,14 @@
"@fortawesome/free-solid-svg-icons": "^5.14.0",
"@fortawesome/react-native-fontawesome": "^0.1.0",
"@lingui/conf": "^2.9.2",
"@lingui/core": "^2.0.0",
"@react-native-community/async-storage": "^1.12.0",
"@react-native-community/masked-view": "^0.1.10",
"@react-native-community/toolbar-android": "0.1.0-rc.2",
"@react-navigation/bottom-tabs": "^5.9.0",
"@react-navigation/bottom-tabs": "^5.9.1",
"@react-navigation/drawer": "^5.9.2",
"@react-navigation/native": "^5.7.5",
"@react-navigation/stack": "^5.9.2",
"@sentry/react-native": "^1.8.2",
"@types/react-native-uuid": "^1.4.0",
"@types/react-redux": "^7.1.9",
......@@ -30,14 +35,17 @@
"@types/redux-mock-store": "^1.0.2",
"@typescript-eslint/parser": "^2.34.0",
"buffer": "^5.6.0",
"color": "^3.1.3",
"core-js": "^3.6.5",
"jetifier": "^1.6.6",
"eslint-plugin-react-native": "^3.10.0",
"link": "^0.1.5",
"lodash": "^4.17.20",
"metro-react-native-babel-transformer": "^0.63.0",
"native-base": "^2.13.14",
"react": "16.9.0",
"react-devtools": "^2.5.2",
"react-native": "^0.63.3",
"react-native-audio-recorder-player": "^2.5.3",
"react-native-audio-recorder-player": "^2.5.4",
"react-native-config": "^0.12.0",
"react-native-device-info": "^5.6.5",
"react-native-document-picker": "^3.5.4",
......@@ -47,29 +55,21 @@
"react-native-image-picker": "^2.3.4",
"react-native-linear-gradient": "^2.5.6",
"react-native-localize": "^1.4.1",
"react-native-paper": "^3.11.0",
"react-native-permissions": "^2.2.2",
"react-native-reanimated": "^1.13.0",
"react-native-safe-area-context": "^0.6.4",
"react-native-screens": "^2.11.0",
"react-native-splash-screen": "^3.2.0",
"react-native-svg": "^9.13.6",
"react-native-tab-view": "^2.15.1",
"react-native-uuid": "^1.4.9",
"react-native-vector-icons": "^6.7.0",
"react-native-webview": "^8.2.1",
"react-navigation": "^4.4.0",
"react-navigation-drawer": "^2.5.0",
"react-navigation-header-buttons": "^3.0.5",
"react-navigation-material-bottom-tabs": "^2.3.0",
"react-navigation-stack": "^1.10.3",
"react-navigation-tabs": "^2.9.0",
"react-native-windows": "^0.61.15",
"react-redux": "^7.2.1",
"redux": "^4.0.5",
"redux-logger": "^3.0.6",
"redux-thunk": "^2.3.0",
"rn-fetch-blob": "^0.11.2",
"sanitize-filename": "^1.6.3",
"whatwg-fetch": "^2.0.4"
},
"devDependencies": {
......@@ -77,11 +77,9 @@
"@babel/runtime": "7.6.2",
"@lingui/babel-preset-react": "^2.9.2",
"@lingui/cli": "^2.9.2",
"@lingui/loader": "^2.9.2",
"@lingui/macro": "^2.9.2",
"@lingui/react": "^2.9.2",
"@react-native-community/eslint-config": "0.0.3",
"@types/base-64": "^0.1.3",
"@types/jest": "^24.9.1",
"@types/lingui__core": "^2.7.0",
"@types/lingui__macro": "^2.7.3",
......@@ -91,7 +89,6 @@
"@types/react-test-renderer": "^16.9.3",
"@typescript-eslint/eslint-plugin": "^2.34.0",
"babel-core": "^7.0.0-bridge.0",
"babel-jest": "24.9.0",
"babel-plugin-macros": "^2.8.0",
"eslint": "^6.8.0",
"eslint-config-airbnb": "^18.2.0",
......@@ -101,6 +98,7 @@
"eslint-plugin-prettier": "^3.1.4",
"eslint-plugin-react": "^7.20.6",
"jest": "24.9.0",
"jetifier": "^1.6.6",
"metro-react-native-babel-preset": "0.51.1",
"prettier": "^1.19.1",
"prettier-loader": "^3.3.0",
......
......@@ -11,8 +11,8 @@ import SplashScreen from 'react-native-splash-screen';
import getTheme from '../native-base-theme/components';
import commonColor from '../native-base-theme/variables/commonColor';
import i18n, {changeActiveLanguage} from './i18n';
import AppNavigator from './navigations/app-navigator';
import configureStore from './store/store';
import AppNavigator from './navigation/AppNavigator';
global.Buffer = Buffer;
......
......@@ -36,19 +36,19 @@ const LogoSvg = () => {
/>
<Path
fill="#9db576"
fill="#9EB478"
d="M25,39.94c0-1.75-2,6.4-11.36,6.4-6.1,0-10.31-3.91-10.31-9.77,0-5.6,3.83-11.06,6.18-13.88.9,1.32,3.08,4.64,3.52,5.37.58.94,1.44,3.34-.06,3.6-2.11.38-2.19-3.4-2.28-4.4,0-.34-.53-.38-.7-.08-.64,1.2-1.1,4.91.86,6.54a3,3,0,0,0,4.88-1.48A18.47,18.47,0,0,1,18,39.14a.25.25,0,0,0,.5,0c1-5.58-1.64-9.47-2.5-11.2s-4.47-6.82-5.08-7.86A15.19,15.19,0,0,1,8.57,12.9c0-4.84,4-9.48,4.72-9.48s4.95,3.86,4.95,9.64a10.94,10.94,0,0,1-1.09,5,.55.55,0,0,1-.95,0c-2.3-3.58-2.33-4.33-.88-5.38,1-.7-3.73-2.65-3.54,1.36.1,2.1,3.08,6.41,3.79,7.25s4.95-.92,4.95-8.56S13.92,0,13.12,0,5.76,6.25,5.76,12.75A15.32,15.32,0,0,0,8.3,20.91C8.13,21-.11,27.6,0,37.37c.09,7.47,5.08,12.88,13.29,12.88C20.49,50.25,25,45.11,25,39.94Z"
/>
<Path
fill="#9db576"
fill="#9EB478"
d="M21.52,29.14l-.41-.35.41.35h0l-.41-.35.41.35a5.45,5.45,0,0,1,.93-.8,5.2,5.2,0,0,1,1-.51,3.66,3.66,0,0,1,1.21-.22,3.84,3.84,0,0,1,1.3.24,6.06,6.06,0,0,1,1.55.86,4.46,4.46,0,0,1,.45.37.91.91,0,0,1,.1.1l0,0h0l.42-.41-.43.41h0l.42-.41-.43.41a1.18,1.18,0,0,0,1.65,0,1.17,1.17,0,0,0,0-1.64,8.35,8.35,0,0,0-1.45-1.15,7.51,7.51,0,0,0-1.58-.79,6.21,6.21,0,0,0-2.08-.37,5.67,5.67,0,0,0-2.05.38,7.15,7.15,0,0,0-2.09,1.22,7,7,0,0,0-.79.77,1.16,1.16,0,0,0,1.79,1.48Z"
/>
<Path
fill="#9db576"
fill="#9EB478"
d="M24.27,32.61a.6.6,0,0,1,.23-.16.34.34,0,0,1,.32,0,.56.56,0,0,1,.23.16,1.18,1.18,0,0,0,1.65,0,1.16,1.16,0,0,0,0-1.64,3,3,0,0,0-.93-.65,2.78,2.78,0,0,0-1.1-.23,2.74,2.74,0,0,0-1.1.23,3.17,3.17,0,0,0-.94.65,1.16,1.16,0,0,0,0,1.64,1.18,1.18,0,0,0,1.65,0Z"
/>
<Path
fill="#9db576"
fill="#9EB478"
d="M25.84,35.82a1.18,1.18,0,1,1-1.18-1.18A1.18,1.18,0,0,1,25.84,35.82Z"
/>
</Svg>
......
......@@ -9,7 +9,7 @@ const textStyles = StyleSheet.create({
textAlign: 'center'
},
errorText: {
color: styles.colors.warn,
color: styles.colors.siteCheckErrorTextPink,
fontSize: styles.font.sm,
padding: styles.padding.sm
}
......
......@@ -2,35 +2,43 @@
const styles = {
colors: {
primary: '#4c762c',
primary: '#576c36',
secondary: '#b9a34b', // husk
tertiary: '#92Bf72',
tertiary: '#92B47a',
quaternary: '#d4e6c7',
contrast: '#eff4e7',
text: '#000',
light: '#fff',
light2: '#9db576',
dark: '#000',
dark2: '#2e3a1c',
dark2: '#2e391e',
gradientStartGreen: '#2e391e',
lightgrey: '#efefef',
midgrey: '#919191',
darkgrey: '#777',
warnbg: '#e8c4c4',
warn: '#aa0500',
border: '#cfcfcf',
green_grid_button: '#006032',
green_grid_button: '#2b5936',
green_tag_text: '#293d1a',
green_tag_close: '#6d9a4c',
berry_grid_button: '#681946',
lightbrown_grid_button: '#7b3434',
darkbrown_grid_button: '#433113',
berry_grid_button: '#612c45',
lightbrown_grid_button: '#753b37',
darkbrown_grid_button: '#423019',
red: '#76302e',
messageSuccessBg: '#cfdeba',
messageSuccessText: '#3c4c27',
messageSuccessIcon: '#75A63F',
messageErrorText: '#B0000D',
messageErrorIcon: '#d9292f',
messageErrorBg: '#ebc4c4'
messageErrorText: '#a9000d',
messageErrorIcon: '#d12d2f',
messageErrorBg: '#e8c4c4',
logoLeft: '#93b478',
navBarGreen: '#9eb47a',
gradientEndGreen: '#889f65',
navActiveGreenTint: '#576c36',
siteCheckErrorTextPink: '#9b7968',
recordingStopButtonRed: '#7c242b',
uploadButtonTan: '#b9a34b'
},
padding: {
xs: 5,
......
......@@ -16,7 +16,7 @@ import styles from './AddAudio.style';
type Props = {
setPickedFile: React.Dispatch<React.SetStateAction<File>>;
audioFileToEdit: File;
audioFileToEdit?: File;
i18n: I18n;
};
......@@ -122,7 +122,7 @@ const AddAudio = (props: Props) => {
setURI(path);
const resultURI = await audioRecorderPlayer.startRecorder(path);
audioRecorderPlayer.addRecordBackListener((e: any) => {
audioRecorderPlayer.addRecordBackListener(() => {
setURI(resultURI);
setRecordStat('recording');
});
......@@ -169,7 +169,7 @@ const AddAudio = (props: Props) => {
.then(() => {
setPlayStatus('not-playing');
})
.catch(stopErr => {
.catch(() => {
// audio reached end
setPlayStatus('not-playing');
});
......@@ -219,7 +219,7 @@ const AddAudio = (props: Props) => {
{recordStatus === 'recording' ? (
<MediumButton
dark
style={{backgroundColor: variables.colors.red}}
style={{backgroundColor: variables.colors.recordingStopButtonRed}}
text={t`Stop`}
onPress={() => handleRecord()}
icon={STOP_ICON}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment