fix Password-protected PDF not handled correctly#42572
fix Password-protected PDF not handled correctly#42572Julesssss merged 25 commits intoExpensify:mainfrom
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.
| resolve(false); | |
| resolve(false); | |
| return; |
then remove the else block
| }, | ||
| (error) => { | ||
| if (error.name === 'PasswordException') { | ||
| resolve(true); |
|
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 Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
output.mp4
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
output.mp4
MacOS: Desktop