Skip to content

Commit a76e4a5

Browse files
committed
Merge branch 'main' of github.com:Expensify/App into beaman-migrateToChildManagerAccountID
2 parents a1ef3e5 + a2a521d commit a76e4a5

File tree

132 files changed

+2221
-1183
lines changed

Some content is hidden

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

132 files changed

+2221
-1183
lines changed

.github/PULL_REQUEST_TEMPLATE.md

+1
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ This is a checklist for PR authors. Please make sure to complete all tasks and c
100100
- [ ] The file is named correctly
101101
- [ ] The component has a clear name that is non-ambiguous and the purpose of the component can be inferred from the name alone
102102
- [ ] The only data being stored in the state is data necessary for rendering and nothing else
103+
- [ ] If we are not using the full Onyx data that we loaded, I've added the proper selector in order to ensure the component only re-renders when the data it is using changes
103104
- [ ] For Class Components, any internal methods passed to components event handlers are bound to `this` properly so there are no scoping issues (i.e. for `onClick={this.submit}` the method `this.submit` should be bound to `this` in the constructor)
104105
- [ ] Any internal methods bound to `this` are necessary to be bound (i.e. avoid `this.submit = this.submit.bind(this);` if `this.submit` is never passed to a component event handler like `onClick`)
105106
- [ ] All JSX used for rendering exists in the render method

android/app/build.gradle

+2-2
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,8 @@ android {
106106
minSdkVersion rootProject.ext.minSdkVersion
107107
targetSdkVersion rootProject.ext.targetSdkVersion
108108
multiDexEnabled rootProject.ext.multiDexEnabled
109-
versionCode 1001033603
110-
versionName "1.3.36-3"
109+
versionCode 1001033702
110+
versionName "1.3.37-2"
111111
}
112112

113113
splits {

contributingGuides/CONTRIBUTING.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,11 @@ You can create as many accounts as needed in order to test your changes directly
1616
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.
1717

1818
##### High Traffic Accounts
19-
All internal engineers, contributors, and C+ members are **required** to test with a "high traffic" account against the staging or production web servers. Ask in [#expensify-open-source](https://expensify.slack.com/archives/C01GTK53T8Q) if someone can turn your account into a High Traffic account. These accounts more closely mirror the accounts used in production by real people. Internal team members can follow [this Stack Overflow](https://stackoverflow.com/c/expensify/questions/14504) to upgrade an account.
19+
20+
All internal engineers, contributors, and C+ members are required to test with a “high traffic” account against the staging or production web servers. Use these Google forms to manage your high-traffic accounts. You'll need to authenticate via Google first.
21+
1. [Make an account high-traffic](https://docs.google.com/forms/d/e/1FAIpQLScpiS0Mo-HA5xHPsvDow79yTsMBgF0wjuqc0K37lTK5fheB8Q/viewform)
22+
2. [Remove a high-traffic account](https://docs.google.com/forms/d/e/1FAIpQLSd9_FDav83pnhhtu1KGAKIpf2yttQ_0Bvq1b9nuFM1-wbL11Q/viewform)
23+
2024

2125
#### Working on beta features
2226
Some features are locked behind beta flags while development is ongoing. As a contributor you can work on these beta features locally by overriding the [`Permissions.canUseAllBetas` function](https://github.com/Expensify/App/blob/5e268df7f2989ed04bc64c0c86ed77faf134554d/src/libs/Permissions.js#L10-L12) to return `true`.

contributingGuides/NAVIGATION.md

+114
Original file line numberDiff line numberDiff line change
@@ -70,3 +70,117 @@ Using [react-freeze](https://github.com/software-mansion/react-freeze) allows us
7070

7171
- To keep the navigation state that was present before changing the layout, we save the state on every change and use it for the `initialState` prop.
7272
Changing the layout means that every component inside `NavigationContainer` is mounted anew.
73+
74+
## Why we need to use minimal action in the `linkTo` function
75+
76+
### The problem
77+
Let's assume that the user wants to navigate like this:
78+
79+
```
80+
1. Settings_root - navigate > Profile
81+
2. Profile - UP > Settings_root
82+
3. Settings_root - navigate > About
83+
4. About - browser back button > Settings_root
84+
```
85+
86+
Without minimal action, expected behavior won't be achieved and the final screen will be `Profile`.
87+
88+
Broken behavior is the outcome of two things:
89+
1. Back button in the browser resets the navigation state with the state saved in step two.
90+
91+
2. `Navigation.navigate` creates action with `getActionFromState` dispatched at the top level of the navigation hierarchy.
92+
93+
The reason why `getActionFromState` provided by `react-navigation` is dispatched at the top level of the navigation hierarchy is that it doesn't know about current navigation state, only about desired one.
94+
95+
In this example it doesn't know if the `RightModalNavigator` and `Settings` are already mounted.
96+
97+
98+
The action for the first step looks like that:
99+
```json
100+
{
101+
"type": "NAVIGATE",
102+
"payload": {
103+
"name": "RightModalNavigator",
104+
"params": {
105+
"initial": true,
106+
"screen": "Settings",
107+
"params": {
108+
"initial": true,
109+
"screen": "Profile",
110+
}
111+
}
112+
}
113+
}
114+
```
115+
116+
117+
That means, the params for the `RightModalNavigator` and `Settings` (also a navigator) will be filled with the information that we want to have the `Profile` screen in the state.
118+
119+
```json
120+
{
121+
"index": 2,
122+
"routes": [
123+
{ "name": "Home", },
124+
{
125+
"name": "RightModalNavigator",
126+
// here you can see that the params are filled with the information about structure that should be in the state.
127+
"params": {
128+
"initial": true,
129+
"screen": "Settings",
130+
"params": {
131+
"initial": true,
132+
"screen": "Settings_Profile",
133+
"path": "/settings/profile"
134+
}
135+
},
136+
"state": {
137+
"index": 0,
138+
"routes": [
139+
{
140+
"name": "Settings",
141+
// Same here
142+
"params": {
143+
"initial": true,
144+
"screen": "Settings_Profile",
145+
"path": "/settings/profile"
146+
},
147+
"state": {
148+
"index": 0,
149+
"routes": [
150+
{
151+
"name": "Settings_Profile"
152+
}
153+
]
154+
}
155+
}
156+
]
157+
}
158+
}
159+
]
160+
}
161+
```
162+
163+
This information will stay here even if we pop the `Profile` screen and navigate to `About` screen.
164+
165+
Later on, when the user presses the browser back button expecting that the `Settings_root` screen will appear, the navigation state will be reset with information about the `Profile` screen in the params and this will be used as a source of truth for the navigation.
166+
167+
### The solution
168+
169+
If we can create simple action that will only push one screen to the existing navigator, we won't fill any params of the navigators.
170+
171+
The `getMinimalAction` compares action generated by the `getActionFromState` with the current navigation state and tries to find the smallest action possible.
172+
173+
The action for the first step created with `getMinimalAction` looks like this:
174+
175+
```json
176+
{
177+
"type": "NAVIGATE",
178+
"payload": {
179+
"name": "Settings_Profile"
180+
},
181+
"target": "Settings-stack-key-xyz"
182+
}
183+
```
184+
185+
### Deeplinking
186+
There is no minimal action for deeplinking directly to the `Profile` screen. But because the `Settings_root` is not on the stack, pressing UP will reset the params for navigators to the correct ones.

docs/_data/_routes.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ home:
55

66
# Hubs are comprised of sections and articles. Sections contain multiple related articles, but there can be standalone articles as well
77
hubs:
8-
- href: send-money
9-
title: Send money
10-
description: With only a couple of clicks, send money to your friends or coworkers.
8+
- href: split-bills
9+
title: Split bills
10+
description: With only a couple of clicks, split bills with your friends or coworkers.
1111
icon: /assets/images/paper-airplane.svg
1212

1313
- href: request-money

docs/articles/request-money/Request-and-Send-Money.md

-53
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
---
2+
title: Request Money and Split Bills with Friends
3+
description: Everything you need to know about Requesting Money and Splitting Bills with Friends!
4+
---
5+
6+
<!-- The lines above are required by Jekyll to process the .md file -->
7+
8+
# How do these Payment Features work?
9+
Our suite of money movement features enables you to request money owed by an individual or split a bill with a group.
10+
11+
**Request Money** lets your friends pay you back directly in Expensify. When you send a payment request to a friend, Expensify will display the amount owed and the option to pay the corresponding request in a chat between you.
12+
13+
**Split Bill** allows you to split payments between friends and ensures the person who settled the tab gets paid back.
14+
15+
These two features ensure you can live in the moment and settle up afterward.
16+
17+
# How to Request Money
18+
- Select the Green **+** button and choose **Request Money**
19+
- Enter the amount **$** they owe and click **Next**
20+
- Search for the user or enter their email!
21+
- Enter a reason for the request (optional)
22+
- Click **Request!**
23+
- If you change your mind, all you have to do is click **Cancel**
24+
- The user will be able to **Settle up outside of Expensify** or pay you via **Venmo** or **PayPal.me**
25+
26+
# How to Split a Bill
27+
- Select the Green **+** button and choose **Split Bill**
28+
- Enter the total amount for the bill and click **Next**
29+
- Search for users or enter their emails and **Select**
30+
- Enter a reason for the split
31+
- The split is then shared equally between the attendees
32+
33+
# FAQs
34+
## Can I request money from more than one person at a time?
35+
If you need to request money for more than one person at a time, you’ll want to use the Split Bill feature. The Request Money option is for one-to-one payments between two people.

docs/articles/send-money/paying-friends/Request-and-Send-Money.md

-53
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
---
2+
title: Request Money and Split Bills with Friends
3+
description: Everything you need to know about Requesting Money and Splitting Bills with Friends!
4+
---
5+
6+
<!-- The lines above are required by Jekyll to process the .md file -->
7+
8+
# How do these Payment Features work?
9+
Our suite of money movement features enables you to request money owed by an individual or split a bill with a group.
10+
11+
**Request Money** lets your friends pay you back directly in Expensify. When you send a payment request to a friend, Expensify will display the amount owed and the option to pay the corresponding request in a chat between you.
12+
13+
**Split Bill** allows you to split payments between friends and ensures the person who settled the tab gets paid back.
14+
15+
These two features ensure you can live in the moment and settle up afterward.
16+
17+
# How to Request Money
18+
- Select the Green **+** button and choose **Request Money**
19+
- Enter the amount **$** they owe and click **Next**
20+
- Search for the user or enter their email!
21+
- Enter a reason for the request (optional)
22+
- Click **Request!**
23+
- If you change your mind, all you have to do is click **Cancel**
24+
- The user will be able to **Settle up outside of Expensify** or pay you via **Venmo** or **PayPal.me**
25+
26+
# How to Split a Bill
27+
- Select the Green **+** button and choose **Split Bill**
28+
- Enter the total amount for the bill and click **Next**
29+
- Search for users or enter their emails and **Select**
30+
- Enter a reason for the split
31+
- The split is then shared equally between the attendees
32+
33+
# FAQs
34+
## Can I request money from more than one person at a time?
35+
If you need to request money for more than one person at a time, you’ll want to use the Split Bill feature. The Request Money option is for one-to-one payments between two people.
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
layout: default
3-
title: Send money
3+
title: Split bills
44
---
55

66
{% include hub.html %}

docs/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ <h2>
1111
</h2>
1212

1313
<div class="cards-group">
14-
{% include hub-card.html href="send-money" %}
14+
{% include hub-card.html href="split-bills" %}
1515
{% include hub-card.html href="request-money" %}
1616
{% include hub-card.html href="playbooks" %}
1717
{% include hub-card.html href="other" %}

ios/NewExpensify.xcodeproj/project.pbxproj

-2
Original file line numberDiff line numberDiff line change
@@ -652,7 +652,6 @@
652652
CURRENT_PROJECT_VERSION = 3;
653653
DEVELOPMENT_TEAM = 368M544MTT;
654654
ENABLE_BITCODE = NO;
655-
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = arm64;
656655
INFOPLIST_FILE = "$(SRCROOT)/NewExpensify/Info.plist";
657656
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
658657
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
@@ -683,7 +682,6 @@
683682
CODE_SIGN_STYLE = Manual;
684683
CURRENT_PROJECT_VERSION = 3;
685684
DEVELOPMENT_TEAM = 368M544MTT;
686-
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = arm64;
687685
INFOPLIST_FILE = NewExpensify/Info.plist;
688686
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
689687
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";

ios/NewExpensify/Info.plist

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
<key>CFBundlePackageType</key>
2020
<string>APPL</string>
2121
<key>CFBundleShortVersionString</key>
22-
<string>1.3.36</string>
22+
<string>1.3.37</string>
2323
<key>CFBundleSignature</key>
2424
<string>????</string>
2525
<key>CFBundleURLTypes</key>
@@ -32,7 +32,7 @@
3232
</dict>
3333
</array>
3434
<key>CFBundleVersion</key>
35-
<string>1.3.36.3</string>
35+
<string>1.3.37.2</string>
3636
<key>ITSAppUsesNonExemptEncryption</key>
3737
<false/>
3838
<key>LSApplicationQueriesSchemes</key>

0 commit comments

Comments
 (0)