-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
[Advanced Approval Workflows] Display empty state when the member list is empty #47848
[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 |
src/pages/workspace/workflows/approvals/WorkspaceWorkflowsApprovalsExpensesFromPage.tsx
Outdated
Show resolved
Hide resolved
src/pages/workspace/workflows/approvals/WorkspaceWorkflowsApprovalsExpensesFromPage.tsx
Outdated
Show resolved
Hide resolved
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@blazejkustra Should apply this to approver list page
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.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@blazejkustra Could you check above comment?
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.
Sure, let me post a video in a sec
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.
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
nextStep
function 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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. |
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 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 Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodWaiting for Copy
label for a copy review on the original GH to get the correct copy.STYLE.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 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.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