Feature/35716 changing owner flow#37869
Conversation
2660d0c to
2124c90
Compare
e14442c to
2d361a8
Compare
|
@luacmartins I've just addressed your last comments including a refactor to handle payment card form inside the common change owner check page. Regarding bugs, you've raised:
This was because I had to work with mocked API, and my assumption was that I'll get an
I think I've managed to fix this for the case when we open the modal for the first time (like you've shown in the screen capture video). But there is still a glitch when we switch between errors in the opened modal - in some cases after the loader disappears, we see the previous texts for milliseconds. I didn't find out yet how to fix it, and will continue working on this, but maybe we could try to address it in a follow up issue in the worst case scenario? |
|
@shawnborton regarding your comments:
It is vertically centered: The feeling that there is something wrong with the alignment comes from the fact that there is a lot of empty space in the animation/image. I've used existing component for this that we use, e.g., in the enable payment process or in the wallet's transfer balance page.
Do you mean the gap between the "Transfer owner" and "Outstanding balance" or between "Outstanding balance" and "The account owning the workspace..." text? |
Sounds good, thanks for confirming.
This, the headline and the text immediately below it. |
|
@shawnborton Thanks for the answer. I've just changed the gap to 8px, as requested - it will look like below: |
Looks good, thanks! |
luacmartins
left a comment
There was a problem hiding this comment.
Code LGTM. I'm still seeing a few small things that we need to address, but those can be done in a follow up:
-
Disable
Transfer ownerbutton if user is offline since we can only go through this flow while online. -
Wrong error flashes momentarily
error_flash.mov
- We're showing an error screen on success after adding a debit card
error_page_on_success.mov
- We're showing three decimals for USD currency
|
I'll do the checklist on this one since it's hard for C+ to test it because we need the API in certain states to trigger errors. |
Reviewer Checklist
Screenshots/VideosAndroid: Nativeandroid.movAndroid: mWeb Chromechrome.moviOS: Nativeios.moviOS: mWeb Safarisafari.movMacOS: Chrome / Safariweb.movMacOS: Desktopdesktop.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. |
| failedToClearBalanceTitle: 'Failed to clear balance', | ||
| failedToClearBalanceButtonText: 'OK', | ||
| failedToClearBalanceText: 'We were unable to clear the balance. Please try again later.', |
There was a problem hiding this comment.
How come this is in english? This is against the checklists @burczu @luacmartins
Please send a PR to fix this @burczu
There was a problem hiding this comment.
Damn, I thought we had updated all of them, but clearly we missed some. I'll put up a PR to fix it. Thanks for raising this.
| onClose={() => onClose?.()} | ||
| onModalHide={onClose} | ||
| hideModalContentWhileAnimating | ||
| useNativeDriver |
There was a problem hiding this comment.
We forgot to add onBackdropPress here which is causing inconsistency in the flow. More details #47559
| const changeOwnerErrors = Object.keys(policy?.errorFields?.changeOwner ?? {}); | ||
|
|
||
| if (changeOwnerErrors && changeOwnerErrors.length > 0 && changeOwnerErrors[0] !== CONST.POLICY.OWNERSHIP_ERRORS.NO_BILLING_CARD) { | ||
| Navigation.navigate(ROUTES.WORKSPACE_OWNER_CHANGE_CHECK.getRoute(policyID, accountID, changeOwnerErrors[0] as ValueOf<typeof CONST.POLICY.OWNERSHIP_ERRORS>)); |
There was a problem hiding this comment.
coming from to this issue #57245, when we encounter an changeOwnerErrors value, we navigate to WORKSPACE_OWNER_CHANGE_CHECK. However, this leads to the same page being added to the navigation stack since we are already on WORKSPACE_OWNER_CHANGE_CHECK. As a result, pressing the back button on the success transfer page takes us to a blank page because the same screen exists twice with different parameters and to reach the member details page, we then have to press back twice. Instead, we can simply update the params of the current page if we receive a different error value from the backend. More context can be found here: #57245 (comment)
| }, [accountID, policyID]); | ||
|
|
||
| return ( | ||
| <AdminPolicyAccessOrNotFoundWrapper policyID={policyID}> |
There was a problem hiding this comment.
Coming from this issue #68574, we need to handle the case where a user accesses this page via a direct link and the member is invalid.




Details
This PR introduces ability to change ownership of the paid workspace as part of the Simplified collect project.
Fixed Issues
$ #35716
PROPOSAL: n/a
Tests
Offline tests
Changing ownership is not available in offline mode - check if the "Transfer owner" button is disabled
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
Screen.Recording.2024-03-25.at.13.01.29.mov
Android: mWeb Chrome
Screen.Recording.2024-03-25.at.12.53.37.mov
iOS: Native
Screen.Recording.2024-03-25.at.12.45.51.mov
iOS: mWeb Safari
Screen.Recording.2024-03-25.at.12.48.50.mov
MacOS: Chrome / Safari
Screen.Recording.2024-03-25.at.12.18.04.mov
MacOS: Desktop
Screen.Recording.2024-03-25.at.12.21.19.mov