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

[HOLD for payment 2023-12-28] [$500] Expense report header is missing the three dots icon #32414

Closed
1 of 6 tasks
m-natarajan opened this issue Dec 3, 2023 · 40 comments
Closed
1 of 6 tasks
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor

Comments

@m-natarajan
Copy link

m-natarajan commented Dec 3, 2023

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.7
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: @shawnborton
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1701391916879549

Action Performed:

Go to an expense report, look at the top header area

Expected Result:

The header area should have a three dots (ellipsis overflow) menu in the top right. In this menu, there should at least be a pin and call option)

Actual Result:

There is no overflow ellipsis menu here

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

CleanShot 2023-11-30 at 19 51 08@2x

Snip - (59) New Expensify - Google Chrome (2)

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01896b1282e560a2b7
  • Upwork Job ID: 1731335924328407040
  • Last Price Increase: 2023-12-10
  • Automatic offers:
    • aimane-chnaif | Reviewer | 28037783
    • mkhutornyi | Contributor | 28037784
@m-natarajan m-natarajan added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Dec 3, 2023
Copy link

melvin-bot bot commented Dec 3, 2023

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

Copy link

melvin-bot bot commented Dec 3, 2023

Bug0 Triage Checklist (Main S/O)

  • This "bug" occurs on a supported platform (ensure Platforms in OP are ✅)
  • This bug is not a duplicate report (check E/App issues and #expensify-bugs)
    • If it is, comment with a link to the original report, close the issue and add any novel details to the original issue instead
  • This bug is reproducible using the reproduction steps in the OP. S/O
    • If the reproduction steps are clear and you're unable to reproduce the bug, check with the reporter and QA first, then close the issue.
    • If the reproduction steps aren't clear and you determine the correct steps, please update the OP.
  • This issue is filled out as thoroughly and clearly as possible
    • Pay special attention to the title, results, platforms where the bug occurs, and if the bug happens on staging/production.
  • I have reviewed and subscribed to the linked Slack conversation to ensure Slack/Github stay in sync

@m-natarajan m-natarajan added the External Added to denote the issue can be worked on by a contributor label Dec 3, 2023
@melvin-bot melvin-bot bot changed the title Expense report header is missing the three dots icon [$500] Expense report header is missing the three dots icon Dec 3, 2023
Copy link

melvin-bot bot commented Dec 3, 2023

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

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Dec 3, 2023
Copy link

melvin-bot bot commented Dec 3, 2023

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

@mkhutornyi
Copy link
Contributor

mkhutornyi commented Dec 3, 2023

Proposal

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

Three dots menu is missing in expense request header

What is the root cause of that problem?

New feature

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

In MoneyReportHeader, pass threeDotsMenuItems, shouldShowThreeDotsButton, threeDotsAnchorPosition props to HeaderWithBackButton

                threeDotsMenuItems={threeDotMenuItems}
                shouldShowThreeDotsButton
                threeDotsAnchorPosition={styles.threeDotsPopoverOffsetNoCloseButton(windowWidth)}

We can discuss what options to put but for now, Zoom and Google Meet is added

demo

Edit: (for pin / unpin option)

shouldShow: (type, reportAction, isArchivedRoom, betas, anchor, isChronosReport, reportID, isPinnedChat) =>
type === CONTEXT_MENU_TYPES.REPORT && !isPinnedChat && !ReportUtils.isMoneyRequestReport(reportID),

shouldShow: (type, reportAction, isArchivedRoom, betas, anchor, isChronosReport, reportID, isPinnedChat) =>
type === CONTEXT_MENU_TYPES.REPORT && isPinnedChat && !ReportUtils.isMoneyRequestReport(reportID),

Here, we should remove && !ReportUtils.isMoneyRequestReport(reportID) condition

And also add to threeDotMenuItems array. This logic can be copied from

threeDotMenuItems.push(HeaderUtils.getPinMenuItem(props.report));
if (isConcierge && props.guideCalendarLink) {
threeDotMenuItems.push({
icon: Expensicons.Phone,
text: translate('videoChatButtonAndMenu.tooltip'),
onSelected: Session.checkIfActionIsAllowed(() => {
Link.openExternalLink(props.guideCalendarLink);
}),
});
} else if (!isAutomatedExpensifyAccount && !isTaskReport && !isArchivedRoom) {
threeDotMenuItems.push({
icon: ZoomIcon,
text: translate('videoChatButtonAndMenu.zoom'),
onSelected: Session.checkIfActionIsAllowed(() => {
Link.openExternalLink(CONST.NEW_ZOOM_MEETING_URL);
}),
});
threeDotMenuItems.push({
icon: GoogleMeetIcon,
text: translate('videoChatButtonAndMenu.googleMeet'),
onSelected: Session.checkIfActionIsAllowed(() => {
Link.openExternalLink(CONST.NEW_GOOGLE_MEET_MEETING_URL);
}),
});
}

To hide pin when RBR shows, add && !hasBrickError to this condition:

{!shouldShowGreenDotIndicator && optionItem.isPinned && (

@yh-0218
Copy link
Contributor

yh-0218 commented Dec 3, 2023

Proposal

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

Three dots menu is missing in expense request header

What is the root cause of that problem?

We didn't handle Three dots menu on MoneyReportHeader

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

<HeaderWithBackButton

we need to add

     shouldShowThreeDotsButton
     threeDotsMenuItems={threeDotsMenuItems}
     threeDotsAnchorPosition={styles.threeDotsPopoverOffsetNoCloseButton(windowWidth)}

We can add more menu items

    const threeDotsMenuItems = [HeaderUtils.getPinMenuItem(moneyRequestReport)];
    if (!ReportUtils.isArchivedRoom(chatReport)) {
        threeDotsMenuItems.push({
            icon: ZoomIcon,
            text: translate('videoChatButtonAndMenu.zoom'),
            onSelected: Session.checkIfActionIsAllowed(() => {
                Link.openExternalLink(CONST.NEW_ZOOM_MEETING_URL);
            }),
        });
        threeDotsMenuItems.push({
            icon: GoogleMeetIcon,
            text: translate('videoChatButtonAndMenu.googleMeet'),
            onSelected: Session.checkIfActionIsAllowed(() => {
                Link.openExternalLink(CONST.NEW_GOOGLE_MEET_MEETING_URL);
            }),
        });
    }

What alternative solutions did you explore? (Optional)

Screenshot 2023-12-03 at 5 58 57 PM

@DylanDylann
Copy link
Contributor

DylanDylann commented Dec 3, 2023

Proposal

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

Expense report header is missing the three dots icon

What is the root cause of that problem?

We don't have logic to display three-dot button on the IOU/Expense Report

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

In MoneyReportHeader we should add 3 props: shouldShowThreeDotsButton, threeDotsMenuItems, threeDotsAnchorPosition

<HeaderWithBackButton

In threeDotsMenuItems, we add pin/unpin functionality as we did here

const threeDotsMenuItems = [HeaderUtils.getPinMenuItem(report)];

Note that, we also add pin/unpin functionality in the context menu (when right click to IOU/Expense report in LHN) for consistency by removing !ReportUtils.isMoneyRequestReport in both places

type === CONTEXT_MENU_TYPES.REPORT && isPinnedChat && !ReportUtils.isMoneyRequestReport(reportID),

type === CONTEXT_MENU_TYPES.REPORT && !isPinnedChat && !ReportUtils.isMoneyRequestReport(reportID),

In three dot, we also consider adding Zoom and Google meet options as we did here

} else if (!isAutomatedExpensifyAccount && !isTaskReport && !isArchivedRoom) {
threeDotMenuItems.push({
icon: ZoomIcon,
text: translate('videoChatButtonAndMenu.zoom'),
onSelected: Session.checkIfActionIsAllowed(() => {
Link.openExternalLink(CONST.NEW_ZOOM_MEETING_URL);
}),
});
threeDotMenuItems.push({
icon: GoogleMeetIcon,
text: translate('videoChatButtonAndMenu.googleMeet'),
onSelected: Session.checkIfActionIsAllowed(() => {
Link.openExternalLink(CONST.NEW_GOOGLE_MEET_MEETING_URL);
}),
});

In LHN Row we don't want to display 3 icons so that in here

{!shouldShowGreenDotIndicator && optionItem.isPinned && (
<View
style={styles.ml2}
accessibilityLabel={translate('sidebarScreen.chatPinned')}
>
<Icon src={Expensicons.Pin} />
</View>
)}

We also should hide pin icon if RBR appears by updating condition like this

                            {!shouldShowGreenDotIndicator && !hasBrickError && optionItem.isPinned && (

What alternative solutions did you explore? (Optional)

@kurakurasakti
Copy link

Proposal

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

Three dots menu on header is missing when open expense request.

What is the root cause of that problem?

missing 3 dots handler on MoneyReportHeader so when the component load, header doesn't read the condition

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

Send props to MoneyReportHeader and also the condition to show the 3 dots.

What alternative solutions did you explore? (Optional)

Copy link

melvin-bot bot commented Dec 4, 2023

📣 @kurakurasakti! 📣
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>

@kurakurasakti
Copy link

kurakurasakti commented Dec 4, 2023

Proposal

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

the 3 dots menu is missing in expense request header

What is the root cause of that problem?

You miss the handler of 3 dots. After the component loads, the header does not render the 3 dots.

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

you need to add handler to pass the In MoneyReportHeader components, pass threeDotsMenuItems, shouldShowThreeDotsButton, threeDotsAnchorPosition props

      // Shows border if no buttons or next steps are showing below the header
                shouldShowBorderBottom={!(shouldShowAnyButton && isSmallScreenWidth) && !(shouldShowNextSteps && !isSmallScreenWidth)}
                threeDotsMenuItems
                shouldShowThreeDotsButton
Screenshot 2023-12-04 at 18 23 44

What alternative solutions did you explore? (Optional)

@melvin-bot melvin-bot bot added the Overdue label Dec 6, 2023
@aimane-chnaif
Copy link
Contributor

reviewing proposals

@melvin-bot melvin-bot bot removed the Overdue label Dec 6, 2023
@aimane-chnaif
Copy link
Contributor

After internal discussion, here's the expected behavior

Options to show:

  • Pin / Unpin
  • Zoom
  • Google Meet

We don't like having three icons in a row, so when show GBR/RBR on pinned report, pin should be hidden

position

@mkhutornyi
Copy link
Contributor

Proposal

Updated

@DylanDylann
Copy link
Contributor

DylanDylann commented Dec 7, 2023

Updated proposal to cover this case:

when showing GBR/RBR on the pinned report, the pin should be hidden.

Just a note: My proposal is the first one that suggest do display pin option in three dots and Context menu of LHN Row

@mkhutornyi
Copy link
Contributor

It's easy & straightforward fix to add pin option in context menu.
I did not mention it originally because it was disabled intentionally in #20771 but now reverted back.
I clearly said: We can discuss what options to put but for now, Zoom and Google Meet is added

@yh-0218
Copy link
Contributor

yh-0218 commented Dec 7, 2023

I did mention all from first.

Copy link

melvin-bot bot commented Dec 10, 2023

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

@melvin-bot melvin-bot bot added Overdue and removed Overdue labels Dec 10, 2023
@aimane-chnaif
Copy link
Contributor

Thanks for the proposals everyone.
The issue is straightforward and I think we should go with @mkhutornyi who proposed first.
I understand there were some debates about pin option but I also thought pin should be disabled as this was bug originally, which led me to raise discussion on slack. So IMO it should not affect proposal selection.
Giving the final call to assigned engineer.
🎀 👀 🎀 C+ reviewed

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production labels Dec 21, 2023
@melvin-bot melvin-bot bot changed the title [$500] Expense report header is missing the three dots icon [HOLD for payment 2023-12-28] [$500] Expense report header is missing the three dots icon Dec 21, 2023
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Dec 21, 2023
Copy link

melvin-bot bot commented Dec 21, 2023

Reviewing label has been removed, please complete the "BugZero Checklist".

Copy link

melvin-bot bot commented Dec 21, 2023

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.14-6 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 2023-12-28. 🎊

After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.

  • External issue reporter
  • Contributor that fixed the issue
  • Contributor+ that helped on the issue and/or PR

For reference, here are some details about the assignees on this issue:

Copy link

melvin-bot bot commented Dec 21, 2023

BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:

  • [@aimane-chnaif] The PR that introduced the bug has been identified. Link to the PR:
  • [@aimane-chnaif] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment:
  • [@aimane-chnaif] A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion:
  • [@aimane-chnaif] Determine if we should create a regression test for this bug.
  • [@aimane-chnaif] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
  • [@kevinksullivan] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

@kevinksullivan
Copy link
Contributor

Hi @aimane-chnaif please complete the checklist above when you can!

@melvin-bot melvin-bot bot added Daily KSv2 Overdue and removed Weekly KSv2 labels Dec 27, 2023
@iwiznia
Copy link
Contributor

iwiznia commented Dec 29, 2023

Bump @aimane-chnaif

@melvin-bot melvin-bot bot removed the Overdue label Dec 29, 2023
@aimane-chnaif
Copy link
Contributor

This is not regression but design change.

We should update TestRail.
https://github.com/Expensify/Expensify/issues/298942
@iwiznia can you please help with it as I don't have access?

@iwiznia
Copy link
Contributor

iwiznia commented Dec 29, 2023

Ah ok, I can open the issue for you, but can you write down the contents please?

@aimane-chnaif
Copy link
Contributor

Regression Test Proposal

  1. Go to any IOU or expense report
  2. Verify that header has 3 dots menu icon in the top right
  3. Click on the icon
  4. Verify that Pin / Unpin, Zoom and Google Meet options show and they work properly
  5. Right click this report in LHN
  6. Verify that Pin / Unpin option shows and it works properly. If it shows GBR/RBR, verify that pin icon is hidden

@iwiznia
Copy link
Contributor

iwiznia commented Dec 29, 2023

Nice, is that a new test? I thought we needed to update one and if so, do you happen to know which?

@aimane-chnaif
Copy link
Contributor

I thought we needed to update one

I am not sure. https://github.com/Expensify/Expensify/issues/298942 doesn't have TestRail link?

@aimane-chnaif
Copy link
Contributor

Let's treat as new test case. I believe QA team will update TestRail properly

@iwiznia
Copy link
Contributor

iwiznia commented Dec 29, 2023

Ohh there's a link here did not see it 👍

@iwiznia
Copy link
Contributor

iwiznia commented Dec 29, 2023

@melvin-bot melvin-bot bot added the Overdue label Jan 1, 2024
Copy link

melvin-bot bot commented Jan 2, 2024

@iwiznia, @kevinksullivan, @aimane-chnaif, @mkhutornyi Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

Copy link

melvin-bot bot commented Jan 4, 2024

@iwiznia, @kevinksullivan, @aimane-chnaif, @mkhutornyi Huh... This is 4 days overdue. Who can take care of this?

@iwiznia
Copy link
Contributor

iwiznia commented Jan 5, 2024

@kevinksullivan ?

@melvin-bot melvin-bot bot added Overdue and removed Overdue labels Jan 5, 2024
@kevinksullivan
Copy link
Contributor

kevinksullivan commented Jan 8, 2024

payments made

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor
Projects
None yet
Development

No branches or pull requests

8 participants