[Advanced Approval Workflows] Display empty state when the member list is empty#47848
Conversation
|
@DylanDylann Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
|
@Expensify/design Please verify that it looks good to you 😄 |
|
@blazejkustra Also apply this change to approver page Screen.Recording.2024-08-25.at.18.20.06.mov |
|
This is what I landed on @DylanDylann: Screen.Recording.2024-08-26.at.19.08.25.mov
I don't think we should display "Nice job! All workspace members belong to an approval workflow.", this might be misleading when selecting an approver. I see two options going forward and I lean to the latter:
|
This comment was marked as outdated.
This comment was marked as outdated.
|
Alright coming from this convo in Slack, we've decided to use our standard empty states for these. Here's a mock of the And here is the illustration: Turtle in Shell.svg.zip |
|
@DylanDylann Ready for review 👀 |
| onSubmit={nextStep} | ||
| isDisabled={!shouldShowListEmptyContent && !selectedMembers.length} | ||
| buttonText={buttonText} | ||
| onSubmit={shouldShowListEmptyContent ? () => Navigation.goBack() : nextStep} |
There was a problem hiding this comment.
@blazejkustra Should apply this to approver list page
There was a problem hiding this comment.
Actually no, we should always use nextStep handler for approver list page. There is an edge case where you want to remove an approver who is in circular reference, you can change the code and try it 😄
There was a problem hiding this comment.
There is an edge case where you want to remove an approver who is in circular reference
The circular reference isn't allowed on Newdot. So I am not sure your mean
Could you help to clear your edge case?
There was a problem hiding this comment.
Sure, let me post a video in a sec
There was a problem hiding this comment.
In the editor you can create a workflow with circular reference (you can't save it, but you can get to this state).
- Try to remove this duplicated approver and make sure there are no other approvers to choose from:
- Once your approver is unchecked, empty state is displayed:
- Clicking on got it has to trigger
nextStepfunction in oder to callWorkflow.clearApprovalWorkflowApprover(approverIndex)function
Here is the video:
Screen.Recording.2024-08-30.at.12.40.28.mov
There was a problem hiding this comment.
Thanks for your explanation
Reviewer Checklist
Screenshots/VideosAndroid: NativeScreen.Recording.2024-08-29.at.11.30.23.movAndroid: mWeb ChromeScreen.Recording.2024-08-29.at.11.29.24.moviOS: NativeScreen.Recording.2024-08-29.at.11.29.05.moviOS: mWeb SafariScreen.Recording.2024-08-29.at.11.28.26.movMacOS: Chrome / SafariScreen.Recording.2024-08-29.at.11.18.38.movMacOS: DesktopScreen.Recording.2024-08-29.at.11.21.03.mov |
|
@dannymcclain @shawnborton FYI, looking at the code most of the "empty states" have the default color instead of |
|
I have a feeling @dannymcclain is going to want to change it to textSupporting, let's wait and see what he says though! |
You're feeling is correct! 😁 All of the empty states should use |
|
We did not find an internal engineer to review this PR, trying to assign a random engineer to #47700 as well as to this PR... Please reach out for help on Slack if no one gets assigned! |
|
@blazejkustra Please help to address this comment #47848 (comment) |
@dannymcclain should we create a new issue to change it everywhere? |
|
Adjusted 👌 cc @DylanDylann |
|
Code looks good to me! Gonna leave it for @shawnborton and @dannymcclain to approve the design changes before merging. |
dubielzyk-expensify
left a comment
There was a problem hiding this comment.
Looks from Slack that we want this in early, so I'll go ahead and approve :D
|
Back to you @jasperhuangg |
|
✋ 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/jasperhuangg in version: 9.0.29-0 🚀
|
|
🚀 Deployed to production by https://github.com/roryabraham in version: 9.0.29-12 🚀
|







Details
#47848 (comment)
Fixed Issues
$ #47700
PROPOSAL: N/A
Tests
Offline tests
N/A
QA Steps
Same as tests
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.src/languages/*files and using the translation methodWaiting for Copylabel for a copy review on the original GH to get the correct copy.STYLE.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 so 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.webm
Android: mWeb Chrome
android-web.webm
iOS: Native
ios.mp4
iOS: mWeb Safari
ios-web.mp4
MacOS: Chrome / Safari
web.mov
MacOS: Desktop
desktop.mov