diff --git a/README.md b/README.md index 6b75fbed1b2c..9f73a0012bef 100644 --- a/README.md +++ b/README.md @@ -175,6 +175,7 @@ Often times in order to write a unit test, you may need to mock data, a componen to help run our Unit tests. * To run the **Jest unit tests**: `npm run test` +* UI tests guidelines can be found [here](tests/ui/README.md) ## Performance tests We use Reassure for monitoring performance regression. More detailed information can be found [here](tests/perf-test/README.md): diff --git a/android/app/build.gradle b/android/app/build.gradle index 907813d56e2e..5d10e3d6f6f8 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -110,8 +110,8 @@ android { minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion multiDexEnabled rootProject.ext.multiDexEnabled - versionCode 1009006600 - versionName "9.0.66-0" + versionCode 1009006606 + versionName "9.0.66-6" // Supported language variants must be declared here to avoid from being removed during the compilation. // This also helps us to not include unnecessary language variants in the APK. resConfigs "en", "es" diff --git a/android/app/src/main/java/com/expensify/chat/MainApplication.kt b/android/app/src/main/java/com/expensify/chat/MainApplication.kt index 942304c80445..ec3ac41c76c4 100644 --- a/android/app/src/main/java/com/expensify/chat/MainApplication.kt +++ b/android/app/src/main/java/com/expensify/chat/MainApplication.kt @@ -8,6 +8,7 @@ import android.database.CursorWindow import android.os.Process import androidx.multidex.MultiDexApplication import com.expensify.chat.bootsplash.BootSplashPackage +import com.expensify.chat.navbar.NavBarManagerPackage import com.expensify.chat.shortcutManagerModule.ShortcutManagerPackage import com.facebook.react.PackageList import com.facebook.react.ReactApplication @@ -36,6 +37,7 @@ class MainApplication : MultiDexApplication(), ReactApplication { add(BootSplashPackage()) add(ExpensifyAppPackage()) add(RNTextInputResetPackage()) + add(NavBarManagerPackage()) } override fun getJSMainModuleName() = ".expo/.virtual-metro-entry" diff --git a/android/app/src/main/java/com/expensify/chat/navbar/NavBarManagerModule.kt b/android/app/src/main/java/com/expensify/chat/navbar/NavBarManagerModule.kt new file mode 100644 index 000000000000..5c566df606eb --- /dev/null +++ b/android/app/src/main/java/com/expensify/chat/navbar/NavBarManagerModule.kt @@ -0,0 +1,27 @@ +package com.expensify.chat.navbar + +import androidx.core.view.WindowInsetsControllerCompat +import com.facebook.react.bridge.ReactApplicationContext +import com.facebook.react.bridge.ReactContextBaseJavaModule +import com.facebook.react.bridge.ReactMethod +import com.facebook.react.bridge.UiThreadUtil; + +class NavBarManagerModule( + private val mReactContext: ReactApplicationContext, +) : ReactContextBaseJavaModule(mReactContext) { + override fun getName(): String = "RNNavBarManager" + + @ReactMethod + fun setButtonStyle(style: String) { + UiThreadUtil.runOnUiThread { + mReactContext.currentActivity?.window?.let { + WindowInsetsControllerCompat(it, it.decorView).let { controller -> + when (style) { + "light" -> controller.isAppearanceLightNavigationBars = false + "dark" -> controller.isAppearanceLightNavigationBars = true + } + } + } + } + } +} diff --git a/android/app/src/main/java/com/expensify/chat/navbar/NavBarManagerPackage.kt b/android/app/src/main/java/com/expensify/chat/navbar/NavBarManagerPackage.kt new file mode 100644 index 000000000000..33ee64d17769 --- /dev/null +++ b/android/app/src/main/java/com/expensify/chat/navbar/NavBarManagerPackage.kt @@ -0,0 +1,18 @@ +package com.expensify.chat.navbar + +import com.facebook.react.ReactPackage +import com.facebook.react.bridge.NativeModule +import com.facebook.react.bridge.ReactApplicationContext +import com.facebook.react.uimanager.ViewManager + +class NavBarManagerPackage : ReactPackage { + override fun createViewManagers(reactContext: ReactApplicationContext): List> { + return emptyList() + } + + override fun createNativeModules(reactContext: ReactApplicationContext): List { + val modules: MutableList = ArrayList() + modules.add(NavBarManagerModule(reactContext)) + return modules + } +} diff --git a/android/app/src/main/res/values/styles.xml b/android/app/src/main/res/values/styles.xml index 75126afbd407..42da35d7a493 100644 --- a/android/app/src/main/res/values/styles.xml +++ b/android/app/src/main/res/values/styles.xml @@ -7,6 +7,8 @@ diff --git a/contributingGuides/CONTRIBUTING.md b/contributingGuides/CONTRIBUTING.md index 0a9417820190..14b571308bb5 100644 --- a/contributingGuides/CONTRIBUTING.md +++ b/contributingGuides/CONTRIBUTING.md @@ -9,9 +9,10 @@ You can create as many accounts as needed in order to test your changes directly **Notes**: -1. When testing chat functionality in the app please do this between accounts you or your fellow contributors own - **do not test chatting with Concierge**, as this diverts to our customer support team. Thank you. -2. A member of our customer onboarding team gets auto-assigned to every new policy created by a non-paying account to help them set up. Please **do not interact with these teams, ask for calls, or support on your issues.** If you do need to test functionality inside the defaultRooms (#admins & #announce) for any issues you’re working on, please let them know that you are a contributor and don’t need assistance. They will proceed to ignore the chat. -3. Please **do not post in any Expensify owned public room for testing** (e.g #exfy-roadmap, #new-expensify-feedback). These rooms include real customers and investors. You can create your own public rooms, or [use this test public room](https://staging.new.expensify.com/r/2091104345528462) on either staging or production. Thanks! +1. When creating test accounts, include a `+` (plus sign) in the email address (e.g., matt+1@gmail.com). This marks the account and their associated workspaces as test accounts in Expensify, ensuring Expensify Guides are not assigned to help with account setup. +2. When testing chat functionality in the app please do this between accounts you or your fellow contributors own - **do not test chatting with Concierge**, as this diverts to our customer support team. Thank you. +3. A member of our customer onboarding team gets auto-assigned to every new policy created by a non-paying account to help them set up. Please **do not interact with these teams, ask for calls, or support on your issues.** If you do need to test functionality inside the defaultRooms (#admins & #announce) for any issues you’re working on, please let them know that you are a contributor and don’t need assistance. They will proceed to ignore the chat. +4. Please **do not post in any Expensify owned public room for testing** (e.g #exfy-roadmap, #new-expensify-feedback). These rooms include real customers and investors. You can create your own public rooms, or [use this test public room](https://staging.new.expensify.com/r/2091104345528462) on either staging or production. Thanks! #### Generating Multiple Test Accounts You can generate multiple test accounts by using a `+` postfix, for example if your email is test@test.com, you can create multiple New Expensify accounts connected to the same email address by using test+123@test.com, test+456@test.com, etc. diff --git a/docs/articles/expensify-classic/settings/Change-or-add-email-address.md b/docs/articles/expensify-classic/settings/Change-or-add-email-address.md index 754b9a7f9ac0..f6fe3d8e13b4 100644 --- a/docs/articles/expensify-classic/settings/Change-or-add-email-address.md +++ b/docs/articles/expensify-classic/settings/Change-or-add-email-address.md @@ -12,13 +12,34 @@ The primary email address on your Expensify account is the email that receives e Before you can remove a primary email address, you must add a new one to your Expensify account and make it the primary using the steps below. Email addresses must be added as a secondary login before they can be made the primary. {% include end-info.html %} +# Adding a new Secondary Login *Note: This process is currently not available from the mobile app and must be completed from the Expensify website.* 1. Hover over Settings, then click **Account**. -2. Under the Account Details tab, scroll down to the Secondary Logins section and click **Add Secondary Login**. +2. Under the Account Details > Secondary Logins > click **Add Secondary Login**. 3. Enter the email address or phone number you wish to use as a secondary login. For phone numbers, be sure to include the international code, if applicable. 4. Find the email or text message from Expensify containing the Magic Code and enter it into the field. -5. To make the new email address the primary address for your account, click **Make Primary**. + +# Changing your Primary Login +If you already have multiple email addresses linked to your account, you can change which one is listed as the Primary Login. + +1. Settings > Account > Secondary Logins. +2. Click **Make Primary** next to the email address you want to appear on your account. You can keep both logins, or you can click **Remove** next to the old email address to delete it from your account. + +# Unlinking an email from your old account +If you at one point added your personal email address as a Secondary Login to your account, and then the account was closed - for example if you had a company account and then left the company - you may want to unlink your personal email to use it with a new Expensify account. You can do this with the following steps: + +1. Navigate to the sign in page at expensify.com. +2. Enter your personal email address into the email field. +3. Click **Unlink Accounts**. +4. You will recieve a verification email to complete the unlinking of your personal address. + +# FAQ +**What does changing the primary login do?** +When you change your primary login this will update the email address that appears on your reports (old and new), in workspace account settings, and on your account. + +**Can I have multiple Seconary Logins?** +Yes, you can have an unlimited number of logins attached to your account. diff --git a/docs/articles/new-expensify/expenses-&-payments/Create-an-expense.md b/docs/articles/new-expensify/expenses-&-payments/Create-an-expense.md index 38f1e0fdd466..2ae14e822a12 100644 --- a/docs/articles/new-expensify/expenses-&-payments/Create-an-expense.md +++ b/docs/articles/new-expensify/expenses-&-payments/Create-an-expense.md @@ -25,7 +25,7 @@ When an expense is submitted to a workspace, your approver will receive an email # How to Create an Expense -# SmartScan a receipt +## SmartScan a receipt {% include selector.html values="desktop, mobile" %} @@ -55,7 +55,7 @@ When an expense is submitted to a workspace, your approver will receive an email You can also forward receipts to receipts@expensify.com using your primary or secondary email address. SmartScan will automatically extract all the details from the receipt and add them to your expenses. {% include end-info.html %} -# Manually add an expense +## Manually add an expense {% include selector.html values="desktop, mobile" %} @@ -83,7 +83,7 @@ You can also forward receipts to receipts@expensify.com using your primary or se {% include end-selector.html %} -# Create a distance expense +## Create a distance expense {% include selector.html values="desktop, mobile" %} @@ -115,6 +115,28 @@ You can also forward receipts to receipts@expensify.com using your primary or se {% include end-selector.html %} +# How to Delete an Expense + +{% include selector.html values="desktop, mobile" %} + +{% include option.html value="desktop or WebApp" %} +1. Click **Search > Expenses** and locate your expense. +2. Click the checkbox next to the expense(s) you wish to delete. +3. Click **# selected** in the top right corner. +4. Choose **Delete**. +5. Confirm that you wish to delete it by clicking the red **Delete** button in the popup. +{% include end-option.html %} + +{% include option.html value="mobile" %} +1. Tap **Search**. +2. Tap and hold on the expense you wish to delete. +3. Tap **# selected**. +4. Tap **Delete**. +5. Confirm that you wish to delete it by clicking the red **Delete** button in the popup. +{% include end-option.html %} + +{% include end-selector.html %} + # Next Steps for expenses sent to an Individual - Expenses submitted to an individual are instantly sent. diff --git a/ios/NewExpensify/Info.plist b/ios/NewExpensify/Info.plist index 0feab9ddaced..2cd9c81c19ca 100644 --- a/ios/NewExpensify/Info.plist +++ b/ios/NewExpensify/Info.plist @@ -40,7 +40,7 @@ CFBundleVersion - 9.0.66.0 + 9.0.66.6 FullStory OrgId diff --git a/ios/NewExpensifyTests/Info.plist b/ios/NewExpensifyTests/Info.plist index d1921d0b1b65..57ba616450b6 100644 --- a/ios/NewExpensifyTests/Info.plist +++ b/ios/NewExpensifyTests/Info.plist @@ -19,6 +19,6 @@ CFBundleSignature ???? CFBundleVersion - 9.0.66.0 + 9.0.66.6 diff --git a/ios/NotificationServiceExtension/Info.plist b/ios/NotificationServiceExtension/Info.plist index 111c5363813a..27a481ab98ef 100644 --- a/ios/NotificationServiceExtension/Info.plist +++ b/ios/NotificationServiceExtension/Info.plist @@ -13,7 +13,7 @@ CFBundleShortVersionString 9.0.66 CFBundleVersion - 9.0.66.0 + 9.0.66.6 NSExtension NSExtensionPointIdentifier diff --git a/package-lock.json b/package-lock.json index 83d0c122ab2f..a58e33023eef 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "new.expensify", - "version": "9.0.66-0", + "version": "9.0.66-6", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "new.expensify", - "version": "9.0.66-0", + "version": "9.0.66-6", "hasInstallScript": true, "license": "MIT", "dependencies": { @@ -103,7 +103,7 @@ "react-native-picker-select": "git+https://github.com/Expensify/react-native-picker-select.git#da50d2c5c54e268499047f9cc98b8df4196c1ddf", "react-native-plaid-link-sdk": "11.11.0", "react-native-qrcode-svg": "6.3.11", - "react-native-quick-sqlite": "git+https://github.com/margelo/react-native-quick-sqlite#99f34ebefa91698945f3ed26622e002bd79489e0", + "react-native-quick-sqlite": "git+https://github.com/margelo/react-native-nitro-sqlite#99f34ebefa91698945f3ed26622e002bd79489e0", "react-native-reanimated": "3.16.1", "react-native-release-profiler": "^0.2.1", "react-native-render-html": "6.3.1", @@ -35885,8 +35885,9 @@ }, "node_modules/react-native-quick-sqlite": { "version": "8.1.0", - "resolved": "git+ssh://git@github.com/margelo/react-native-quick-sqlite.git#99f34ebefa91698945f3ed26622e002bd79489e0", + "resolved": "git+ssh://git@github.com/margelo/react-native-nitro-sqlite.git#99f34ebefa91698945f3ed26622e002bd79489e0", "integrity": "sha512-7uuHmOEnc6SOAVoAdvkQhvaYhUZMORM75qo+v6PZoH6Qk21j5CmrcxJE3gNh0FhMfxK73hQ3ZtugC/NI2jVhrw==", + "license": "MIT", "peerDependencies": { "react": "*", "react-native": "*" diff --git a/package.json b/package.json index 4df25219e277..c82882a2c9cf 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "new.expensify", - "version": "9.0.66-0", + "version": "9.0.66-6", "author": "Expensify, Inc.", "homepage": "https://new.expensify.com", "description": "New Expensify is the next generation of Expensify: a reimagination of payments based atop a foundation of chat.", @@ -160,7 +160,7 @@ "react-native-picker-select": "git+https://github.com/Expensify/react-native-picker-select.git#da50d2c5c54e268499047f9cc98b8df4196c1ddf", "react-native-plaid-link-sdk": "11.11.0", "react-native-qrcode-svg": "6.3.11", - "react-native-quick-sqlite": "git+https://github.com/margelo/react-native-quick-sqlite#99f34ebefa91698945f3ed26622e002bd79489e0", + "react-native-quick-sqlite": "git+https://github.com/margelo/react-native-nitro-sqlite#99f34ebefa91698945f3ed26622e002bd79489e0", "react-native-reanimated": "3.16.1", "react-native-release-profiler": "^0.2.1", "react-native-render-html": "6.3.1", diff --git a/patches/react-native+0.75.2+023+modal-navigation-bar-translucent.patch b/patches/react-native+0.75.2+023+modal-navigation-bar-translucent.patch new file mode 100644 index 000000000000..f8a98760b389 --- /dev/null +++ b/patches/react-native+0.75.2+023+modal-navigation-bar-translucent.patch @@ -0,0 +1,214 @@ +diff --git a/node_modules/react-native/Libraries/Modal/Modal.d.ts b/node_modules/react-native/Libraries/Modal/Modal.d.ts +index 4cc2df2..a501b27 100644 +--- a/node_modules/react-native/Libraries/Modal/Modal.d.ts ++++ b/node_modules/react-native/Libraries/Modal/Modal.d.ts +@@ -94,6 +94,11 @@ export interface ModalPropsAndroid { + * Determines whether your modal should go under the system statusbar. + */ + statusBarTranslucent?: boolean | undefined; ++ ++ /** ++ * Determines whether your modal should go under the system navigationbar. ++ */ ++ navigationBarTranslucent?: boolean | undefined; + } + + export type ModalProps = ModalBaseProps & +diff --git a/node_modules/react-native/Libraries/Modal/Modal.js b/node_modules/react-native/Libraries/Modal/Modal.js +index 1942d9e..1ffbe4c 100644 +--- a/node_modules/react-native/Libraries/Modal/Modal.js ++++ b/node_modules/react-native/Libraries/Modal/Modal.js +@@ -95,6 +95,14 @@ export type Props = $ReadOnly<{| + */ + statusBarTranslucent?: ?boolean, + ++ /** ++ * The `navigationBarTranslucent` prop determines whether your modal should go under ++ * the system navigationbar. ++ * ++ * See https://reactnative.dev/docs/modal.html#navigationbartranslucent-android ++ */ ++ navigationBarTranslucent?: ?boolean, ++ + /** + * The `hardwareAccelerated` prop controls whether to force hardware + * acceleration for the underlying window. +@@ -170,6 +178,14 @@ function confirmProps(props: Props) { + `Modal with '${props.presentationStyle}' presentation style and 'transparent' value is not supported.`, + ); + } ++ if ( ++ props.navigationBarTranslucent === true && ++ props.statusBarTranslucent !== true ++ ) { ++ console.warn( ++ 'Modal with translucent navigation bar and without translucent status bar is not supported.', ++ ); ++ } + } + } + +@@ -291,6 +307,7 @@ class Modal extends React.Component { + onDismiss={onDismiss} + visible={this.props.visible} + statusBarTranslucent={this.props.statusBarTranslucent} ++ navigationBarTranslucent={this.props.navigationBarTranslucent} + identifier={this._identifier} + style={styles.modal} + // $FlowFixMe[method-unbinding] added when improving typing for this parameters +diff --git a/node_modules/react-native/React/Views/RCTModalHostView.h b/node_modules/react-native/React/Views/RCTModalHostView.h +index 2fcdcae..0469c23 100644 +--- a/node_modules/react-native/React/Views/RCTModalHostView.h ++++ b/node_modules/react-native/React/Views/RCTModalHostView.h +@@ -27,6 +27,7 @@ + + // Android only + @property (nonatomic, assign) BOOL statusBarTranslucent; ++@property (nonatomic, assign) BOOL navigationBarTranslucent; + @property (nonatomic, assign) BOOL hardwareAccelerated; + @property (nonatomic, assign) BOOL animated; + +diff --git a/node_modules/react-native/React/Views/RCTModalHostViewManager.m b/node_modules/react-native/React/Views/RCTModalHostViewManager.m +index e2ae7e2..a694008 100644 +--- a/node_modules/react-native/React/Views/RCTModalHostViewManager.m ++++ b/node_modules/react-native/React/Views/RCTModalHostViewManager.m +@@ -118,6 +118,7 @@ - (void)invalidate + RCT_EXPORT_VIEW_PROPERTY(presentationStyle, UIModalPresentationStyle) + RCT_EXPORT_VIEW_PROPERTY(transparent, BOOL) + RCT_EXPORT_VIEW_PROPERTY(statusBarTranslucent, BOOL) ++RCT_EXPORT_VIEW_PROPERTY(navigationBarTranslucent, BOOL) + RCT_EXPORT_VIEW_PROPERTY(hardwareAccelerated, BOOL) + RCT_EXPORT_VIEW_PROPERTY(animated, BOOL) + RCT_EXPORT_VIEW_PROPERTY(onShow, RCTDirectEventBlock) +diff --git a/node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/views/modal/ReactModalHostManager.kt b/node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/views/modal/ReactModalHostManager.kt +index d5e053c..fddda45 100644 +--- a/node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/views/modal/ReactModalHostManager.kt ++++ b/node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/views/modal/ReactModalHostManager.kt +@@ -59,6 +59,15 @@ public class ReactModalHostManager : + view.statusBarTranslucent = statusBarTranslucent + } + ++ ++ @ReactProp(name = "navigationBarTranslucent") ++ public override fun setNavigationBarTranslucent( ++ view: ReactModalHostView, ++ navigationBarTranslucent: Boolean ++ ) { ++ view.navigationBarTranslucent = navigationBarTranslucent ++ } ++ + @ReactProp(name = "hardwareAccelerated") + public override fun setHardwareAccelerated( + view: ReactModalHostView, +diff --git a/node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/views/modal/ReactModalHostView.kt b/node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/views/modal/ReactModalHostView.kt +index f6e0d82..03380cb 100644 +--- a/node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/views/modal/ReactModalHostView.kt ++++ b/node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/views/modal/ReactModalHostView.kt +@@ -46,6 +46,7 @@ import com.facebook.react.uimanager.UIManagerModule + import com.facebook.react.uimanager.events.EventDispatcher + import com.facebook.react.views.common.ContextUtils + import com.facebook.react.views.view.ReactViewGroup ++import com.facebook.react.views.view.setSystemBarsTranslucency + import java.util.Objects + import kotlin.math.abs + +@@ -78,6 +79,12 @@ public class ReactModalHostView(context: ThemedReactContext) : + createNewDialog = true + } + ++ public var navigationBarTranslucent: Boolean = false ++ set(value) { ++ field = value ++ createNewDialog = true ++ } ++ + public var animationType: String? = null + set(value) { + field = value +@@ -296,6 +303,7 @@ public class ReactModalHostView(context: ThemedReactContext) : + } else { + frameLayout.fitsSystemWindows = true + } ++ dialog?.window?.setSystemBarsTranslucency(navigationBarTranslucent) + return frameLayout + } + +diff --git a/node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/views/view/WindowUtil.kt b/node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/views/view/WindowUtil.kt +new file mode 100644 +index 0000000..24057c4 +--- /dev/null ++++ b/node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/views/view/WindowUtil.kt +@@ -0,0 +1,53 @@ ++/* ++ * Copyright (c) Meta Platforms, Inc. and affiliates. ++ * ++ * This source code is licensed under the MIT license found in the ++ * LICENSE file in the root directory of this source tree. ++ */ ++ ++package com.facebook.react.views.view ++ ++import android.content.res.Configuration ++import android.graphics.Color ++import android.os.Build ++import android.view.Window ++import android.view.WindowManager ++import androidx.core.view.ViewCompat ++import androidx.core.view.WindowCompat ++import androidx.core.view.WindowInsetsControllerCompat ++ ++@Suppress("DEPRECATION") ++public fun Window.setSystemBarsTranslucency(isTranslucent: Boolean) { ++ WindowCompat.setDecorFitsSystemWindows(this, !isTranslucent) ++ ++ if (isTranslucent) { ++ val isDarkMode = ++ context.resources.configuration.uiMode and Configuration.UI_MODE_NIGHT_MASK == ++ Configuration.UI_MODE_NIGHT_YES ++ ++ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) { ++ isStatusBarContrastEnforced = false ++ isNavigationBarContrastEnforced = true ++ } ++ ++ statusBarColor = Color.TRANSPARENT ++ navigationBarColor = when { ++ Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q -> Color.TRANSPARENT ++ Build.VERSION.SDK_INT >= Build.VERSION_CODES.O_MR1 && !isDarkMode -> ++ Color.argb(0xe6, 0xFF, 0xFF, 0xFF) ++ else -> Color.argb(0x80, 0x1b, 0x1b, 0x1b) ++ } ++ ++ WindowInsetsControllerCompat(this, this.decorView).run { ++ isAppearanceLightNavigationBars = !isDarkMode ++ } ++ ++ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) { ++ attributes.layoutInDisplayCutoutMode = when { ++ Build.VERSION.SDK_INT >= Build.VERSION_CODES.R -> ++ WindowManager.LayoutParams.LAYOUT_IN_DISPLAY_CUTOUT_MODE_ALWAYS ++ else -> WindowManager.LayoutParams.LAYOUT_IN_DISPLAY_CUTOUT_MODE_SHORT_EDGES ++ } ++ } ++ } ++} +\ No newline at end of file +diff --git a/node_modules/react-native/src/private/specs/components/RCTModalHostViewNativeComponent.js b/node_modules/react-native/src/private/specs/components/RCTModalHostViewNativeComponent.js +index 86bf895..58ec294 100644 +--- a/node_modules/react-native/src/private/specs/components/RCTModalHostViewNativeComponent.js ++++ b/node_modules/react-native/src/private/specs/components/RCTModalHostViewNativeComponent.js +@@ -58,6 +58,14 @@ type NativeProps = $ReadOnly<{| + */ + statusBarTranslucent?: WithDefault, + ++ /** ++ * The `navigationBarTranslucent` prop determines whether your modal should go under ++ * the system navigationbar. ++ * ++ * See https://reactnative.dev/docs/modal#navigationBarTranslucent ++ */ ++ navigationBarTranslucent?: WithDefault, ++ + /** + * The `hardwareAccelerated` prop controls whether to force hardware + * acceleration for the underlying window. diff --git a/patches/react-native-keyboard-controller+1.14.4+001+disable-android.patch b/patches/react-native-keyboard-controller+1.14.4+001+disable-android.patch deleted file mode 100644 index 8d2d81aab40a..000000000000 --- a/patches/react-native-keyboard-controller+1.14.4+001+disable-android.patch +++ /dev/null @@ -1,62 +0,0 @@ -diff --git a/node_modules/react-native-keyboard-controller/android/src/main/java/com/reactnativekeyboardcontroller/views/EdgeToEdgeReactViewGroup.kt b/node_modules/react-native-keyboard-controller/android/src/main/java/com/reactnativekeyboardcontroller/views/EdgeToEdgeReactViewGroup.kt -index 93c20d3..df1e846 100644 ---- a/node_modules/react-native-keyboard-controller/android/src/main/java/com/reactnativekeyboardcontroller/views/EdgeToEdgeReactViewGroup.kt -+++ b/node_modules/react-native-keyboard-controller/android/src/main/java/com/reactnativekeyboardcontroller/views/EdgeToEdgeReactViewGroup.kt -@@ -74,7 +74,7 @@ class EdgeToEdgeReactViewGroup( - } - - override fun onConfigurationChanged(newConfig: Configuration?) { -- this.reApplyWindowInsets() -+ // this.reApplyWindowInsets() - } - // endregion - -@@ -124,12 +124,12 @@ class EdgeToEdgeReactViewGroup( - } - - private fun goToEdgeToEdge(edgeToEdge: Boolean) { -- reactContext.currentActivity?.let { -- WindowCompat.setDecorFitsSystemWindows( -- it.window, -- !edgeToEdge, -- ) -- } -+ // reactContext.currentActivity?.let { -+ // WindowCompat.setDecorFitsSystemWindows( -+ // it.window, -+ // !edgeToEdge, -+ // ) -+ // } - } - - private fun setupKeyboardCallbacks() { -@@ -182,16 +182,16 @@ class EdgeToEdgeReactViewGroup( - // region State managers - private fun enable() { - this.goToEdgeToEdge(true) -- this.setupWindowInsets() -+ // this.setupWindowInsets() - this.setupKeyboardCallbacks() -- modalAttachedWatcher.enable() -+ // modalAttachedWatcher.enable() - } - - private fun disable() { - this.goToEdgeToEdge(false) -- this.setupWindowInsets() -+ // this.setupWindowInsets() - this.removeKeyboardCallbacks() -- modalAttachedWatcher.disable() -+ // modalAttachedWatcher.disable() - } - // endregion - -@@ -223,7 +223,7 @@ class EdgeToEdgeReactViewGroup( - fun forceStatusBarTranslucent(isStatusBarTranslucent: Boolean) { - if (active && this.isStatusBarTranslucent != isStatusBarTranslucent) { - this.isStatusBarTranslucent = isStatusBarTranslucent -- this.reApplyWindowInsets() -+ // this.reApplyWindowInsets() - } - } - // endregion diff --git a/patches/react-native-modal+13.0.1.patch b/patches/react-native-modal+13.0.1+001+initial.patch similarity index 100% rename from patches/react-native-modal+13.0.1.patch rename to patches/react-native-modal+13.0.1+001+initial.patch diff --git a/patches/react-native-modal+13.0.1+002+modal-navigation-bar-translucent.patch b/patches/react-native-modal+13.0.1+002+modal-navigation-bar-translucent.patch new file mode 100644 index 000000000000..a318627af02c --- /dev/null +++ b/patches/react-native-modal+13.0.1+002+modal-navigation-bar-translucent.patch @@ -0,0 +1,32 @@ +diff --git a/node_modules/react-native-modal/dist/modal.d.ts b/node_modules/react-native-modal/dist/modal.d.ts +index bd6419e..029762c 100644 +--- a/node_modules/react-native-modal/dist/modal.d.ts ++++ b/node_modules/react-native-modal/dist/modal.d.ts +@@ -46,6 +46,7 @@ declare const defaultProps: { + scrollOffsetMax: number; + scrollHorizontal: boolean; + statusBarTranslucent: boolean; ++ navigationBarTranslucent: boolean; + supportedOrientations: ("landscape" | "portrait" | "portrait-upside-down" | "landscape-left" | "landscape-right")[]; + }; + export declare type ModalProps = ViewProps & { +@@ -137,6 +138,7 @@ export declare class ReactNativeModal extends React.Component + scrollOffsetMax: number; + scrollHorizontal: boolean; + statusBarTranslucent: boolean; ++ navigationBarTranslucent: boolean; + supportedOrientations: ("landscape" | "portrait" | "portrait-upside-down" | "landscape-left" | "landscape-right")[]; + }; + state: State; +diff --git a/node_modules/react-native-modal/dist/modal.js b/node_modules/react-native-modal/dist/modal.js +index 46277ea..feec991 100644 +--- a/node_modules/react-native-modal/dist/modal.js ++++ b/node_modules/react-native-modal/dist/modal.js +@@ -38,6 +38,7 @@ const defaultProps = { + scrollOffsetMax: 0, + scrollHorizontal: false, + statusBarTranslucent: false, ++ navigationBarTranslucent: false, + supportedOrientations: ['portrait', 'landscape'], + }; + const extractAnimationFromProps = (props) => ({ diff --git a/src/App.tsx b/src/App.tsx index 643e2146e501..52904e0a06c4 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -2,7 +2,6 @@ import {PortalProvider} from '@gorhom/portal'; import React from 'react'; import {LogBox} from 'react-native'; import {GestureHandlerRootView} from 'react-native-gesture-handler'; -import {KeyboardProvider} from 'react-native-keyboard-controller'; import {PickerStateProvider} from 'react-native-picker-select'; import {SafeAreaProvider} from 'react-native-safe-area-context'; import '../wdyr'; @@ -15,6 +14,7 @@ import CustomStatusBarAndBackgroundContextProvider from './components/CustomStat import ErrorBoundary from './components/ErrorBoundary'; import HTMLEngineProvider from './components/HTMLEngineProvider'; import InitialURLContextProvider from './components/InitialURLContextProvider'; +import KeyboardProvider from './components/KeyboardProvider'; import {LocaleContextProvider} from './components/LocaleContextProvider'; import OnyxProvider from './components/OnyxProvider'; import PopoverContextProvider from './components/PopoverProvider'; diff --git a/src/CONST.ts b/src/CONST.ts index 496b7d8b28ec..ee70e3b29668 100755 --- a/src/CONST.ts +++ b/src/CONST.ts @@ -212,6 +212,7 @@ const onboardingPersonalSpendMessage: OnboardingMessage = { const combinedTrackSubmitOnboardingPersonalSpendMessage: OnboardingMessage = { ...onboardingPersonalSpendMessage, tasks: [ + selfGuidedTourTask, { type: 'trackExpense', autoCompleted: false, @@ -1338,6 +1339,10 @@ const CONST = { LIGHT_CONTENT: 'light-content', DARK_CONTENT: 'dark-content', }, + NAVIGATION_BAR_BUTTONS_STYLE: { + LIGHT: 'light', + DARK: 'dark', + }, TRANSACTION: { DEFAULT_MERCHANT: 'Expense', UNKNOWN_MERCHANT: 'Unknown Merchant', @@ -2850,6 +2855,7 @@ const CONST = { ALLOW: 'personal', }, CARD_LIST_THRESHOLD: 8, + DEFAULT_EXPORT_TYPE: 'default', EXPORT_CARD_TYPES: { /** * Name of Card NVP for QBO custom export accounts @@ -6349,6 +6355,10 @@ const CONST = { PAID_ADOPTION: 'paid_adoption', }, }, + + HYBRID_APP: { + REORDERING_REACT_NATIVE_ACTIVITY_TO_FRONT: 'reorderingReactNativeActivityToFront', + }, } as const; type Country = keyof typeof CONST.ALL_COUNTRIES; diff --git a/src/components/AmountPicker/AmountSelectorModal.tsx b/src/components/AmountPicker/AmountSelectorModal.tsx index b54f6301b798..d8510aef0499 100644 --- a/src/components/AmountPicker/AmountSelectorModal.tsx +++ b/src/components/AmountPicker/AmountSelectorModal.tsx @@ -1,4 +1,5 @@ -import React, {useState} from 'react'; +import {useFocusEffect} from '@react-navigation/native'; +import React, {useCallback, useRef, useState} from 'react'; import {View} from 'react-native'; import AmountForm from '@components/AmountForm'; import Button from '@components/Button'; @@ -6,6 +7,7 @@ import HeaderWithBackButton from '@components/HeaderWithBackButton'; import Modal from '@components/Modal'; import ScreenWrapper from '@components/ScreenWrapper'; import ScrollView from '@components/ScrollView'; +import type {BaseTextInputRef} from '@components/TextInput/BaseTextInput/types'; import useLocalize from '@hooks/useLocalize'; import useThemeStyles from '@hooks/useThemeStyles'; import CONST from '@src/CONST'; @@ -16,6 +18,28 @@ function AmountSelectorModal({value, description = '', onValueSelected, isVisibl const styles = useThemeStyles(); const [currentValue, setValue] = useState(value); + const inputRef = useRef(null); + const focusTimeoutRef = useRef(null); + + const inputCallbackRef = (ref: BaseTextInputRef | null) => { + inputRef.current = ref; + }; + + useFocusEffect( + useCallback(() => { + focusTimeoutRef.current = setTimeout(() => { + if (inputRef.current && isVisible) { + inputRef.current.focus(); + } + return () => { + if (!focusTimeoutRef.current || !isVisible) { + return; + } + clearTimeout(focusTimeoutRef.current); + }; + }, CONST.ANIMATED_TRANSITION); + }, [isVisible, inputRef]), + ); return ( inputCallbackRef(ref)} />