You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: .github/PULL_REQUEST_TEMPLATE.md
+1
Original file line number
Diff line number
Diff line change
@@ -100,6 +100,7 @@ This is a checklist for PR authors. Please make sure to complete all tasks and c
100
100
-[ ] The file is named correctly
101
101
-[ ] The component has a clear name that is non-ambiguous and the purpose of the component can be inferred from the name alone
102
102
-[ ] 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
103
104
-[ ] 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)
104
105
-[ ] 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`)
105
106
-[ ] All JSX used for rendering exists in the render method
Copy file name to clipboardexpand all lines: contributingGuides/CONTRIBUTING.md
+5-1
Original file line number
Diff line number
Diff line change
@@ -16,7 +16,11 @@ You can create as many accounts as needed in order to test your changes directly
16
16
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.
17
17
18
18
##### 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
+
20
24
21
25
#### Working on beta features
22
26
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`.
Copy file name to clipboardexpand all lines: contributingGuides/NAVIGATION.md
+114
Original file line number
Diff line number
Diff line change
@@ -70,3 +70,117 @@ Using [react-freeze](https://github.com/software-mansion/react-freeze) allows us
70
70
71
71
- 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.
72
72
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.
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.
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.
0 commit comments