Skip to content

[$250] Workspace - No confirmation modal when leaving workspace from workspace list #56722

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

Closed
6 of 8 tasks
mitarachim opened this issue Feb 12, 2025 · 10 comments
Closed
6 of 8 tasks
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors

Comments

@mitarachim
Copy link

mitarachim commented Feb 12, 2025

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!


Version Number: 9.0.97-0
Reproducible in staging?: Yes
Reproducible in production?: Yes
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: N/A
If this was caught during regression testing, add the test name, ID and link from TestRail: Exp
Email or phone of affected tester (no customers): [email protected]
Issue reported by: Applause Internal Team
Device used: Mac 15.0 / Chrome
App Component: Workspace Settings

Action Performed:

Precondition:

  • User is invited to the workspace.
  1. Go to staging.new.expensify.com
  2. Go to workspace settings > Overview.
  3. Click Leave.
  4. Note that there is a confirmation modal.
  5. Close the modal.
  6. Go back to Account settings > Workspaces.
  7. Click 3-dot menu next to workspace.
  8. Click Leave.

Expected Result:

There should be a confirmation modal for consistency.

Actual Result:

There is no confirmation modal when leaving workspace from workspace list.

Workaround:

Unknown

Platforms:

  • Android: Standalone
  • Android: HybridApp
  • Android: mWeb Chrome
  • iOS: Standalone
  • iOS: HybridApp
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Bug6740212_1739327081075.20250212_100754.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021891943200151022128
  • Upwork Job ID: 1891943200151022128
  • Last Price Increase: 2025-02-18
Issue OwnerCurrent Issue Owner: @ikevin127
@mitarachim mitarachim added Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 labels Feb 12, 2025
Copy link

melvin-bot bot commented Feb 12, 2025

Triggered auto assignment to @abekkala (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.

@nkdengineer
Copy link
Contributor

nkdengineer commented Feb 12, 2025

Proposal

Please re-state the problem that we are trying to solve in this issue.

There is no confirmation modal when leaving workspace from workspace list.

What is the root cause of that problem?

We do not have a confirm modal in workspace list page like workspace profile page

What changes do you think we should make in order to solve the problem?

  1. Update this function to show confirm modal

if (!(isAdmin || isOwner)) {
threeDotsMenuItems.push({
icon: Expensicons.Exit,
text: translate('common.leave'),
onSelected: callFunctionIfActionIsAllowed(() => leaveWorkspace(item.policyID)),
});
}

  1. Added confirm modal in workspace list page like delete modal here
            <ConfirmModal
                title={translate('workspace.common.leave')}
                isVisible={isLeaveModalOpen}
                onConfirm={confirmLeaveAndHideModal}
                onCancel={() => setIsLeaveModalOpen(false)}
                prompt={translate('workspace.common.leaveConfirmation')}
                confirmText={translate('common.leave')}
                cancelText={translate('common.cancel')}
                danger
            />

What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?

None

What alternative solutions did you explore? (Optional)

Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.

@twilight2294
Copy link
Contributor

Proposal

Please re-state the problem that we are trying to solve in this issue.

No confirmation modal when leaving workspace from workspace list

What is the root cause of that problem?

We do not have a modal set for the case where we leave a workspace from the workspace list page, this causes us to not show any confirmation modal while leaving

threeDotsMenuItems.push({
icon: Expensicons.Exit,
text: translate('common.leave'),
onSelected: callFunctionIfActionIsAllowed(() => leaveWorkspace(item.policyID)),
});
}

What changes do you think we should make in order to solve the problem?

Introduce a new leave workspace modal like we have in workspace profile page;

<ConfirmModal
title={translate('common.leave')}
isVisible={isLeaveModalOpen}
onConfirm={() => handleWorkspaceAction('leave')}
onCancel={() => setIsLeaveModalOpen(false)}

What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?

N/A

What alternative solutions did you explore? (Optional)

@etCoderDysto
Copy link
Contributor

etCoderDysto commented Feb 12, 2025

🚨 Edited by proposal-police: This proposal was edited at 2025-02-12 04:10:23 UTC.

Proposal

Please re-state the problem that we are trying to solve in this issue.

Workspace - No confirmation modal when leaving workspace from workspace list

What is the root cause of that problem?

When user clicks leave from three dot menu, we are not setting confirm modal to visible

if (!(isAdmin || isOwner)) {
threeDotsMenuItems.push({
icon: Expensicons.Exit,
text: translate('common.leave'),
onSelected: callFunctionIfActionIsAllowed(() => leaveWorkspace(item.policyID)),

What changes do you think we should make in order to solve the problem?

  • We should add a leave modal similar to delete modal

    <ConfirmModal
    title={translate('workspace.common.delete')}
    isVisible={isDeleteModalOpen}
    onConfirm={confirmDeleteAndHideModal}
    onCancel={() => setIsDeleteModalOpen(false)}
    prompt={hasCardFeedOrExpensifyCard ? translate('workspace.common.deleteWithCardsConfirmation') : translate('workspace.common.deleteConfirmation')}

  • Create a state to set modal to visible when leave menu item is clicked
    [isLeaveModalOpened, setIsLeaveModalOpened]

  • Create another use state to store policyId of the modal to be deleted

  • On confirm modal delete the workspace using the policyID

What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?

N/A

What alternative solutions did you explore? (Optional)

@twilight2294
Copy link
Contributor

Note

Putting up a note for future C+, that @nkdengineer didn't include any links in their initial proposal it was just a skeleton and updated the links only after I posted my proposal

@melvin-bot melvin-bot bot added the Overdue label Feb 14, 2025
Copy link

melvin-bot bot commented Feb 17, 2025

@abekkala Eep! 4 days overdue now. Issues have feelings too...

@abekkala abekkala added the External Added to denote the issue can be worked on by a contributor label Feb 18, 2025
Copy link

melvin-bot bot commented Feb 18, 2025

Job added to Upwork: https://www.upwork.com/jobs/~021891943200151022128

@melvin-bot melvin-bot bot changed the title Workspace - No confirmation modal when leaving workspace from workspace list [$250] Workspace - No confirmation modal when leaving workspace from workspace list Feb 18, 2025
@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Feb 18, 2025
Copy link

melvin-bot bot commented Feb 18, 2025

Triggered auto assignment to Contributor-plus team member for initial proposal review - @ikevin127 (External)

@ikevin127
Copy link
Contributor

🛑 Awaiting a clear answer here in order to figure out how we're going to proceed.

Context

This issue is suggesting to add a Leave confirmation modal on WorkspacesListPage in order to be consistent with the Leave confirmation modal / feature added recently in PR:

but going down the blame line I noticed that the PR mentioned above was reverted. Therefore there's nothing to be aligned on since the Leave confirmation modal change from WorkspaceProfilePage was reverted -> meaning this issue mentoned not an issue anymore (or it still is) ? 😅

Since they are reworking that reverted PR in this issue:

I suggested the following options to fix the conflict and possibly either handle WorkspacesListPage separately in this issue and WorkspaceProfilePage in the other issue, or both in the other issue to make things simpler:

Anyways, how are we going to proceed with this conflict ?

  1. Are you guys going to handle both the addition of the Leave confirmation modal on WorkspacesListPage and the new Leave feature including confirmation modal in WorkspaceProfilePage and we close the other issue ?
  2. Should we implement the Leave confirmation modal separately on WorkspacesListPage as part the other issue and you strictly handle WorkspaceProfilePage in this issue ?

@trjExpensify
Copy link
Contributor

Closing this out as the PR was reverted and we're implementing this feature again properly over here: #56750

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors
Projects
Status: Done
Development

No branches or pull requests

7 participants