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-08-02] [$1000] Web - Tooltip not visible for task assignee #21713

Closed
1 of 6 tasks
kbecciv opened this issue Jun 27, 2023 · 55 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

@kbecciv
Copy link

kbecciv commented Jun 27, 2023

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


Action Performed:

  1. Create a task
  2. Assign it to some one
  3. Go to task page
  4. Take the cursor to assignee
  5. Not tooltip

Expected Result:

Tooltip should be shown

Actual Result:

Tooltip not present

Workaround:

Unknown

Platforms:

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

  • Android / native
  • Android / Chrome
  • iOS / native
  • iOS / Safari
  • MacOS / Chrome / Safari
  • MacOS / Desktop

Version Number: 1.3.30-5
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
Notes/Photos/Videos: Any additional supporting documentation

task.assignee.-.tooltip.-.Made.with.Clipchamp.1.mp4
Desktop.2023.06.26.-.21.32.33.22.1.mp4

Expensify/Expensify Issue URL:
Issue reported by: @BhuvaneshPatil
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1687543065679319

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01e9a87fc35eb2547b
  • Upwork Job ID: 1673818558264049664
  • 2023-07-19
  • Automatic offers:
    • s77rt | Reviewer | 25687409
    • StevenKKC | Contributor | 25687411
    • BhuvaneshPatil | Reporter | 25687413
@kbecciv kbecciv added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Jun 27, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jun 27, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Jun 27, 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

@StevenKKC
Copy link
Contributor

StevenKKC commented Jun 27, 2023

Proposal

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

Tooltip not visible for task assignee.

What is the root cause of that problem?

In task view, the task assignee is shown using MenuItem, and MenuItem uses Avatar.

{props.report.managerID ? (
<MenuItem
label={props.translate('task.assignee')}
title={ReportUtils.getDisplayNameForParticipant(props.report.managerID)}
icon={UserUtils.getAvatar(avatarURL, props.report.managerID)}
iconType={CONST.ICON_TYPE_AVATAR}
avatarSize={CONST.AVATAR_SIZE.SMALLER}
titleStyle={styles.assigneeTextStyle}
onPress={() => Navigation.navigate(ROUTES.getTaskReportAssigneeRoute(props.report.reportID))}
shouldShowRightIcon={isOpen}
disabled={!isOpen}
wrapperStyle={[styles.pv2]}
isSmallAvatarSubscriptMenu
shouldGreyOutWhenDisabled={false}
/>

{props.iconType === CONST.ICON_TYPE_AVATAR && (
<Avatar
imageStyles={[styles.alignSelfCenter]}
source={props.icon}
fallbackIcon={props.fallbackIcon}
size={props.avatarSize || CONST.AVATAR_SIZE.DEFAULT}
/>
)}

Avatar does not support Tooltip, so tooltip for task assignee is not shown.

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

We can wrap Avatar with UserDetailsTooltip.

Add tooltipAccountID prop to MenuItem

    tooltipAccountID: PropTypes.number,
    tooltipAccountID: 0,

Pass task assignee's id in TaskView in this line.

<MenuItem
    ...
    tooltipAccountID={props.report.managerID}
/>

And in MenuItem, check tooltipAccountID. If tooltipAccountID is valid, then wrap Avatar with UserDetailsTooltip as below.

    {props.iconType === CONST.ICON_TYPE_AVATAR && (
        props.tooltipAccountID !== 0 ? (
            <UserDetailsTooltip accountID={props.tooltipAccountID}>
                <View>
                    <Avatar
                        imageStyles={[styles.alignSelfCenter]}
                        source={props.icon}
                        fallbackIcon={props.fallbackIcon}
                        size={props.avatarSize || CONST.AVATAR_SIZE.DEFAULT}
                    />
                </View>
            </UserDetailsTooltip>
        ) : (
            <Avatar
                imageStyles={[styles.alignSelfCenter]}
                source={props.icon}
                fallbackIcon={props.fallbackIcon}
                size={props.avatarSize || CONST.AVATAR_SIZE.DEFAULT}
            />
        )
    )}

What alternative solutions did you explore? (Optional)

In task view, the task assignee is displayed using MenuItem.
MenuItem support tooltip, but we does not provide proper information.

{Boolean(props.icon) && _.isArray(props.icon) && (
<MultipleAvatars
isHovered={isHovered}
isPressed={pressed}
icons={props.icon}
size={CONST.AVATAR_SIZE.DEFAULT}
secondAvatarStyle={[
StyleUtils.getBackgroundAndBorderStyle(themeColors.sidebar),
pressed ? StyleUtils.getBackgroundAndBorderStyle(themeColors.buttonPressedBG) : undefined,
isHovered && !pressed ? StyleUtils.getBackgroundAndBorderStyle(themeColors.border) : undefined,
]}
/>
)}

As you can see, if we provide icon prop with array type, MenuItem display avatar using MultipleAvatars, and MultipleAvatars support tooltip.

  • Pass assigneeTooltipIcon to MenuItem in this line as below.
    <MenuItem
        ...
        icon={OptionsListUtils.getAvatarsForAccountIDs([props.report.managerID], props.personalDetails)}
        ...
    />

In MenuItem, we should pass proper avatar size in this line.

    <MultipleAvatars
        ...
        size={props.avatarSize || CONST.AVATAR_SIZE.DEFAULT}
        ...
    />

Because MultipleAvatars avatar container style is different with single avatar, so we should adjust avatar container style in this line.

    if (props.icons.length === 1 && !props.shouldStackHorizontally) {
        if (props.size === CONST.AVATAR_SIZE.SMALLER) {
            avatarContainerStyles = [styles.emptyAvatarSmaller, styles.emptyAvatarMargin];
        }
        return (		

And add styles.emptyAvatarSmaller to styles.js as below.

    emptyAvatarSmaller: {
        height: variables.avatarSizeSmaller,
        width: variables.avatarSizeSmaller,
    },

@jliexpensify
Copy link
Contributor

I can replicate on Staging v32-5, even with a user with a name (which should have a tooltip):

2023-06-28_08-18-22.mp4

@jliexpensify jliexpensify added the External Added to denote the issue can be worked on by a contributor label Jun 27, 2023
@melvin-bot melvin-bot bot changed the title Web - Tooltip not visible for task assignee [$1000] Web - Tooltip not visible for task assignee Jun 27, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jun 27, 2023

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

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

melvin-bot bot commented Jun 27, 2023

Current assignee @jliexpensify is eligible for the External assigner, not assigning anyone new.

@melvin-bot
Copy link

melvin-bot bot commented Jun 27, 2023

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

@jeet-dhandha
Copy link
Contributor

I would suggest we hold this issue or close it as we are redesigning task details page.
#19330

@phuchoang23
Copy link
Contributor

phuchoang23 commented Jun 28, 2023

Proposal

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

Tooltip not visible for task assignee

What is the root cause of that problem?

We don't wrap task assignee with Tooltip component
I see we use Tooltip component for other pages so I think we should reuse this component

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

Wrap task assignee with Tooltip component

More details:

<View style={[styles.flexRow, styles.alignItemsCenter, styles.justifyContentBetween]}>
  {props.report.managerEmail && (
       <>
            <Tooltip text={assigneeName}>
                  <Avatar
                      source={assigneeAvatar}
                      type={CONST.ICON_TYPE_AVATAR}
                      name={assigneeName}
                      size={CONST.AVATAR_SIZE.HEADER}
                   />
             </Tooltip>
              <View style={[styles.flexColumn, styles.ml3]}>
                  <Text
                       style={[styles.headerText, styles.pre]}
                       numberOfLines={1}
                   >
                       {assigneeName}
                   </Text>
               </View>
         </>
   )}
</View>

Result:
Screen Shot 2023-06-28 at 4 54 14 PM

@s77rt
Copy link
Contributor

s77rt commented Jun 28, 2023

I have asked here #19330 (comment) whether we should put this one on hold or proceed

@s77rt
Copy link
Contributor

s77rt commented Jun 28, 2023

Looks we should put this on hold. cc @jliexpensify

@jliexpensify jliexpensify changed the title [$1000] Web - Tooltip not visible for task assignee [HOLD FOR #19330][$1000] Web - Tooltip not visible for task assignee Jul 3, 2023
@melvin-bot melvin-bot bot added the Overdue label Jul 3, 2023
@s77rt
Copy link
Contributor

s77rt commented Jul 3, 2023

Still on hold

@melvin-bot melvin-bot bot added Overdue and removed Overdue labels Jul 3, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jul 7, 2023

@s77rt, @jliexpensify Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

@s77rt
Copy link
Contributor

s77rt commented Jul 7, 2023

Still on hold

@melvin-bot melvin-bot bot removed the Overdue label Jul 7, 2023
@jliexpensify jliexpensify added Weekly KSv2 and removed Daily KSv2 labels Jul 9, 2023
@jliexpensify
Copy link
Contributor

Dropping to Weekly since we're on hold.

@s77rt
Copy link
Contributor

s77rt commented Jul 21, 2023

@StevenKKC Thanks for the update. I think we can go with your proposal as it was the first complete one.

🎀 👀 🎀 C+ reviewed
Link to proposal

@melvin-bot
Copy link

melvin-bot bot commented Jul 21, 2023

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

@BhuvaneshPatil
Copy link
Contributor

thanks for the update @s77rt , on to the next bug hunting. Good luck @StevenKKC .

@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Jul 22, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jul 22, 2023

📣 @s77rt 🎉 An offer has been automatically sent to your Upwork account for the Reviewer role 🎉 Thanks for contributing to the Expensify app!

Upwork job

@melvin-bot
Copy link

melvin-bot bot commented Jul 22, 2023

📣 @StevenKKC 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app!

Upwork job
Please accept the offer and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑‍💻
Keep in mind: Code of Conduct | Contributing 📖

@melvin-bot
Copy link

melvin-bot bot commented Jul 22, 2023

📣 @BhuvaneshPatil 🎉 An offer has been automatically sent to your Upwork account for the Reporter role 🎉 Thanks for contributing to the Expensify app!

Upwork job

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 labels Jul 24, 2023
@StevenKKC
Copy link
Contributor

@s77rt PR is ready for review.

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Jul 26, 2023
@melvin-bot melvin-bot bot changed the title [$1000] Web - Tooltip not visible for task assignee [HOLD for payment 2023-08-02] [$1000] Web - Tooltip not visible for task assignee Jul 26, 2023
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Jul 26, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jul 26, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Jul 26, 2023

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.45-7 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-08-02. 🎊

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:

As a reminder, here are the bonuses/penalties that should be applied for any External issue:

  • Merged PR within 3 business days of assignment - 50% bonus
  • Merged PR more than 9 business days after assignment - 50% penalty

@melvin-bot
Copy link

melvin-bot bot commented Jul 26, 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:

  • [@s77rt] The PR that introduced the bug has been identified. Link to the PR:
  • [@s77rt] 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:
  • [@s77rt] 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:
  • [@s77rt] Determine if we should create a regression test for this bug.
  • [@s77rt] 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.
  • [@jliexpensify] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

@s77rt s77rt mentioned this issue Jul 26, 2023
57 tasks
@s77rt
Copy link
Contributor

s77rt commented Jul 26, 2023

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Aug 1, 2023
@jliexpensify
Copy link
Contributor

Payment summary:

Upwork job

Is that all correct? It looks like this was merged in a day

@s77rt
Copy link
Contributor

s77rt commented Aug 3, 2023

@jliexpensify Looks correct!

@jliexpensify
Copy link
Contributor

Everyone's paid and job removed, thanks!

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

9 participants