-
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
feat: add image loading placeholder #7723
feat: add image loading placeholder #7723
Conversation
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.
Bump for lint error, thank you for fixing it. Gonna wait for Rushat for when he gets time to have a look.
|
||
this.state = { | ||
loading: true, | ||
} |
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.
@mdneyazahmad Thank you for the PR! Got one styling mistake here.
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.
Fixed the linting error
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.
Thanks for the bump Vit :)
@mdneyazahmad there's a regression - loading indicator isn't show when image is being uploaded. Screencast.from.14-02-22.09-57-05.AM.+03.mp4 |
@rushatgabhane could you retest? It seems to work as expected. test2.mp4 |
Also after this pr, dimension jumping issue is even more highlighted. That does not look good. |
@mdneyazahmad hmm i can still repro it after hard refresh, and in incognito mode. Can you try disabling your cache from chrome dev tools -> network tab -> disable cache |
@rushatgabhane I did the same it still works. |
Could you please do |
@mdneyazahmad nope that didn't help. @mountiny could you please help us verify this whenever you can, thanks! |
Sorry for the delay, I will be able to have a look into this later today or tomorrow the latest. |
@mdneyazahmad Hmm, weird, I am getting the same problem as Rushat 😬 |
I tested in (Chrome/Firefox/Safari), it works on all these browser.
Here is the issue with this feature. #7463 I am not sure why. Could you please try with merging main (if not). If still does not work, I will have to find the root cause for it. |
@mdneyazahmad Tested again with merged main in Chrome and the same result. This time the blank placeholder disappeared, then the spinner showed up and then the picture showed up. Lots of jumping, not a great experience. I am not sure what is going on there. Also I got confused with the linked issue since it looks almost the same. If I understand the difference, this PR should focus on spinner for the image being loaded in chat if not cached, the other one for when it is uploaded. Either way it seems like it is not working as expected right now, but I am not sure how to help with debugging now, odd you cant reproduce the problem since it happens everytime for me. |
I am using local set up which might influence the way/speed the upload is happening but I think Rushat is using the same setup as you do. |
Yep, I'm using local setup and it happens everytime. |
@mdneyazahmad Any progress on this one? Have you been able to replicate it? |
Hello guys, Sorry I saw this issue recently and no one mentioned me too. I wish you to mention me in here. First of all, jumping problem is looks bad. But it is already at there before my PR. So there is no relation with the code I sent in PR. It is a different issue. As for the problem some of you are having here, it stands before your eyes :) It's just about @mdneyazahmad uploads by clicking add attachment button, @rushatgabhane and @mountiny upload by dragging. I fixed this and sent to related branch. Please try to reproduce it with drag&drop before getting branch to confirm me. After I fixed it: Screen.Recording.2022-02-22.at.13.54.19.movThank you |
Thanks @okansahin for figuring it out. I was able to reproduce it with drag and drop. |
super(props); | ||
|
||
this.state = { | ||
loading: true, |
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.
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.
@rushatgabhane done
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.
@mdneyazahmad for the jumping issue.
We could reduce the number of jumps from 2 to 1, if we use the same thumbnail styles as the upload preview thumbnail.
What do you think? Can we do any better?
Screencast.from.22-02-22.04-38-40.PM.+03.mp4
@rushatgabhane how many jumps are there without this PR? If there is just one and this PR changes it to 2, then we should fix it here. But if there already were 2 jumps before this PR, we should keep that in a separate job just to be atomic with the issues. Feel free to report the issue/bug! |
@okansahin Aaand thank you very much for this of course! Really appreciate your help 🙇 |
There are 2 jumps without this PR.
Sure! That makes sense, thanks for jumping in :) |
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.
@mountiny LGTM! 🎉 Tests well on all platforms.
Kudos to @okansahin for connecting the dots 🙌
I've commented on #7463 to get the upload preview fixed
Thanks to you too, all. 🙌 |
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.
Nice! Thank you @mdneyazahmad for the patience and work on this PR. thanks to @okansahin for help as well and great job @rushatgabhane testing and reviewing it!
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
This PR was confirmed to cause a regression, and has been reverted. |
🚀 Deployed to production by @yuwenmemon in version: 1.1.40-2 🚀
|
Issue 1 - Title- [Medium]: Chrome+ Jaws : Screen reader : Name & Role is not defined for 'Actions (+)' control. 7723_NAme.role.is.not.defined.for.Action.+.control.mp4Issue 2 - Title- [Medium]: Chrome+ Jaws : Keyboard : 'Actions (+)' control is not accessible using screen reader. 7723_Actions.+.control.is.not.accessible.using.screen.reader.mp4Issue 3 - Title- [Medium]: Chrome+ Jaws : Screen reader: Role is not defined for 'Send' control. 7723_Role.is.not.defined.for.Send.control.mp4Issue 4 - Title- [Medium]: Chrome+ Jaws : Screen reader: Status message is not being announced by screen reader after activate the 'Send' control. 7723_SCreen.reader.is.not.provide.the.information.after.sent.the.attachement.mp4 |
Details
Add a loading indicator while loading an image.
Fixed Issues
$ #7584
Tests
QA Steps
Tested On
Screenshots
Web
Mobile Web
Desktop
iOS
Android