-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Auto download wallet statement after finish genereating #51626
Auto download wallet statement after finish genereating #51626
Conversation
Looks like the download doesn't work in iOS mWeb (on ios.mweb.mp4 |
Reviewer Checklist
Screenshots/VideosAndroid: NativeCleanShot.2024-10-31.at.12.44.12.mp4Android: mWeb ChromeCleanShot.2024-10-31.at.12.57.55.mp4iOS: NativeCleanShot.2024-10-31.at.11.31.48.mp4iOS: mWeb SafariCleanShot.2024-10-31.at.11.51.48.mp4MacOS: Chrome / SafariCleanShot.2024-10-30.at.23.23.18.mp4MacOS: DesktopCleanShot.2024-10-30.at.23.30.08.mp4 |
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 to me.
cc @Expensify/design
Looking good. Is there any way we can keep the spinner going until the download thing actually happens/pops up? This is definitely much better than it was, but it seems like there's a couple seconds after the spinner goes away and before the download thingy pops up that makes me think "Ok wait, did it do it or did it mess up?" |
Yeah I think that's a fair point Danny. |
Agree with that. Would make it clearer |
Done. Please check! web.mp4 |
I think that looks better - it does seem like the continuity of the loading circle breaks slightly (as if it resets quickly) but I think that's something we can probably not worry about. |
Yeah this isn't super noticeable (I mean... You and me noticed it but 😅) and I think we can not worry about it. It feels much better than before. |
Agree! Lets Get This Merged. |
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 does seem like the continuity of the loading circle breaks slightly
@bernhardoj I think we can address that with the suggested changes.
if (walletStatement?.[yearMonth]) { | ||
setIsDownloading(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.
if (walletStatement?.[yearMonth]) { | |
setIsDownloading(true); | |
setIsDownloading(true); | |
if (walletStatement?.[yearMonth]) { |
const themePreference = useThemePreference(); | ||
const yearMonth = route.params.yearMonth ?? null; | ||
const isWalletStatementGenerating = walletStatement?.isGenerating ?? false; | ||
|
||
const prevIsWalletStatementGenerating = usePrevious(isWalletStatementGenerating); | ||
const [isDownloading, setIsDownloading] = useState(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.
const [isDownloading, setIsDownloading] = useState(false); | |
const [isDownloading, setIsDownloading] = useState(isWalletStatementGenerating); |
@@ -81,7 +85,8 @@ function WalletStatementPage({walletStatement, route}: WalletStatementPageProps) | |||
> | |||
<HeaderWithBackButton | |||
title={Str.recapitalize(title)} | |||
shouldShowDownloadButton={!isOffline || isWalletStatementGenerating} | |||
shouldShowDownloadButton={!isOffline || isWalletStatementGenerating || isDownloading} | |||
isDownloading={isWalletStatementGenerating || isDownloading} |
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.
isDownloading={isWalletStatementGenerating || isDownloading} | |
isDownloading={isDownloading} |
Done. Please check again. |
} else { | ||
setIsDownloading(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.
Why is this necessary?
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.
Just in case the generate fails.
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
CleanShot.2024-11-01.at.18.38.19.mp4
CleanShot.2024-11-01.at.18.45.09.mp4
✋ 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/carlosmiceli in version: 9.0.57-0 🚀
|
We are not able to see statements in Wallet. Is there a way to trigger it in QA or can you validate internally ? |
@mvtglobally sorry, I should've put it on the QA Steps, but you can try accessing the wallet statement page directly. |
Hey @carlosmiceli @bernhardoj, I can't figure out how to access the statement page using the direct link. Please can you test and verify this on staging? When I use the links above I see this (below) Regardless in the meantime I will skip this from the checklist because it is a hidden feature that shouldn't block deploy. |
🚀 Deployed to production by https://github.com/luacmartins in version: 9.0.57-10 🚀
|
Yes, I see that too, but you can still download it. Here is the recording on staging. web.mp4 |
Ah thanks. After realising this wasn't live for users I was less concerned and removed the blocker, but thanks for pointing this out 👍 |
Details
Currently, user needs to press twice the download button to download a wallet statement. We want to auto-download it after finish generating.
Fixed Issues
$ #50828
PROPOSAL: #50828 (comment)
Tests
Same as QA Steps
Offline tests
Same as QA Steps
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.mp4
Android: mWeb Chrome
android.mweb.mp4
iOS: Native
ios.mp4
iOS: mWeb Safari
MacOS: Chrome / Safari
web.mp4
MacOS: Desktop
desktop.mp4