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 |
fedirjh
left a comment
There was a problem hiding this comment.
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. |
fedirjh
left a comment
There was a problem hiding this comment.
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.
| if (walletStatement?.[yearMonth]) { | |
| setIsDownloading(true); | |
| setIsDownloading(true); | |
| if (walletStatement?.[yearMonth]) { |
| const isWalletStatementGenerating = walletStatement?.isGenerating ?? false; | ||
|
|
||
| const prevIsWalletStatementGenerating = usePrevious(isWalletStatementGenerating); | ||
| const [isDownloading, setIsDownloading] = useState(false); |
There was a problem hiding this comment.
| const [isDownloading, setIsDownloading] = useState(false); | |
| const [isDownloading, setIsDownloading] = useState(isWalletStatementGenerating); |
| title={Str.recapitalize(title)} | ||
| shouldShowDownloadButton={!isOffline || isWalletStatementGenerating} | ||
| shouldShowDownloadButton={!isOffline || isWalletStatementGenerating || isDownloading} | ||
| isDownloading={isWalletStatementGenerating || isDownloading} |
There was a problem hiding this comment.
| isDownloading={isWalletStatementGenerating || isDownloading} | |
| isDownloading={isDownloading} |
|
Done. Please check again. |
| } else { | ||
| setIsDownloading(false); | ||
| } |
There was a problem hiding this comment.
Just in case the generate fails.
fedirjh
left a comment
There was a problem hiding this comment.
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 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
android.mp4
Android: mWeb Chrome
android.mweb.mp4
iOS: Native
ios.mp4
iOS: mWeb Safari
MacOS: Chrome / Safari
web.mp4
MacOS: Desktop
desktop.mp4