Skip to content
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

[$500] Chat - Three-dot menu is redundant for deleted root message with threads #34992

Closed
2 of 6 tasks
lanitochka17 opened this issue Jan 23, 2024 · 17 comments
Closed
2 of 6 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

@lanitochka17
Copy link

lanitochka17 commented Jan 23, 2024

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Version Number: 1.4.30-0
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by: Applause - Internal Team
Slack conversation:

Action Performed:

  1. Go to any chat
  2. Send a message and also reply in thread
  3. Delete the parent message
  4. Return to the main chat
  5. Hover over the deleted parent message
  6. Click 3-dot menu

Expected Result:

3-dot menu should not appear when the 3-dot menu options are the same as the hover menu

Actual Result:

3-dot menu is present when the 3-dot menu options are the same as the hover menu

Workaround:

Unknown

Platforms:

Which of our officially supported platforms is this issue occurring on?

  • Android: Native
  • Android: mWeb Chrome
  • iOS: Native
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Add any screenshot/video evidence

Bug6352419_1706037322794.20240123_224324.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01f7369ff9642cdfd4
  • Upwork Job ID: 1749877073496403968
  • Last Price Increase: 2024-01-23
@lanitochka17 lanitochka17 added External Added to denote the issue can be worked on by a contributor Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Jan 23, 2024
@melvin-bot melvin-bot bot changed the title Chat - Three-dot menu is redundant for deleted root message with threads [$500] Chat - Three-dot menu is redundant for deleted root message with threads Jan 23, 2024
Copy link

melvin-bot bot commented Jan 23, 2024

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

Copy link

melvin-bot bot commented Jan 23, 2024

Triggered auto assignment to @laurenreidexpensify (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Jan 23, 2024
Copy link

melvin-bot bot commented Jan 23, 2024

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

@lanitochka17
Copy link
Author

We think that this bug might be related to #vip-vsp
CC @quinthar

@paultsimura
Copy link
Contributor

paultsimura commented Jan 23, 2024

Proposal

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

For deleted report actions, a 3-dot menu is visible

What is the root cause of that problem?

We show the 3-dot menu for any report action on the mini context menu without any detailed control over it:

{
isAnonymousAction: true,
textTranslateKey: 'reportActionContextMenu.menu',
icon: Expensicons.ThreeDots,
shouldShow: (type, reportAction, isArchivedRoom, betas, anchor, isChronosReport, reportID, isPinnedChat, isUnreadChat, isOffline, isMini) => isMini,

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

We decide which elements to show in the bubble, and which - in the expended menu - here:

let filteredContextMenuActions = ContextMenuActions.filter((contextAction) =>
contextAction.shouldShow(type, reportAction, isArchivedRoom, betas, anchor, isChronosReport, reportID, isPinnedChat, isUnreadChat, !!isOffline, isMini),
);
filteredContextMenuActions =
isMini && filteredContextMenuActions.length > CONST.MINI_CONTEXT_MENU_MAX_ITEMS
? ([...filteredContextMenuActions.slice(0, CONST.MINI_CONTEXT_MENU_MAX_ITEMS - 1), filteredContextMenuActions.at(-1)] as typeof filteredContextMenuActions)
: filteredContextMenuActions;

We should cut off the last menu action (which is the 3-dot menu) for the menus with less than or equal to MINI_CONTEXT_MENU_MAX_ITEMS items:

    let filteredContextMenuActions = ContextMenuActions.filter((contextAction) =>
        contextAction.shouldShow(type, reportAction, isArchivedRoom, betas, anchor, isChronosReport, reportID, isPinnedChat, isUnreadChat, !!isOffline, isMini),
    );

    if (isMini) {
        filteredContextMenuActions = filteredContextMenuActions.length > CONST.MINI_CONTEXT_MENU_MAX_ITEMS
                ? ([...filteredContextMenuActions.slice(0, CONST.MINI_CONTEXT_MENU_MAX_ITEMS - 1), filteredContextMenuActions.at(-1)] as typeof filteredContextMenuActions)
                : filteredContextMenuActions.slice(0, -1);
    }

Result

image

What alternative solutions did you explore? (Optional)

We can simply update the shouldShow condition of the "menu" action to hide it for deleted actions:

        shouldShow: (type, reportAction, isArchivedRoom, betas, anchor, isChronosReport, reportID, isPinnedChat, isUnreadChat, isOffline, isMini) => {
            const isDeletedAction = ReportActionsUtils.isDeletedAction(reportAction);
            return isMini && !isDeletedAction;
        },

@Nodebrute
Copy link
Contributor

Nodebrute commented Jan 23, 2024

Proposal

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

The three dots menu is still displayed for deleted parent message

What is the root cause of that problem?

We don't have any check to see if we have more options to display in the 3 dots menu, or if all options are already available in the hover menu.

shouldShow: (type, reportAction, isArchivedRoom, betas, anchor, isChronosReport, reportID, isPinnedChat, isUnreadChat, isOffline, isMini) => isMini,

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

In the 'should show' function, we should add a check to determine if more options are available before displaying the three dots menu.

shouldShow: (type, reportAction, isArchivedRoom, betas, anchor, isChronosReport, reportID, isPinnedChat, isUnreadChat, isOffline, isMini) => isMini,

What alternative solutions did you explore? (Optional)

@paultsimura
Copy link
Contributor

Proposal

Updated proposal #34992 (comment) – swapped main and alternative solutions.

@Bilal-Khursheed
Copy link

Bilal-Khursheed commented Jan 23, 2024

Please re-state the problem that we are trying to solve in this issue.
Ans: Sort out issue of 3-dots

What is the root cause of that problem?

Ans : added 3-dot button with these buttons

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

Ans : we will replace 3 dots action with button shown separately and will remove or will hide 3 dots until we are done with what we are expecting.

As per guidelines
Here is my email for Expensify: bilal.khursheed617@gmail.com

Upworklink: https://www.upwork.com/freelancers/~01094986abb8ef2924

Thanks do contact me on my email mailto:bilal.khursheed617@gmail.com

Copy link

melvin-bot bot commented Jan 23, 2024

📣 @Bilal-Khursheed! 📣
Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork.
Please follow these steps:

  1. Make sure you've read and understood the contributing guidelines.
  2. Get the email address used to login to your Expensify account. If you don't already have an Expensify account, create one here. If you have multiple accounts (e.g. one for testing), please use your main account email.
  3. Get the link to your Upwork profile. It's necessary because we only pay via Upwork. You can access it by logging in, and then clicking on your name. It'll look like this. If you don't already have an account, sign up for one here.
  4. Copy the format below and paste it in a comment on this issue. Replace the placeholder text with your actual details.
    Screen Shot 2022-11-16 at 4 42 54 PM
    Format:
Contributor details
Your Expensify account email: <REPLACE EMAIL HERE>
Upwork Profile Link: <REPLACE LINK HERE>

@laurenreidexpensify
Copy link
Contributor

@thesahindia bump for review ^^

@paultsimura
Copy link
Contributor

bump for review ^^

@laurenreidexpensify according to Slack status, @thesahindia is currently out sick.

@thesahindia
Copy link
Member

I am not sure if it's worth fixing. It doesn't feel like broken. It's an improvement.

P.S. I am working a little bit right now so no need to reassign.

@thesahindia
Copy link
Member

If we wanna fix it we can go with @paultsimura's proposal.

🎀 👀 🎀 C+ reviewed

Copy link

melvin-bot bot commented Jan 25, 2024

Triggered auto assignment to @arosiclair, see https://stackoverflow.com/c/expensify/questions/7972 for more details.

@paultsimura
Copy link
Contributor

Just saw that it should be fixed by #34754. @esh-g, could you please confirm?

@esh-g
Copy link
Contributor

esh-g commented Jan 25, 2024

Yes @paultsimura this should be fixed by that

@arosiclair
Copy link
Contributor

Alright I'll close this as a dupe for now. Be sure to include testing steps to verify this is also fixed @esh-g

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
None yet
Development

No branches or pull requests

8 participants