From 79e648867dfce83cff5c3da372670be8359cb517 Mon Sep 17 00:00:00 2001 From: Calin Chitu Date: Wed, 8 Jun 2022 16:26:04 +0300 Subject: [PATCH] feat(mobile/navigation) - removed stack dependency and updated animation options --- package-lock.json | 29 ---------------- package.json | 1 - .../conference/components/native/styles.js | 10 ++---- .../components/HeaderNavigationButton.js | 13 ++++--- .../mobile/navigation/screenOptions.js | 34 +++++-------------- 5 files changed, 17 insertions(+), 70 deletions(-) diff --git a/package-lock.json b/package-lock.json index 30ea1f236..c28507ac3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -50,7 +50,6 @@ "@react-navigation/material-top-tabs": "6.0.6", "@react-navigation/native": "6.0.6", "@react-navigation/native-stack": "6.6.2", - "@react-navigation/stack": "6.0.11", "@svgr/webpack": "4.3.2", "@tensorflow/tfjs-backend-wasm": "3.13.0", "@tensorflow/tfjs-core": "3.13.0", @@ -5057,24 +5056,6 @@ "nanoid": "^3.1.23" } }, - "node_modules/@react-navigation/stack": { - "version": "6.0.11", - "resolved": "https://registry.npmjs.org/@react-navigation/stack/-/stack-6.0.11.tgz", - "integrity": "sha512-Osc2mXi0Zh/u92HRCceDqVfVnypTa2sZgYMJDU+vDhHz38negtbCG+cjje6nApSjwC5WTVhYP4OoD5WBSh51+g==", - "dependencies": { - "@react-navigation/elements": "^1.2.1", - "color": "^3.1.3", - "warn-once": "^0.1.0" - }, - "peerDependencies": { - "@react-navigation/native": "^6.0.0", - "react": "*", - "react-native": "*", - "react-native-gesture-handler": ">= 1.0.0", - "react-native-safe-area-context": ">= 3.0.0", - "react-native-screens": ">= 3.0.0" - } - }, "node_modules/@sideway/address": { "version": "4.1.4", "resolved": "https://registry.npmjs.org/@sideway/address/-/address-4.1.4.tgz", @@ -23765,16 +23746,6 @@ "nanoid": "^3.1.23" } }, - "@react-navigation/stack": { - "version": "6.0.11", - "resolved": "https://registry.npmjs.org/@react-navigation/stack/-/stack-6.0.11.tgz", - "integrity": "sha512-Osc2mXi0Zh/u92HRCceDqVfVnypTa2sZgYMJDU+vDhHz38negtbCG+cjje6nApSjwC5WTVhYP4OoD5WBSh51+g==", - "requires": { - "@react-navigation/elements": "^1.2.1", - "color": "^3.1.3", - "warn-once": "^0.1.0" - } - }, "@sideway/address": { "version": "4.1.4", "resolved": "https://registry.npmjs.org/@sideway/address/-/address-4.1.4.tgz", diff --git a/package.json b/package.json index 7189ed435..5e8501e88 100644 --- a/package.json +++ b/package.json @@ -55,7 +55,6 @@ "@react-navigation/material-top-tabs": "6.0.6", "@react-navigation/native": "6.0.6", "@react-navigation/native-stack": "6.6.2", - "@react-navigation/stack": "6.0.11", "@svgr/webpack": "4.3.2", "@tensorflow/tfjs-backend-wasm": "3.13.0", "@tensorflow/tfjs-core": "3.13.0", diff --git a/react/features/conference/components/native/styles.js b/react/features/conference/components/native/styles.js index 7715fa22b..3493881cc 100644 --- a/react/features/conference/components/native/styles.js +++ b/react/features/conference/components/native/styles.js @@ -36,10 +36,6 @@ export default { margin: 10 }, - headerNavigationIcon: { - marginLeft: 14 - }, - headerNavigationButton: { height: BaseTheme.spacing[6], marginTop: 20, @@ -48,15 +44,13 @@ export default { headerNavigationText: { color: BaseTheme.palette.text01, - fontSize: HEADER_ACTION_BUTTON_SIZE, - marginHorizontal: BaseTheme.spacing[3] + fontSize: HEADER_ACTION_BUTTON_SIZE }, headerNavigationTextBold: { ...BaseTheme.typography.labelButton, color: BaseTheme.palette.text01, - fontSize: HEADER_ACTION_BUTTON_SIZE, - marginHorizontal: BaseTheme.spacing[3] + fontSize: HEADER_ACTION_BUTTON_SIZE }, /** diff --git a/react/features/mobile/navigation/components/HeaderNavigationButton.js b/react/features/mobile/navigation/components/HeaderNavigationButton.js index 0f1f60f45..28d042c17 100644 --- a/react/features/mobile/navigation/components/HeaderNavigationButton.js +++ b/react/features/mobile/navigation/components/HeaderNavigationButton.js @@ -1,7 +1,6 @@ // @flow import React from 'react'; -import { TouchableOpacity } from 'react-native-gesture-handler'; import { Text, TouchableRipple } from 'react-native-paper'; import { Icon } from '../../../base/icons'; @@ -48,14 +47,14 @@ const HeaderNavigationButton <> { src ? ( - + rippleColor = { BaseTheme.palette.screen02Header } + style = { styles.headerNavigationButton } > - + size = { 24 } + src = { src } /> + ) : ( screenHeaderCloseButton(goBack), headerStatusBarHeight: 0, @@ -258,7 +242,7 @@ export const gifsMenuOptions = presentationScreenOptions; * Screen options for shared document. */ export const sharedDocumentScreenOptions = { - ...TransitionPresets.DefaultTransition, + animation: 'default', headerBackTitleVisible: false, headerShown: true, headerStyle: {