-
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
[PDFView] no separate text for loading page #14728
[PDFView] no separate text for loading page #14728
Conversation
Signed-off-by: Prince Mendiratta <prince.mendi@gmail.com>
@danieldoglas @aimane-chnaif One of you needs to copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
@Prince-Mendiratta thanks for well written test step. |
@aimane-chnaif Thank you! Good catch, I missed out on that. I have updated the description to account for that case. |
@aimane-chnaif can you please run the checklist? |
@Prince-Mendiratta I noticed white pages on mSafari while testing with pdf you shared. msafari.mp4Also, when close modal quickly before fully loaded, I see console lots of console warnings per each page: Since these also happen on production, I think these are out of scope for this GH and should be handled as separate issues. |
yes, working on it right now |
Reviewer Checklist
Screenshots/VideosWebweb.movMobile Web - Chromemchrome.movMobile Web - Safarimsafari.mp4Desktopdesktop.moviOSios.mp4Androidandroid.mov |
@aimane-chnaif agreed, can you please report that? |
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. |
Weirdly enough, I do not face this issue on the simulator. I'm using iPhone 13 - iOS 15.0
@aimane-chnaif Yeah, I noticed that too, have been working on the RCA since. |
Performance Comparison Report 📊Significant Changes To DurationThere are no entries Meaningless Changes To DurationShow entries
Show details
|
🚀 Deployed to staging by https://github.com/danieldoglas in version: 1.2.64-0 🚀
|
@@ -148,6 +148,7 @@ class PDFView extends Component { | |||
width={pageWidth} | |||
key={`page_${index + 1}`} | |||
pageNumber={index + 1} | |||
loading="" |
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.
Can we add some explanation here or something please? If I saw this here there is nothing that tells me passing the empty string is intentional.
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.
@marcaaron Sure, I'll add a brief explanation and link to the issue. Should I create a PR for this?
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.
It would be nice but no pressure on you @Prince-Mendiratta. We merged it without this suggestion so the comment is for @aimane-chnaif and @danieldoglas. I really think the root cause of the issue in something to do with the PDF library. If we implement a workaround the least we can do is document with a code comment why it exists.
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.
No worries, I'll send in a PR today with the additions!
Yes, makes sense. Finding empty strings passed to a prop should warrant a explanation.
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.
@marcaaron Good catch and suggestion. We should make sure to add comment on these kinds of fixes. It was my fault not to ask @Prince-Mendiratta add comment.
@Prince-Mendiratta Thanks in advance for your PR
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.
PR is up!
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 !
🚀 Deployed to production by https://github.com/thienlnam in version: 1.2.64-7 🚀
|
🚀 Deployed to production by https://github.com/thienlnam in version: 1.2.64-7 🚀
|
1 similar comment
🚀 Deployed to production by https://github.com/thienlnam in version: 1.2.64-7 🚀
|
[NO QA] explanation for changes in #14728
Signed-off-by: Prince Mendiratta prince.mendi@gmail.com
Details
When the size in terms of number of pages in a PDF increases, the PDFView component on all platforms (except native) shows a series of overlapping
Loading Page...
messages. It is not a required or good looking disclaimer.Fixed Issues
$ #14358
#14358 (comment)
Tests
Note: The only factor affecting the number of
Loading Page...
messages is the number of pages in a PDF. So, to test thoroughly, a number of different PDFs can be used with different number of pages. You can use this PDF (having around 350 pages) for testing.Add Attachment
.Offline tests
The issue doesn't affect the offline status. The expected behaviour however, is that if the device is offline and an attachment is clicked in the chat, the preview will show that
Failed to load PDF file.
If a new attachment is attached, the PDF Preview is still shown and it should work as expected. Clicking on the send button should show a greyed out
Uploading Attachment...
in the chat. Turning the internet connection on should upload the PDF file. Verify that the PDF preview works as expected once the PDF is uploaded.QA Steps
Same as Testing steps.
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)src/languages/*
files and using the translation methodWaiting for Copy
label for a copy review on the original GH to get the correct copy.STYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)/** comment above it */
this
properly so there are no scoping issues (i.e. foronClick={this.submit}
the methodthis.submit
should be bound tothis
in the constructor)this
are necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);
ifthis.submit
is never passed to a component event handler likeonClick
)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)ScrollView
component to make it scrollable when more elements are added to the page.Screenshots/Videos
Web
web.mp4
Mobile Web - Chrome
mWeb-Chrome.mp4
Mobile Web - Safari
mWeb-safari.mp4
Desktop
desktop.mp4
iOS
iOS.mp4
Android
Android.mp4