Moving workspace currency to a separate page#70575
Moving workspace currency to a separate page#70575aldo-expensify merged 19 commits intoExpensify:mainfrom
Conversation
|
I kept the We could handle cleaning this up in a separate task by removing |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppScreen.Recording.2025-10-06.at.13.45.04.movAndroid: mWeb ChromeScreen.Recording.2025-10-06.at.13.37.59.moviOS: HybridAppScreen.Recording.2025-10-06.at.13.36.16.moviOS: mWeb SafariScreen.Recording.2025-10-06.at.13.37.09.movMacOS: Chrome / SafariScreen.Recording.2025-10-06.at.13.32.24.movMacOS: DesktopScreen.Recording.2025-10-06.at.13.35.36.mov |
|
@abzokhattab Could you help merge main? |
|
sure!! done |
| const [workspaceNameFirstCharacter, setWorkspaceNameFirstCharacter] = useState(defaultWorkspaceName ?? ''); | ||
|
|
||
| const userCurrency = allPersonalDetails?.[session?.accountID ?? CONST.DEFAULT_NUMBER_ID]?.localCurrencyCode ?? CONST.CURRENCY.USD; | ||
| const userCurrency = draftValues?.currency ?? allPersonalDetails?.[session?.accountID ?? CONST.DEFAULT_NUMBER_ID]?.localCurrencyCode ?? CONST.CURRENCY.USD; |
There was a problem hiding this comment.
It seems we currently lack logic to clear draftValues?.currency when this page is closed. As a result, if a user selects a currency, closes the page, and then reopens it, the previously selected currency is incorrectly retained as the default.
However, based on the behavior observed in staging, each time the page is opened, the default currency should be determined using:
allPersonalDetails?.[session?.accountID ?? CONST.DEFAULT_NUMBER_ID]?.localCurrencyCode ?? CONST.CURRENCY.USD;
There was a problem hiding this comment.
I added this use effect to clear the draft value on closing the page
useEffect(() => {
return () => {
clearDraftValues(ONYXKEYS.FORMS.WORKSPACE_CONFIRMATION_FORM);
};
}, []);just like how we are doing in other pages ... what do u think ?
| title={currency} | ||
| title={shouldShowCurrencySymbol && currency ? `${currency} - ${getCurrencySymbol(currency)}` : currency} | ||
| ref={ref} | ||
| descriptionTextStyle={currencyTitleDescStyle} |
There was a problem hiding this comment.
It looks like it will break the description's style by comparing with the staging behavior.
There was a problem hiding this comment.
good catch ... i modified the descritpion style to check if the shouldShowCurrencySymbol is false
what do u think.. this ensures backward combilitability and works well for the new component as well
|
Bug 1 (I am not sure whether it is bug, so we need to ask design/internal team to confirm):
|
|
@abzokhattab I left a few comments |
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
is that considered a bug? i would expect that to the intended behavior now since we are moving the currency to a new seperate route. we need to confirm that behaviour |
thanks for the review .. i covered ur comments .. please take another look when u have time |
@abzokhattab Please help ask internal team to confirm it. From my side, I also think it isn't a bug |
|
Hi @aldo-expensify, we need your help regarding the following new behavior. Can you confirm if this is expected?
Refer to #70575 (comment) and #70575 (comment) Screen.Recording.2025-09-30.at.00.42.20.mov |
@abzokhattab Regarding the part where "the option selected in step 3 is still selected"—I believe this is a bug. It should match the current behavior on staging. Let's update the PR to address this. As for "After the refresh, the page remains on the currency list," I think that's expected behavior now, since we're using the currency picker as a full screen instead of a modal. |
|
@truph01 I know it’s not the same as staging, but since we moved currency selection to a separate page, it’s now possible to persist the user’s choice—just like we do in other flows, such as the Merchant field in Create Expense (attached a video). so previously, we couldn’t keep the currency modal open because the currency URL was the same as Create Workspace, so we couldn’t tell them apart. Now that they’re separate, why wouldn’t we keep the selected option? Screen.Recording.2025-10-01.at.15.04.02.mov |
I other fields edited in their own pages retain the edited value after refresh, I think it is fine to do it here and be consistent with that (even if staging is behaving differently right now)
How it works in your PR makes sense to me, I would keep it like that if it is consistent with other fields with separate pages. |
|
what do u think @truph01 |
|
@abzokhattab Based on this comment, the current behavior in our PR looks good |
|
@abzokhattab Could you merge main again? |
|
@abzokhattab We have regression in workspace creation flow. The test step mentioned in this PR Screen.Recording.2025-10-03.at.17.14.14.mov |
|
Good point @truph01 ... i have fixed this bug here is the behaviour after the fix Screen.Recording.2025-10-04.at.14.02.10.mov |
|
✋ 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/aldo-expensify in version: 9.2.27-0 🚀
|
|
🚀 Deployed to production by https://github.com/lakchote in version: 9.2.27-6 🚀
|
|
@truph01 @abzokhattab Coming from this issue #73396 , this PR adds a new route for workspace currency selection. However, it introduced a problem in the |
Explanation of Change
Fixed Issues
$ #69737
PROPOSAL: #69737 (comment)
Tests
Offline tests
Same as tests
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectioncanBeMissingparam foruseOnyxtoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)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
Screen.Recording.2025-09-17.at.20.17.23.mov
Android: mWeb Chrome
Screen.Recording.2025-09-17.at.20.18.45.mov
iOS: Native
Screen.Recording.2025-09-17.at.20.17.23.mov
iOS: mWeb Safari
Screen.Recording.2025-09-17.at.20.18.45.mov
MacOS: Chrome / Safari
Screen.Recording.2025-09-17.at.20.16.25.mov
MacOS: Desktop
Screen.Recording.2025-09-17.at.20.23.34.mov