-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
[HOLD for payment 2024-11-20] [$125] Don't show two creation options at the same time in the workspace switcher #52030
Comments
Current assignee @JmillsExpensify is eligible for the Bug assigner, not assigning anyone new. |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @brunovjk ( |
|
Let me know if you have any questions on this issues, happy to clarify. |
Edited by proposal-police: This proposal was edited at 2024-11-05 11:54:40 UTC. ProposalPlease re-state the problem that we are trying to solve in this issue.Don't show two creation options at the same time in the workspace switcher What is the root cause of that problem?We did not hide the option if the user does not have workspaces or member group of a workspace App/src/pages/WorkspaceSwitcherPage/WorkspacesSectionHeader.tsx Lines 31 to 33 in 3d0f309
What changes do you think we should make in order to solve the problem?We should check if the user has a workspace or a member of other group workspaces then we will show the option inside the workspace switcher page const [allPolicies] = useOnyx(ONYXKEYS.COLLECTION.POLICY);
{Policy.hasActiveChatEnabledPolicies(Object.values(allPolicies ?? {})) && (
<Tooltip text={translate('workspace.new.newWorkspace')}>
<PressableWithFeedback
accessibilityLabel={translate('workspace.new.newWorkspace')}
role={CONST.ROLE.BUTTON}
onPress={() => {
const activeRoute = Navigation.getActiveRouteWithoutParams();
interceptAnonymousUser(() => App.createWorkspaceWithPolicyDraftAndNavigateToIt('', '', false, false, activeRoute));
}}
>
{({hovered}) => (
<Icon
src={Expensicons.Plus}
width={12}
height={12}
additionalStyles={[styles.buttonDefaultBG, styles.borderRadiusNormal, styles.p2, hovered && styles.buttonHoveredBG]}
fill={theme.icon}
/>
)}
</PressableWithFeedback>
</Tooltip>
)} It should similar to promotion create workspace button App/src/pages/home/sidebar/SidebarScreen/FloatingActionButtonAndPopover.tsx Lines 456 to 459 in 3d0f309
In this issue we decided to return true for hasActiveChatEnabledPolicies if the user is member of other group workspaces What alternative solutions did you explore? (Optional) |
Following on that proposal, please check this related issue as it's important that we stay consistent with it. In short, we shouldn't be showing the empty state as long as someone is a member of other group workspaces (whether or not they are policy expense chats enabled). |
Edited by proposal-police: This proposal was edited at 2024-11-05 12:05:03 UTC. ProposalPlease re-state the problem that we are trying to solve in this issue.Don't show two creation options at the same time in the workspace switcher What is the root cause of that problem?We do not hide the App/src/pages/WorkspaceSwitcherPage/WorkspacesSectionHeader.tsx Lines 31 to 33 in 3d0f309
What changes do you think we should make in order to solve the problem?We need to pass App/src/pages/WorkspaceSwitcherPage/index.tsx Line 149 in 3d0f309
to the below component: App/src/pages/WorkspaceSwitcherPage/index.tsx Line 186 in 3d0f309
<WorkspacesSectionHeader shouldShowCreateWorkspace={!shouldShowCreateWorkspace} /> And then in (shouldShowCreateWorkspace && <Tooltip text={translate('workspace.new.newWorkspace')}>
<PressableWithFeedback
accessibilityLabel={translate('workspace.new.newWorkspace')} We already pass App/src/pages/WorkspaceSwitcherPage/index.tsx Line 196 in 3d0f309
![]() What alternative solutions did you explore? (Optional) |
ProposalPlease re-state the problem that we are trying to solve in this issue.Don't show two creation options at the same time in the workspace switcher What is the root cause of that problem?Changes request What changes do you think we should make in order to solve the problem?Accept
And only show the + icon if
Pass App/src/pages/WorkspaceSwitcherPage/index.tsx Line 186 in 3d0f309
Result What alternative solutions did you explore? (Optional) |
Updated proposalUpdated the proposal to add an extra point and pass the prop to main component |
This comment was marked as outdated.
This comment was marked as outdated.
Thank you, @NJ-2020, for proposal 1, but I don’t think the solution is suitable here. Between proposals 2 and 3, both suggest a correct solution of passing I think we can go with @twilight2294's proposal. However, both posted the proposal almost at the same time, difficult decision, I ask for your help with this call hehe 🎀👀🎀 C+ reviewed |
Triggered auto assignment to @MariaHCD, see https://stackoverflow.com/c/expensify/questions/7972 for more details. |
@brunovjk @MariaHCD I believe my proposal is the first with the correct solution Timestamp:
Btw to be honest I started writing my proposal before proposal 2 was posted, and don't use any information from proposal 2 |
@brunovjk , yes i was the first one to give the correct approach to the bug, so my solution is valid in this case :) |
I agree with @brunovjk's decision here 👍🏼 The two proposals were posted at almost the same time and propose the same fix. Let's proceed with @twilight2294 for this one. Thank you for the contribution, @nyomanjyotisa! |
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.60-3 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue: If no regressions arise, payment will be issued on 2024-11-20. 🎊 For reference, here are some details about the assignees on this issue:
|
@brunovjk @JmillsExpensify @brunovjk The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button] |
BugZero Checklist:
Bug classificationSource of bug:
Where bug was reported:
Who reported the bug:
Regression Test ProposalTest:
Do we agree 👍 or 👎 |
Payment Summary
BugZero Checklist (@JmillsExpensify)
|
Payment summary:
|
Offers sent via Upwork |
Accepted @JmillsExpensify |
Thanks everyone! |
Problem: When we prompt users to create a new workspace in the workspace switcher, they become confused by two options that do the same thing, which leads to frustration.
Solution: Let's simplify the decisions we're asking users to take when creating a workspace, and in particular, let's not add creation options that do the same thing and compete with our "green brick road" pattern.
All in all, our solution will look like this:
For clarity, this means that we should show the small plus button only when the empty state doesn't show. (Related, the empty state should only show when someone doesn't have an existing group workspace that they're a member of).

Issue Owner
Current Issue Owner: @JmillsExpensifyThe text was updated successfully, but these errors were encountered: