HomePhabricator
Diffusion Comm a9c88c6930e8

[web] introduce useNavigationSidebarTooltip hook

Description

[web] introduce useNavigationSidebarTooltip hook

Summary:
This diff introduces the useNavigationSidebarTooltip hook. Every tooltip has a hook similar to this that will calculate the size of the tooltip, create the tooltip instance and return the onMouseEnter + onMouseLeave callbacks that we will pass to the elements in the navigation sidebar that have tooltips. For context on how we use these hooks to build tooltips here are the useReactionSidebarTooltip hook and useMessageTooltip.

https://github.com/CommE2E/comm/blob/master/web/utils/tooltip-action-utils.js#L446

https://github.com/CommE2E/comm/blob/master/web/utils/tooltip-action-utils.js#L391

Part of https://linear.app/comm/issue/ENG-5948/hovering-over-every-clickable-element-in-this-sidebar-will-have-a

Depends on D10357

Test Plan:
Please see demo video below

Reviewers: atul, rohan, kamil

Reviewed By: atul

Subscribers: ashoat, tomek

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

Details

Provenance
ginsuAuthored on Dec 14 2023, 3:30 PM
Reviewer
atul
Differential Revision
D10358: [web] introduce useNavigationSidebarTooltip hook
Parents
rCOMM691bfa88551e: [web] introduce calculateNavigationSidebarTooltipSize
Branches
Unknown
Tags
Unknown