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

Web - Inconsistent Realtime Updating of Padding and Margin in Tooltip for Long and Short Display Names #22112

Closed
1 of 6 tasks
kbecciv opened this issue Jul 3, 2023 · 6 comments
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2

Comments

@kbecciv
Copy link

kbecciv commented Jul 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!


Action Performed:

  1. Click on the plus sign ➕
  2. Select "Assign Task" and click "Next"
  3. Add a Title and click "Next"
  4. Click on Assign and add an email, then confirm tasks
  5. Go to settings > profile > Display name and enter a long name
  6. Refresh the page
  7. Hover over the image associated with the Task Title and observe that the name is written in one line
  8. Go to settings again > profile > Display name and enter a short name
  9. Hover over the image associated with the Task Title and observe that the padding and margin remain unchanged
  10. Write a message in the Task Assign section, hover over the image, and observe that the padding and margin tooltip when hovering over the message is different from the padding and margin associated with images for the Task title.

Expected Result:

The padding and margin should consistently update in real-time when entering a long or short name, without requiring a page refresh.

Actual Result:

The padding and margin do not consistently update in real-time when entering a long or short name, requiring a page refresh.

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.35-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

screen-capture.83.mp4
Recording.3379.mp4

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

View all open jobs on GitHub

@kbecciv kbecciv added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Jul 3, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jul 3, 2023

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

@melvin-bot
Copy link

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

@samh-nl
Copy link
Contributor

samh-nl commented Jul 3, 2023

Proposal

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

The size of the tooltip does not automatically change when the name changes, requiring a refresh to update its size.

What is the root cause of that problem?

The Tooltip component is used without utilizing the designated prop renderTooltipContentKey, making it not rerender and thus recompute the tooltip size when the displayName or other details change.

return <Tooltip renderTooltipContent={renderTooltipContent}>{props.children}</Tooltip>;

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

The renderTooltipContentKey prop must be applied, providing the userDisplayName as its value.

Also userLogin can be added into the prop to allow dynamically recomputing the size of the tooltip when this value changes.

What alternative solutions did you explore? (Optional)

Instead of changing renderTooltipContentKey (which causes a remount down the line), we can alternatively call updateBounds() inside the Tooltip component if userDisplayName (and userLogin) change by checking componentDidUpdate. A new prop would have to be added.

After fix:

tooltip-autoresize-fixed.mp4

EDIT: Added video of fixed result.

@bernhardoj
Copy link
Contributor

Same root cause #21622

@melvin-bot melvin-bot bot added the Overdue label Jul 5, 2023
@sakluger
Copy link
Contributor

sakluger commented Jul 5, 2023

Those do look like the same issue, I'm going to close this one in favor of #21622.

@sakluger sakluger closed this as completed Jul 5, 2023
@melvin-bot melvin-bot bot removed the Overdue label Jul 5, 2023
@tewodrosGirmaA
Copy link

Hi, @sakluger I initially reported this issue on June 15th at https://expensify.slack.com/archives/C049HHMV9SM/p1686843962847709. However, a corresponding GitHub issue was not created for me, and I didn't receive any response. Later on, I reported the same issue again after some time and this time the issue was created for me. I reported it before this report #21622" , Thank you

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

No branches or pull requests

5 participants