-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add some docs for pattern B #10321
Add some docs for pattern B #10321
Conversation
contributingGuides/OFFLINE_UX.md
Outdated
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) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't it 0.5 opacity (50%)? 🤔 CC: @shawnborton
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup, should be .5!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I could've sworn I had it as 0.5 and then changed it to 0.6, but no, I was misremembering
contributingGuides/OFFLINE_UX.md
Outdated
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah yes
**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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NAB: reads better with the bullet above if you switch this sub-bullet around to:
- removes the data altogether, if the pendingAction was
delete
Updated |
Co-authored-by: Puneet Lath <puneet@expensify.com>
Updated with the suggestion, please re-review. |
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
Details
Fixed Issues
$https://github.com/Expensify/Expensify/issues/221828
No test, no QA, only documentation