From 6738d49c630d91ede6239f58a72b065ceb536fd4 Mon Sep 17 00:00:00 2001 From: rory Date: Thu, 14 Sep 2023 09:27:00 +0800 Subject: [PATCH 01/10] Only one active deploy at a time --- .github/workflows/platformDeploy.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/platformDeploy.yml b/.github/workflows/platformDeploy.yml index ad002e164837..5eef07f4c7f4 100644 --- a/.github/workflows/platformDeploy.yml +++ b/.github/workflows/platformDeploy.yml @@ -12,6 +12,10 @@ env: SHOULD_DEPLOY_PRODUCTION: ${{ github.event_name == 'release' }} DEVELOPER_DIR: /Applications/Xcode_14.1.app/Contents/Developer +concurrency: + group: ${{ github.workflow }}-${{ github.event_name }} + cancel-in-progress: true + jobs: validateActor: runs-on: ubuntu-latest From 263e99278b7443128d60117a0947f555cb08c918 Mon Sep 17 00:00:00 2001 From: rory Date: Fri, 15 Sep 2023 09:43:05 +0800 Subject: [PATCH 02/10] Fix header theme color for security page --- src/SCREENS.ts | 1 + src/libs/Navigation/AppNavigator/ModalStackNavigators.js | 2 +- src/libs/Navigation/linkingConfig.js | 2 +- src/pages/settings/Security/SecuritySettingsPage.js | 3 ++- src/styles/themes/default.js | 2 +- 5 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/SCREENS.ts b/src/SCREENS.ts index 47935e117e99..ba0a021e4969 100644 --- a/src/SCREENS.ts +++ b/src/SCREENS.ts @@ -14,6 +14,7 @@ export default { SETTINGS: { PREFERENCES: 'Settings_Preferences', WORKSPACES: 'Settings_Workspaces', + SECURITY: 'Settings_Security', }, SIGN_IN_WITH_APPLE_DESKTOP: 'AppleSignInDesktop', SIGN_IN_WITH_GOOGLE_DESKTOP: 'GoogleSignInDesktop', diff --git a/src/libs/Navigation/AppNavigator/ModalStackNavigators.js b/src/libs/Navigation/AppNavigator/ModalStackNavigators.js index 6b83fe2dcbb8..0897fadd17c5 100644 --- a/src/libs/Navigation/AppNavigator/ModalStackNavigators.js +++ b/src/libs/Navigation/AppNavigator/ModalStackNavigators.js @@ -516,7 +516,7 @@ const SettingsModalStackNavigator = createModalStackNavigator([ const SettingsSecurityPage = require('../../../pages/settings/Security/SecuritySettingsPage').default; return SettingsSecurityPage; }, - name: 'Settings_Security', + name: SCREENS.SETTINGS.SECURITY, }, { getComponent: () => { diff --git a/src/libs/Navigation/linkingConfig.js b/src/libs/Navigation/linkingConfig.js index a15daf992836..1c75a41501c1 100644 --- a/src/libs/Navigation/linkingConfig.js +++ b/src/libs/Navigation/linkingConfig.js @@ -65,7 +65,7 @@ export default { path: ROUTES.SETTINGS_CLOSE, exact: true, }, - Settings_Security: { + [SCREENS.SETTINGS.SECURITY]: { path: ROUTES.SETTINGS_SECURITY, exact: true, }, diff --git a/src/pages/settings/Security/SecuritySettingsPage.js b/src/pages/settings/Security/SecuritySettingsPage.js index 7f08247557f4..293e488ede7a 100644 --- a/src/pages/settings/Security/SecuritySettingsPage.js +++ b/src/pages/settings/Security/SecuritySettingsPage.js @@ -5,6 +5,7 @@ import {withOnyx} from 'react-native-onyx'; import PropTypes from 'prop-types'; import Navigation from '../../../libs/Navigation/Navigation'; import ROUTES from '../../../ROUTES'; +import SCREENS from '../../../SCREENS'; import styles from '../../../styles/styles'; import * as Expensicons from '../../../components/Icon/Expensicons'; import themeColors from '../../../styles/themes/default'; @@ -54,7 +55,7 @@ function SecuritySettingsPage(props) { shouldShowBackButton shouldShowCloseButton illustration={LottieAnimations.Safe} - backgroundColor={themeColors.PAGE_BACKGROUND_COLORS[ROUTES.SETTINGS_SECURITY]} + backgroundColor={themeColors.PAGE_BACKGROUND_COLORS[SCREENS.SETTINGS.SECURITY]} > diff --git a/src/styles/themes/default.js b/src/styles/themes/default.js index 7c43e140f0b1..d1db096cd56a 100644 --- a/src/styles/themes/default.js +++ b/src/styles/themes/default.js @@ -88,8 +88,8 @@ darkTheme.PAGE_BACKGROUND_COLORS = { [SCREENS.HOME]: darkTheme.sidebar, [SCREENS.SETTINGS.PREFERENCES]: colors.blue500, [SCREENS.SETTINGS.WORKSPACES]: colors.pink800, + [SCREENS.SETTINGS.SECURITY]: colors.ice500, [ROUTES.I_KNOW_A_TEACHER]: colors.tangerine800, - [ROUTES.SETTINGS_SECURITY]: colors.ice500, }; export default darkTheme; From ae3e9e0071ce88e12f552fa6f87a2854c821e039 Mon Sep 17 00:00:00 2001 From: rory Date: Fri, 15 Sep 2023 09:52:53 +0800 Subject: [PATCH 03/10] Fix theme on SaveTheWorld page --- src/SCREENS.ts | 3 +++ src/libs/Navigation/AppNavigator/ModalStackNavigators.js | 2 +- src/libs/Navigation/linkingConfig.js | 2 +- src/pages/TeachersUnite/SaveTheWorldPage.js | 3 ++- src/styles/themes/default.js | 2 +- src/styles/themes/light.js | 4 ++-- 6 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/SCREENS.ts b/src/SCREENS.ts index ba0a021e4969..ae850fb3f9f3 100644 --- a/src/SCREENS.ts +++ b/src/SCREENS.ts @@ -16,6 +16,9 @@ export default { WORKSPACES: 'Settings_Workspaces', SECURITY: 'Settings_Security', }, + SAVE_THE_WORLD: { + ROOT: 'SaveTheWorld_Root', + }, SIGN_IN_WITH_APPLE_DESKTOP: 'AppleSignInDesktop', SIGN_IN_WITH_GOOGLE_DESKTOP: 'GoogleSignInDesktop', DESKTOP_SIGN_IN_REDIRECT: 'DesktopSignInRedirect', diff --git a/src/libs/Navigation/AppNavigator/ModalStackNavigators.js b/src/libs/Navigation/AppNavigator/ModalStackNavigators.js index 0897fadd17c5..1ca1f0d6838a 100644 --- a/src/libs/Navigation/AppNavigator/ModalStackNavigators.js +++ b/src/libs/Navigation/AppNavigator/ModalStackNavigators.js @@ -344,7 +344,7 @@ const NewTeachersUniteNavigator = createModalStackNavigator([ const SaveTheWorldPage = require('../../../pages/TeachersUnite/SaveTheWorldPage').default; return SaveTheWorldPage; }, - name: 'SaveTheWorld_Root', + name: SCREENS.SAVE_THE_WORLD.ROOT, }, { getComponent: () => { diff --git a/src/libs/Navigation/linkingConfig.js b/src/libs/Navigation/linkingConfig.js index 1c75a41501c1..c72c3cf7e591 100644 --- a/src/libs/Navigation/linkingConfig.js +++ b/src/libs/Navigation/linkingConfig.js @@ -265,7 +265,7 @@ export default { }, TeachersUnite: { screens: { - SaveTheWorld_Root: ROUTES.TEACHERS_UNITE, + [SCREENS.SAVE_THE_WORLD.ROOT]: ROUTES.TEACHERS_UNITE, I_Know_A_Teacher: ROUTES.I_KNOW_A_TEACHER, Intro_School_Principal: ROUTES.INTRO_SCHOOL_PRINCIPAL, I_Am_A_Teacher: ROUTES.I_AM_A_TEACHER, diff --git a/src/pages/TeachersUnite/SaveTheWorldPage.js b/src/pages/TeachersUnite/SaveTheWorldPage.js index 47c441ad934c..11519d8738ff 100644 --- a/src/pages/TeachersUnite/SaveTheWorldPage.js +++ b/src/pages/TeachersUnite/SaveTheWorldPage.js @@ -5,6 +5,7 @@ import PropTypes from 'prop-types'; import _ from 'lodash'; import Navigation from '../../libs/Navigation/Navigation'; import ROUTES from '../../ROUTES'; +import SCREENS from '../../SCREENS'; import ONYXKEYS from '../../ONYXKEYS'; import CONST from '../../CONST'; import styles from '../../styles/styles'; @@ -54,7 +55,7 @@ function SaveTheWorldPage(props) { shouldShowBackButton title={translate('sidebarScreen.saveTheWorld')} onBackButtonPress={Navigation.goBack} - backgroundColor={themeColors.PAGE_BACKGROUND_COLORS[ROUTES.I_KNOW_A_TEACHER]} + backgroundColor={themeColors.PAGE_BACKGROUND_COLORS[SCREENS.SAVE_THE_WORLD.ROOT]} illustration={LottieAnimations.SaveTheWorld} > diff --git a/src/styles/themes/default.js b/src/styles/themes/default.js index d1db096cd56a..72adb42a8f87 100644 --- a/src/styles/themes/default.js +++ b/src/styles/themes/default.js @@ -89,7 +89,7 @@ darkTheme.PAGE_BACKGROUND_COLORS = { [SCREENS.SETTINGS.PREFERENCES]: colors.blue500, [SCREENS.SETTINGS.WORKSPACES]: colors.pink800, [SCREENS.SETTINGS.SECURITY]: colors.ice500, - [ROUTES.I_KNOW_A_TEACHER]: colors.tangerine800, + [SCREENS.SAVE_THE_WORLD.ROOT]: colors.tangerine800, }; export default darkTheme; diff --git a/src/styles/themes/light.js b/src/styles/themes/light.js index 7961403fbdf0..5018314d7f4a 100644 --- a/src/styles/themes/light.js +++ b/src/styles/themes/light.js @@ -87,8 +87,8 @@ lightTheme.PAGE_BACKGROUND_COLORS = { [SCREENS.HOME]: lightTheme.sidebar, [SCREENS.SETTINGS.PREFERENCES]: colors.blue500, [SCREENS.SETTINGS.WORKSPACES]: colors.pink800, - [ROUTES.I_KNOW_A_TEACHER]: colors.tangerine800, - [ROUTES.SETTINGS_SECURITY]: colors.ice500, + [SCREENS.SETTINGS.SECURITY]: colors.ice500, + [SCREENS.SAVE_THE_WORLD.ROOT]: colors.tangerine800, }; export default lightTheme; From 61b462ab718101f0fd436b93705fe25c043d5147 Mon Sep 17 00:00:00 2001 From: rory Date: Fri, 15 Sep 2023 09:56:49 +0800 Subject: [PATCH 04/10] Dont show close button in settings page --- src/pages/settings/Security/SecuritySettingsPage.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/pages/settings/Security/SecuritySettingsPage.js b/src/pages/settings/Security/SecuritySettingsPage.js index 293e488ede7a..cfec53c1e813 100644 --- a/src/pages/settings/Security/SecuritySettingsPage.js +++ b/src/pages/settings/Security/SecuritySettingsPage.js @@ -52,8 +52,6 @@ function SecuritySettingsPage(props) { Navigation.goBack(ROUTES.SETTINGS)} - shouldShowBackButton - shouldShowCloseButton illustration={LottieAnimations.Safe} backgroundColor={themeColors.PAGE_BACKGROUND_COLORS[SCREENS.SETTINGS.SECURITY]} > From 40671c6ec7a51a6c914ace49c52e9d900b6d7e9f Mon Sep 17 00:00:00 2001 From: rory Date: Fri, 15 Sep 2023 14:51:46 +0800 Subject: [PATCH 05/10] Fix lint style --- src/styles/themes/default.js | 1 - src/styles/themes/light.js | 1 - 2 files changed, 2 deletions(-) diff --git a/src/styles/themes/default.js b/src/styles/themes/default.js index 72adb42a8f87..f81ec4e83340 100644 --- a/src/styles/themes/default.js +++ b/src/styles/themes/default.js @@ -1,7 +1,6 @@ /* eslint-disable no-unused-vars */ import colors from '../colors'; import SCREENS from '../../SCREENS'; -import ROUTES from '../../ROUTES'; const darkTheme = { // Figma keys diff --git a/src/styles/themes/light.js b/src/styles/themes/light.js index 5018314d7f4a..479b1e9bd525 100644 --- a/src/styles/themes/light.js +++ b/src/styles/themes/light.js @@ -1,6 +1,5 @@ import colors from '../colors'; import SCREENS from '../../SCREENS'; -import ROUTES from '../../ROUTES'; const lightTheme = { // Figma keys From 1f7667b61e86c608e11fdee56f777c0f219b0c2e Mon Sep 17 00:00:00 2001 From: rory Date: Fri, 15 Sep 2023 15:17:38 +0800 Subject: [PATCH 06/10] Fix Settings_Status page --- src/SCREENS.ts | 1 + .../AppNavigator/ModalStackNavigators.js | 2 +- src/libs/Navigation/linkingConfig.js | 2 +- .../Profile/CustomStatus/StatusPage.js | 18 ++++++++---------- src/styles/themes/default.js | 4 ++-- src/styles/themes/light.js | 4 ++-- 6 files changed, 15 insertions(+), 16 deletions(-) diff --git a/src/SCREENS.ts b/src/SCREENS.ts index ae850fb3f9f3..e4dd1056e690 100644 --- a/src/SCREENS.ts +++ b/src/SCREENS.ts @@ -15,6 +15,7 @@ export default { PREFERENCES: 'Settings_Preferences', WORKSPACES: 'Settings_Workspaces', SECURITY: 'Settings_Security', + STATUS: 'Settings_Status', }, SAVE_THE_WORLD: { ROOT: 'SaveTheWorld_Root', diff --git a/src/libs/Navigation/AppNavigator/ModalStackNavigators.js b/src/libs/Navigation/AppNavigator/ModalStackNavigators.js index 1ca1f0d6838a..8209a01ce0f2 100644 --- a/src/libs/Navigation/AppNavigator/ModalStackNavigators.js +++ b/src/libs/Navigation/AppNavigator/ModalStackNavigators.js @@ -593,7 +593,7 @@ const SettingsModalStackNavigator = createModalStackNavigator([ const SettingsStatus = require('../../../pages/settings/Profile/CustomStatus/StatusPage').default; return SettingsStatus; }, - name: 'Settings_Status', + name: SCREENS.SETTINGS.STATUS, }, { getComponent: () => { diff --git a/src/libs/Navigation/linkingConfig.js b/src/libs/Navigation/linkingConfig.js index c72c3cf7e591..72e5d3c48f1a 100644 --- a/src/libs/Navigation/linkingConfig.js +++ b/src/libs/Navigation/linkingConfig.js @@ -163,7 +163,7 @@ export default { path: ROUTES.SETTINGS_SHARE_CODE, exact: true, }, - Settings_Status: { + [SCREENS.SETTINGS.STATUS]: { path: ROUTES.SETTINGS_STATUS, exact: true, }, diff --git a/src/pages/settings/Profile/CustomStatus/StatusPage.js b/src/pages/settings/Profile/CustomStatus/StatusPage.js index f178b25fd0fb..d431e6e653c4 100644 --- a/src/pages/settings/Profile/CustomStatus/StatusPage.js +++ b/src/pages/settings/Profile/CustomStatus/StatusPage.js @@ -7,7 +7,6 @@ import withCurrentUserPersonalDetails, {withCurrentUserPersonalDetailsPropTypes} import MenuItemWithTopDescription from '../../../../components/MenuItemWithTopDescription'; import StaticHeaderPageLayout from '../../../../components/StaticHeaderPageLayout'; import * as Expensicons from '../../../../components/Icon/Expensicons'; -import withLocalize from '../../../../components/withLocalize'; import MenuItem from '../../../../components/MenuItem'; import Button from '../../../../components/Button'; import Text from '../../../../components/Text'; @@ -26,7 +25,7 @@ const propTypes = { }; function StatusPage({draftStatus, currentUserPersonalDetails}) { - const localize = useLocalize(); + const {translate} = useLocalize(); const currentUserEmojiCode = lodashGet(currentUserPersonalDetails, 'status.emojiCode', ''); const currentUserStatusText = lodashGet(currentUserPersonalDetails, 'status.text', ''); const draftEmojiCode = lodashGet(draftStatus, 'emojiCode'); @@ -55,30 +54,30 @@ function StatusPage({draftStatus, currentUserPersonalDetails}) { hasDraftStatus ? (