-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
fixed offline messages are grayed out even if online #2526
fixed offline messages are grayed out even if online #2526
Conversation
I also see that we are attaching a listener for let me know, If i can push these changes as well. |
With stuff like this I think if you can time/benchmark and prove there is a perceptible difference then we should do it. But otherwise we could be making unnecessary optimizations. |
Updated. Thanks. |
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.
See additional comment thanks :)
TIL: You can toggle online/offline in the browser debugger. |
Updated. Thanks. |
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.
Looks better just one more comment about the original implementation here.
// reportActionID is only present when the action is saved onto server. | ||
const isUnsent = action.loading && !action.reportActionID; | ||
const isUnsent = network.isOffline && action.loading && !action.reportActionID; |
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'm not sure we need to check both action.loading
and action.reportActionID
? What does having a reportActionID
even mean?
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.
Or asked another way are there comments that are "loading" and "have a reportActionID"...? it's unclear how we end up in that situation to me.
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 used this to make a difference from the attachment files. As they are also in loading status until they are uploaded. action.reportActionID
is only present when comment is uploaded to backend.
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.
Yeah, it makes sense. we don't actually need it.
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.
they are also in loading status until they are uploaded
Ok, yeah I believe there's no difference there. It should be the same whether attachment or not.
@marcaaron Updated. Thanks. Sorry for the back and forth. |
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.
LGTM!
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
🚀 Deployed to production in version: 1.0.39-5🚀
|
Please review @marcaaron
Details
Working on the change request here #2432 (comment)
Fixed Issues
Fixes #2432Tests / ### QA Steps
You appear to be Offline
under the composer.Tested On
Screenshots
video.mp4