Add some docs for pattern B#10321
Merged
Merged
Conversation
trjExpensify
reviewed
Aug 9, 2022
| This pattern queues the API request, but also makes sure that the user is aware that the request hasn’t been sent yet **when the user is offline**. | ||
| When the user is online, the feature should just look like it succeeds immediately (we don't want the offline UI to flicker on and off when the user is online). | ||
| When the user is offline: | ||
| - Things pending to be created or updated will be shown greyed out (0.6 opacity) |
Contributor
Author
There was a problem hiding this comment.
I could've sworn I had it as 0.5 and then changed it to 0.6, but no, I was misremembering
| When the user is online, the feature should just look like it succeeds immediately (we don't want the offline UI to flicker on and off when the user is online). | ||
| When the user is offline: | ||
| - Things pending to be created or updated will be shown greyed out (0.6 opacity) | ||
| - Things pending to be deleted will have strikethrough |
Contributor
There was a problem hiding this comment.
Might be better for the avoidance of doubt to update this one to note that it's also greyed out: "Things pending to be deleted will be greyed out and will have strikethrough"
| **Handling errors:** | ||
| - The OfflineWithFeedback component already handles showing errors too, as long as you pass the error field in the errors prop | ||
| - When dismissing the error, the onClose prop will be called, there we need to call an action that either: | ||
| - If the pendingAction was `delete`, it removes the data altogether |
Contributor
There was a problem hiding this comment.
NAB: reads better with the bullet above if you switch this sub-bullet around to:
- removes the data altogether, if the pendingAction was
delete
Contributor
Author
|
Updated |
trjExpensify
previously approved these changes
Aug 9, 2022
puneetlath
requested changes
Aug 9, 2022
Co-authored-by: Puneet Lath <puneet@expensify.com>
Contributor
Author
|
Updated with the suggestion, please re-review. |
twisterdotcom
approved these changes
Aug 12, 2022
puneetlath
approved these changes
Aug 12, 2022
Contributor
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
48 tasks
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Details
Fixed Issues
$https://github.com/Expensify/Expensify/issues/221828
No test, no QA, only documentation