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
-1Lines changed: 0 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -86,7 +86,6 @@ This is a checklist for PR authors. Please make sure to complete all tasks and c
86
86
-[ ] iOS: mWeb Safari
87
87
-[ ] MacOS: Chrome / Safari
88
88
-[ ] I verified there are no console errors (if there's a console error not related to the PR, report it or open an issue for it to be fixed)
89
-
-[ ] I verified there are no new alerts related to the `canBeMissing` param for `useOnyx`
90
89
-[ ] I followed proper code patterns (see [Reviewing the code](https://github.com/Expensify/App/blob/main/contributingGuides/PR_REVIEW_GUIDELINES.md#reviewing-the-code))
91
90
-[ ] I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. `toggleReport` and not `onIconClick`)
92
91
-[ ] I verified that comments were added to code that is not self explanatory
Copy file name to clipboardExpand all lines: contributingGuides/REVIEWER_CHECKLIST.md
-1Lines changed: 0 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,7 +17,6 @@
17
17
-[ ] iOS: mWeb Safari
18
18
-[ ] MacOS: Chrome / Safari
19
19
-[ ] If there are any errors in the console that are unrelated to this PR, I either fixed them (preferred) or linked to where I reported them in Slack
20
-
-[ ] I verified there are no new alerts related to the `canBeMissing` param for `useOnyx`
21
20
-[ ] I verified proper code patterns were followed (see [Reviewing the code](https://github.com/Expensify/App/blob/main/contributingGuides/PR_REVIEW_GUIDELINES.md#reviewing-the-code))
22
21
-[ ] I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. `toggleReport` and not `onIconClick`).
23
22
-[ ] I verified that comments were added to code that is not self explanatory
- Document any special cases or performance considerations
128
127
- Include type annotations for better developer experience
129
-
130
-
## canBeMissing Parameter
131
-
132
-
The `canBeMissing` parameter indicates whether a component connecting to Onyx expects the data to be present or if it can handle missing data gracefully.
133
-
134
-
### - Components MUST use the `canBeMissing` parameter appropriately
135
-
This parameter was added because in some places we are assuming some data will be there, but actually we never load it, which leads to hard to debug bugs.
136
-
137
-
The linter error exists until we add the param to all callers. Once that happens we can make the param mandatory and remove the linter.
138
-
139
-
### - `canBeMissing` SHOULD be set to `false` when data is guaranteed to be present
140
-
The main criteria for setting `canBeMissing` to `false`:
141
-
142
-
-**Data is always loaded before component renders**: If the data is always ensured to be loaded before this component renders, then `canBeMissing` SHOULD be set to `false`
143
-
-**Always returned by OpenApp**: Any data that is always returned by `OpenApp` used in a component where we have a user (so not in the homepage for example) will have `canBeMissing` set to `false`
144
-
-**User always has data**: Maybe we always try to load a piece of data, but the data can be missing/empty, in this case `canBeMissing` would be set to `false`
145
-
146
-
### - `canBeMissing` SHOULD be set to `true` for potentially missing data
147
-
If neither of the above conditions apply, then the param SHOULD probably be `true`, but additionally we MUST make sure that the code using the data manages correctly the fact that the data might be missing.
0 commit comments