-
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 17237] Updated usages of source. #19107
[FIX 17237] Updated usages of source. #19107
Conversation
CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅ |
I have read the CLA Document and I hereby sign the CLA |
src/components/AttachmentModal.js
Outdated
onToggleKeyboard={this.updateConfirmButtonVisibility} | ||
/> | ||
) : ( | ||
Boolean(this.state.source) && | ||
this.state.shouldLoadAttachment && ( | ||
Boolean(source) && this.state.shouldLoadAttachment && ( |
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.
why this is needed 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.
It's not needed, I was thinking to update the usage to source there and let this.state.shouldLoadAttachment be managed for uploading files. I may revert it back if you say so, maybe it's unnecessary. Let me know
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.
Update: as we are using source={source}
3 lines below in the AttachmentView
which shows only if the previous conditions are true, I think it's ok to update it like this.
cc @DanutGavrus Is it ready for review ? Do you still need help setting up a HT account ? |
@fedirjh I still need help with setting a HT account. I've requested it yesterday, and I've requested it again ~40mins ago. Still waiting |
@@ -274,7 +274,7 @@ class AttachmentModal extends PureComponent { | |||
title={this.props.headerTitle || this.props.translate('common.attachment')} | |||
shouldShowBorderBottom | |||
shouldShowDownloadButton={this.props.allowDownload} | |||
onDownloadButtonPress={() => this.downloadAttachment(source)} | |||
onDownloadButtonPress={() => this.downloadAttachment(this.state.source)} |
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.
source
from here was previously set to this.state.source
and the download functionality was working properly. By updating this, after I was downloading an image, I couldn't open it locally because it was wrongly downloaded. Updated it back to fix this & updated the QA steps with this use case.
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 you elaborate more on the issue ? how is it "wrongly downloaded" ?
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.
Ah I see it , the downloadAttachment
require urls to be singed ( with auth signature ) , if url isn’t signed you can’t download them
@joelbettner 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] |
@fedirjh |
@fedirjh @joelbettner |
Reviewing shortly |
@joelbettner Please request a review from @chiragsalian as he is assigned to the linked issue. Thank you. |
While testing , I noticed this behaviour where the an indicator is shown when the file upload finish. This is doesn’t seem to be related to this PR as it’s reproducible on Profile avatar as well Loading.movProfile.movThis doesn't appear to be a bug, as when the newly uploaded image hasn't finished loading yet, the indicator or placeholder is displayed. |
Reviewer Checklist
Screenshots/VideosWebWeb.movMobile Web - ChromeChrome_.movMobile Web - SafariSafari.movDesktopDesktop.moviOSIOS.movAndroidAndoid_.mov |
@DanutGavrus Please merge main |
@fedirjh main merged |
I have got a console error , but it is not related to this PR , I have reported in slack https://expensify.slack.com/archives/C049HHMV9SM/p1684623711702359 |
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.
Looks good and tests well.
@DanutGavrus Please update the testing steps : Test 1:
Test 2:
|
@fedirjh The testing steps are the same as the QA steps and they already include Test1, Test2 and also the download image case. |
@DanutGavrus The test steps you provided are unclear and difficult to understand. Please revise them to make them more concise and straightforward. |
I was following the guideline from here where's also an example of bad and good test steps. I've revised them and now they are more concise and straightforward. I may revise them again if needed. |
Thanks! It looks good. I just have one additional change. The tester needs to verify the expected result for each test. Therefore, I suggest updating the last step of each test to start with |
Sure, I've updated that too just now. |
Looks good and tests well. 🎀👀🎀 C+ reviewed |
@DanutGavrus there is a linting problem. Looks like you might need to run |
@fedirjh @joelbettner |
✋ 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/joelbettner in version: 1.3.17-0 🚀
|
🚀 Deployed to production by https://github.com/chiragsalian in version: 1.3.17-5 🚀
|
Details
The old picture appeared in preview if the Details Page was being opened before. Updated usages of
source
.Fixed Issues
$ #17237
PROPOSAL: #17237 (comment)
Tests
Same as QA Steps.
Offline tests
Same as QA Steps, but at step 6. userA will see old userB's picture.
QA Steps
Test 1:
Test 2:
Test 3:
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.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.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
Web
Mobile Web - Chrome
Mobile Web - Safari
Desktop
iOS
Android