You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[HOLD for payment 2022-11-18] [$250] Attachments - Preview is broken for Protected PDF file (iOS and Android) #12480
This is a regression from #11586 which replaced our own KeyboardAvoidingView with default react native KeyboardAvoidingView.
And react-native KeyboardAvoidingView isn't vertically stretched by default.
changed the title [-]Attachments - Preview is broken for Protected PDF file[/-][+]Attachments - Preview is broken for Protected PDF file (iOS and Android)[/+]on Nov 7, 2022
The bug is not a duplicate report of an existing GH
The bug is reproducible, following the reproduction steps: Reproduced on iOS
The GH template is filled out as fully as possible -- this means the GH body and title are clear
The GH was created by an Expensify employee or a QA tester.
If the bug is an OldDot issue, you should decide whether it is widespread enough to justify fixing or it is better to wait for reunification. If it’s better to wait, close the GH & provide this justification.
Decide if the GH should be resolved by an External contributor or Internal engineer: External!
📣 @0xmiroslav You have been assigned to this job by @thienlnam!
Please apply to this job in Upwork and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑💻
Keep in mind: Code of Conduct | Contributing 📖
changed the title [-][$250] Attachments - Preview is broken for Protected PDF file (iOS and Android)[/-][+][HOLD for payment 2022-11-18] [$250] Attachments - Preview is broken for Protected PDF file (iOS and Android)[/+]on Nov 11, 2022
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.2.26-0 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
Activity
melvin-bot commentedon Nov 4, 2022
Triggered auto assignment to @conorpendergrast (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.syedsaroshfarrukhdot commentedon Nov 5, 2022
Proposal
The issue is in PDFView
index.native.jsas we need to pass height and width toKeyboardAvoidingViewApp/src/components/PDFView/index.native.js
Lines 145 to 153 in 38b1d84
We need to pass styles
style={[styles.w100, styles.h100]}toKeyboardAvoidingViewAfter Fixing :-
0xmiroslav commentedon Nov 6, 2022
Proposal
This is a regression from #11586 which replaced our own KeyboardAvoidingView with default react native KeyboardAvoidingView.
And react-native KeyboardAvoidingView isn't vertically stretched by default.
Solution:
https://github.com/Expensify/App/blob/main/src/components/PDFView/index.native.js
<View style={containerStyles}> {this.state.shouldAttemptPdfLoad && ( <TouchableWithoutFeedback style={touchableStyles}> <PDF trustAllCerts={false} renderActivityIndicator={() => <FullScreenLoadingIndicator />} source={{uri: this.props.sourceURL}} style={pdfStyles} onError={this.initiatePasswordChallenge} password={this.state.password} onLoadComplete={this.finishPdfLoad} /> </TouchableWithoutFeedback> )} {this.state.shouldRequestPassword && ( - <KeyboardAvoidingView> + <KeyboardAvoidingView style={styles.flex1}> <PDFPasswordForm onSubmit={this.attemptPdfLoadWithPassword} onPasswordUpdated={() => this.setState({isPasswordInvalid: false})} isPasswordInvalid={this.state.isPasswordInvalid} shouldShowLoadingIndicator={this.state.shouldShowLoadingIndicator} /> </KeyboardAvoidingView> )} </View>NOTE:
We don't need to stretch horizontally (
styles.w100) because:When
isSmallScreenWidth= true,containerStyleshas it alreadyApp/src/components/PDFView/index.native.js
Lines 125 to 127 in 0724337
When
isSmallScreenWidth= false,styles.alignItemsCenteradded but in PDFPasswodForm containerStyle width manually set to 350App/src/components/PDFView/PDFPasswordForm.js
Lines 98 to 100 in 0724337
[-]Attachments - Preview is broken for Protected PDF file[/-][+]Attachments - Preview is broken for Protected PDF file (iOS and Android)[/+]conorpendergrast commentedon Nov 7, 2022
Testing file, password is
Password:Password Protected.pdf
melvin-bot commentedon Nov 7, 2022
Current assignee @conorpendergrast is eligible for the External assigner, not assigning anyone new.
melvin-bot commentedon Nov 7, 2022
Triggered auto assignment to Contributor-plus team member for initial proposal review - @parasharrajat (
External)19 remaining items
melvin-bot commentedon Nov 8, 2022
📣 @0xmiroslav You have been assigned to this job by @thienlnam!
Please apply to this job in Upwork and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑💻
Keep in mind: Code of Conduct | Contributing 📖
conorpendergrast commentedon Nov 10, 2022
The job:
Ok, I'm following this process to hire via Upwork. I'm hiring:
[-][$250] Attachments - Preview is broken for Protected PDF file (iOS and Android)[/-][+][HOLD for payment 2022-11-18] [$250] Attachments - Preview is broken for Protected PDF file (iOS and Android)[/+]melvin-bot commentedon Nov 11, 2022
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.2.26-0 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
If no regressions arise, payment will be issued on 2022-11-18. 🎊
mvtglobally commentedon Nov 16, 2022
Issue not reproducible during KI retests. (First week)
tgolen commentedon Nov 16, 2022
Hi all, due to the work I did in #11586, which probably forced a regression in this area, please don't hold any regressions against the contributor.
JmillsExpensify commentedon Nov 16, 2022
Ok great, thanks for the heads up! Noted, though we'll still wait for the regression period to pass.
conorpendergrast commentedon Nov 17, 2022
Thanks Tim! Note to myself: Two days until we pay out :👍
conorpendergrast commentedon Nov 21, 2022
It is time, so I shall pay using this SO: How do I pay an external contributor via Upwork?
I am paying these two people: #12480 (comment)
Assignment date: 2022-11-09 #12480 (comment)
Merge date: 2022-11-09 #12547 (comment)
That fits: Merged PR within 3 business days - 50% bonus
So that makes base of $250 each plus 50% bonus of $125 = $375.
Pay $375 and end contract on:
And finally:
All done!