-
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
fix Password-protected PDF not handled correctly #42572
Conversation
I encountered an issue in native, still investigate it. |
@dukenv0307 Please 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] |
@Julesssss Can you help confirm the expected behavior when we add protected pdf as receipt during the expense submission process (FAB > Submit expense > add amount > choose workspace)? I think the behavior in this PR looks good. cc @dukenv0307 WDYT?
Screen.Recording.2024-05-30.at.03.21.05.mov
output.mp4 |
@tienifr IMO, 2 places should be consistent, the behavior in this PR looks good. Pls apply the same for expense submission. cc @Julesssss |
I do agree, but let's leave this decision to the design team. |
I commented here on the issue, let's go with the choice that the design team make 👍 |
@tienifr any updates? Did you test with the corrupted pdf? Seem like we need the extra lib |
I think the corrupted pdf file will be handled in #40607, so we do not need to implement it in this PR |
@tienifr Can you raise your issue about checking the protected pdf on Slack? We need to find the best way (without using new lib), if not we can consider using your solution. cc @Julesssss |
@dukenv0307 I am trying to investigate another solution today. If cannot, I will raise on slack. |
Oh, I thought we were already doing this? As shown in the capture videos here |
🧪🧪 Use the links below to test this adhoc build on Android, iOS, Desktop, and Web. Happy testing! 🧪🧪
|
@tienifr Lint has failed. Can you update the steps to test on web/mweb/desktop only. |
@tienifr bump |
@tienifr Can we use async await for |
@dukenv0307 It can lead to a lint error, indicating that we should not use async/await syntax. |
I think we can disable |
@Julesssss Can you help check the question above^? Thanks |
Ah, no. We only allow it in GH actions and tests. If we can't think of any alternatives we'll have to stick with the promise 😞 |
reader.onload = (event) => { | ||
const arrayBuffer = event.target?.result; | ||
if (!arrayBuffer) { | ||
resolve(false); |
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.
resolve(false); | |
resolve(false); | |
return; |
then remove the else block
}, | ||
(error) => { | ||
if (error.name === 'PasswordException') { | ||
resolve(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.
same as above
It works well, just have some minor comments above^ |
@dukenv0307 I fixed all your comments. |
Thank you @tienifr. 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 staging by https://github.com/Julesssss in version: 1.4.86-0 🚀
|
1 similar comment
🚀 Deployed to staging by https://github.com/Julesssss in version: 1.4.86-0 🚀
|
🚀 Deployed to staging by https://github.com/Julesssss in version: 1.4.86-0 🚀
|
🚀 Deployed to production by https://github.com/AndrewGable in version: 9.0.0-9 🚀
|
Details
Fixed Issues
$ #42078
PROPOSAL: #42078 (comment)
Tests
Web/Desktop
Offline tests
QA Steps
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodSTYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label and/or tagged@Expensify/design
so the design team can review the changes.ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Android: Native
output.mp4
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
output.mp4
MacOS: Desktop