HomePhabricator
Diffusion Comm e2a2434b7642

[web] introduce getTooltipScreenOverflowRightCorrection function

Description

[web] introduce getTooltipScreenOverflowRightCorrection function

Summary:
As I was doing some final tests for the ReactionTooltip, I noticed a scenario where the reaction tooltip for the most right reaction pill of a viewer message was overflowing off the screen if the tooltip was at its maxWidth. To address this I created a helper function which calculates the overFlow and shifts the tooltip x anchor point

Depends on D8859

Test Plan:
Please see the screenshots below

Before:

Screenshot 2023-08-17 at 9.45.59 PM.png (2×3 px, 1 MB)

Screenshot 2023-08-17 at 9.45.51 PM.png (2×3 px, 1 MB)

After:

Screenshot 2023-08-17 at 10.52.48 PM.png (2×3 px, 1 MB)

Screenshot 2023-08-17 at 10.52.36 PM.png (2×3 px, 1 MB)

Reviewers: atul, kamil

Reviewed By: kamil

Subscribers: ted, ashoat, tomek

Differential Revision: https://phab.comm.dev/D8860

Details

Provenance
ginsuAuthored on Aug 17 2023, 6:51 PM
Reviewer
kamil
Differential Revision
D8860: [web] introduce getTooltipScreenOverflowRightCorrection function
Parents
rCOMM7c47bc1c71ab: [web] introduce useReactionTooltip hook
Branches
Unknown
Tags
Unknown