-
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: disabled download button when downloading #44760
Conversation
@Expensify/design does this look good? 345698348-82a0143a-c7d8-446b-9ba9-549f17b80deb.mov |
I think that looks good to me! |
Yeah I like it! |
@situchan friendly bump |
Reviewer Checklist
Screenshots/VideosAndroid: Nativeandroid1.mp4android2.mp4Android: mWeb ChromeiOS: Nativeios.moviOS: mWeb SafariMacOS: Chrome / Safariweb.movMacOS: Desktop |
const message = Array.isArray(reportAction?.message) ? reportAction?.message?.at(-1) ?? null : reportAction?.message ?? null; | ||
const html = message?.html ?? ''; | ||
const {sourceURL} = getAttachmentDetails(html); | ||
const sourceID = (sourceURL?.match(CONST.REGEX.ATTACHMENT_ID) ?? [])[1]; |
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.
NAB: Can we make util for this?
- I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
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.
I updated
Please pull main as 2k+ commits are behind |
@nkdengineer there's conflict |
@@ -7089,6 +7090,14 @@ function findPolicyExpenseChatByPolicyID(policyID: string): OnyxEntry<Report> { | |||
return Object.values(ReportConnection.getAllReports() ?? {}).find((report) => isPolicyExpenseChat(report) && report?.policyID === policyID); | |||
} | |||
|
|||
function getSourceIDFromReportAction(reportAction: OnyxEntry<ReportAction>): string { | |||
const message = Array.isArray(reportAction?.message) ? reportAction?.message?.at(-1) ?? null : reportAction?.message ?? null; |
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's still duplicated code in ContextMenuActions
App/src/pages/home/report/ContextMenu/ContextMenuActions.tsx
Lines 40 to 43 in 3fd1644
function getActionHtml(reportAction: OnyxInputOrEntry<ReportAction>): string { | |
const message = Array.isArray(reportAction?.message) ? reportAction?.message?.at(-1) ?? null : reportAction?.message ?? null; | |
return message?.html ?? ''; | |
} |
App/src/pages/home/report/ContextMenu/ContextMenuActions.tsx
Lines 518 to 521 in 3fd1644
const html = getActionHtml(reportAction); | |
const {originalFileName, sourceURL} = getAttachmentDetails(html); | |
const sourceURLWithAuth = addEncryptedAuthTokenToURL(sourceURL ?? ''); | |
const sourceID = (sourceURL?.match(CONST.REGEX.ATTACHMENT_ID) ?? [])[1]; |
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.
@situchan I think using the utils function in the onPress function does not bring much benefit because variables like originalFileName, sourceURL, sourceURLWithAuth, etc., are all reused below.
Please resolve conflict |
@situchan resolved, please check again |
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
Looks like there's conflicts to resolve |
@madmax330 resolved, please check again |
✋ 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/madmax330 in version: 9.0.13-0 🚀
|
🚀 Deployed to production by https://github.com/luacmartins in version: 9.0.13-4 🚀
|
Details
Fixed Issues
$ #43546
PROPOSAL: #43546 (comment)
Tests
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
android.mov
Android: mWeb Chrome
android.mov
iOS: Native
ios.mov
iOS: mWeb Safari
ios-mweb.mov
MacOS: Chrome / Safari
web.mov
MacOS: Desktop
desktop.mov