Skip to content

Commit fcf81fa

Browse files
committed
Merge branch 'main' into remove-onyx-connect-in-Task-p1
2 parents 400ade3 + 485a092 commit fcf81fa

141 files changed

Lines changed: 2691 additions & 941 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Mobile-Expensify

README.md

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -443,15 +443,7 @@ Files should be named after the component/function/constants they export, respec
443443
- All React components should be PascalCase (a.k.a. UpperCamelCase 🐫).
444444

445445
## Platform-Specific File Extensions
446-
In most cases, the code written for this repo should be platform-independent. In such cases, each module should have a single file, `index.js`, which defines the module's exports. There are, however, some cases in which a feature is intrinsically tied to the underlying platform. In such cases, the following file extensions can be used to export platform-specific code from a module:
447-
- Mobile => `index.native.js`
448-
- iOS Native App/Android Native App => `index.ios.js`/`index.android.js`
449-
- Web => `index.website.js`
450-
- Desktop => `index.desktop.js`
451-
452-
**Note:** `index.js` should be the default and only platform-specific implementations should be done in their respective files. i.e: If you have mobile-specific implementation in `index.native.js`, then the desktop/web implementation can be contained in a shared `index.js`.
453-
454-
`index.ios.js` and `index.android.js` are used when the app is running natively on respective platforms. These files are not used when users access the app through mobile browsers, but `index.website.js` is used instead. `index.native.js` are for both iOS and Android native apps. `index.native.js` should not be included in the same module as `index.ios.js` or `index.android.js`.
446+
This section has moved [here](contributingGuides/philosophies/CROSS-PLATFORM.md).
455447

456448
## API building
457449
When adding new API commands (and preferably when starting using a new one that was not yet used in this codebase) always
@@ -659,10 +651,7 @@ This application is built with the following principles.
659651
5. UI updates with data from the server
660652

661653
1. **Cross Platform 99.9999%**
662-
1. A feature isn't done until it works on all platforms. Accordingly, don't even bother writing a platform-specific code block because you're just going to need to undo it.
663-
1. If the reason you can't write cross-platform code is because there is a bug in ReactNative that is preventing it from working, the correct action is to fix RN and submit a PR upstream -- not to hack around RN bugs with platform-specific code paths.
664-
1. If there is a feature that simply doesn't exist on all platforms and thus doesn't exist in RN, rather than doing if (platform=iOS) { }, instead write a "shim" library that is implemented with NOOPs on the other platforms. For example, rather than injecting platform-specific multi-tab code (which can only work on browsers, because it's the only platform with multiple tabs), write a TabManager class that just is NOOP for non-browser platforms. This encapsulates the platform-specific code into a platform library, rather than sprinkling through the business logic.
665-
1. Put all platform specific code in dedicated files and folders, like /platform, and reject any PR that attempts to put platform-specific code anywhere else. This maintains a strict separation between business logic and platform code.
654+
See details [here](contributingGuides/philosophies/CROSS-PLATFORM.md).
666655

667656
----
668657

android/app/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,8 @@ android {
114114
minSdkVersion rootProject.ext.minSdkVersion
115115
targetSdkVersion rootProject.ext.targetSdkVersion
116116
multiDexEnabled rootProject.ext.multiDexEnabled
117-
versionCode 1009019702
118-
versionName "9.1.97-2"
117+
versionCode 1009019703
118+
versionName "9.1.97-3"
119119
// Supported language variants must be declared here to avoid from being removed during the compilation.
120120
// This also helps us to not include unnecessary language variants in the APK.
121121
resConfigs "en", "es"

contributingGuides/PERFORMANCE.md

Lines changed: 284 additions & 34 deletions
Large diffs are not rendered by default.
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# Cross Platform Philosophy
2+
Learn how the app supports features across all our different platforms.
3+
4+
Currently supported platforms:
5+
- Web
6+
- Mobile Web
7+
- Desktop
8+
- iOS
9+
- Android
10+
11+
The goal is: **Cross Platform 99.9999%**
12+
13+
## Rules
14+
### - Features MUST be implemented on all supported platforms
15+
A feature isn't done until it works on all platforms. Any platform-specific code blocks will be asked to be undone.
16+
17+
### - React Native bugs MUST be fixed upstream
18+
If the reason cross-platform code cannot be written is because there is a bug in ReactNative that is preventing it from working, the correct action is to fix RN and submit a PR upstream -- not to hack around RN bugs with platform-specific code paths.
19+
20+
While upstream PRs are waiting to be merged, a patch can be used which is managed by the NPM package `patch-package`. Read more about it [here](https://github.com/Expensify/App?tab=readme-ov-file#adding-hybridapp-related-patches).
21+
22+
### - Features that don't exist on all platforms MUST use NOOP shims
23+
If there is a feature that simply doesn't exist on all platforms and thus doesn't exist in RN, rather than doing `if (platform=iOS) { }`, instead write a "shim" library that is implemented with NOOPs on the other platforms. For example, rather than injecting platform-specific multi-tab code (which can only work on browsers, because it's the only platform with multiple tabs), write a TabManager class that just is NOOP for non-browser platforms. This encapsulates the platform-specific code into a platform library, rather than sprinkling through the business logic.
24+
25+
### - Platform specific code MUST be placed in dedicated files and folders
26+
Put all platform specific code in dedicated files and folders (see below) and reject any PR that attempts to put platform-specific code anywhere else. This maintains a strict separation between business logic and platform code.
27+
28+
## Platform-Specific File Extensions
29+
In most cases, the code written for this repo should be platform-independent. In such cases, each module should have a single file, `index.js`, which defines the module's exports. There are, however, some cases in which a feature is intrinsically tied to the underlying platform. In such cases, the following file extensions can be used to export platform-specific code from a module:
30+
- Mobile => `index.native.js`
31+
- iOS Native App/Android Native App => `index.ios.js`/`index.android.js`
32+
- Web => `index.website.js`
33+
- Desktop => `index.desktop.js`
34+
35+
**Note:** `index.js` should be the default and only platform-specific implementations should be done in their respective files. i.e: If you have mobile-specific implementation in `index.native.js`, then the desktop/web implementation can be contained in a shared `index.js`.
36+
37+
`index.ios.js` and `index.android.js` are used when the app is running natively on respective platforms. These files are not used when users access the app through mobile browsers, but `index.website.js` is used instead. `index.native.js` are for both iOS and Android native apps. `index.native.js` should not be included in the same module as `index.ios.js` or `index.android.js`.
38+
39+
### Supporting Mobile Web
40+
The above platform-specific files only work because they are compiled when the app is built for the different platforms. This means that a different mechanism needs to be used for Mobile Web (since "mobile web" and "web" are the same at build time).
41+
42+
It is also well known that different mobile browsers have different quirks and need to use different workarounds at times.
43+
44+
#### - Mobile browser detection SHOULD never be used
45+
If there is absolutely no other way to fix a bug, then the proper way of detecting the browser is using `@libs/Browser`. Use this as an absolute last resort and have the exception approved by several (ie. more than one) internal engineers.

contributingGuides/philosophies/INDEX.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,6 @@ The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "S
55
"OPTIONAL" are to be interpreted as described in [RFC 2119](https://datatracker.ietf.org/doc/html/rfc2119).
66

77
## Contents
8+
* [Cross-Platform Philosophy](/contributingGuides/philosophies/CROSS-PLATFORM.md)
89
* [Offline Philosophy](/contributingGuides/philosophies/OFFLINE.md)
910
* [Routing Philosophy](/contributingGuides/philosophies/ROUTING.md)

cspell.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -306,6 +306,7 @@
306306
"Italiano",
307307
"ITSM",
308308
"Jakub",
309+
"jank",
309310
"janky",
310311
"jarsigner",
311312
"johndoe",
@@ -591,6 +592,7 @@
591592
"Smartscan",
592593
"soloader",
593594
"SONIFICATION",
595+
"Speedscope",
594596
"Spotnana",
595597
"spreadsheetml",
596598
"SSAE",
@@ -622,7 +624,9 @@
622624
"Svmy",
623625
"Swipeable",
624626
"symbolicate",
627+
"symbolicated",
625628
"Symbolicates",
629+
"symbolication",
626630
"systempreferences",
627631
"tabindex",
628632
"Talkspace",

ios/NewExpensify/Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
</dict>
4545
</array>
4646
<key>CFBundleVersion</key>
47-
<string>9.1.97.2</string>
47+
<string>9.1.97.3</string>
4848
<key>FullStory</key>
4949
<dict>
5050
<key>OrgId</key>

ios/NotificationServiceExtension/Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<key>CFBundleShortVersionString</key>
1414
<string>9.1.97</string>
1515
<key>CFBundleVersion</key>
16-
<string>9.1.97.2</string>
16+
<string>9.1.97.3</string>
1717
<key>NSExtension</key>
1818
<dict>
1919
<key>NSExtensionPointIdentifier</key>

ios/ShareViewController/Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<key>CFBundleShortVersionString</key>
1414
<string>9.1.97</string>
1515
<key>CFBundleVersion</key>
16-
<string>9.1.97.2</string>
16+
<string>9.1.97.3</string>
1717
<key>NSExtension</key>
1818
<dict>
1919
<key>NSExtensionAttributes</key>

0 commit comments

Comments
 (0)