HomePhabricator
Diffusion Comm 1e7bfece5f6a

[web] extend navigation sidebar tooltip api

Description

[web] extend navigation sidebar tooltip api

Summary:
In the new community header/topbar, we will be introducing some buttons that when hovered, a tooltip will be rendered below the element at a smaller margin (16px instead of 24px). At the moment, the only direction the navigation sidebar tooltip can go is right with 24px of margin. So this diff extends the api of the navigation sidebar tooltip to take in a tooltip position and a margin size and will render the navigation sidebar tooltip based off these new parameters.

Also please note, I am aware naming this component a navigation sidebar tooltip is probably now a bit dated, but in the very next diff I will update the name of this component to be something more generic

For context here is what the buttons on the community header/topbar will look like:

Screenshot 2023-12-28 at 12.39.47 AM.png (568×596 px, 36 KB)

Depends on D10471

Test Plan:
Please see the screenshots below. Also witch each example below I confirmed that the tooltip size returned by calculateNavigationSidebarTooltipSize correctly matched the size of the element

right w/ 16px of margin

Screenshot 2023-12-28 at 12.44.59 AM.png (222×390 px, 13 KB)

left w/24 px of margin

Screenshot 2023-12-28 at 12.45.28 AM.png (322×354 px, 18 KB)

top w/ 24px of margin

Screenshot 2023-12-28 at 12.46.23 AM.png (302×432 px, 18 KB)

bottom w/ 16px of margin

Screenshot 2023-12-28 at 12.47.01 AM.png (300×308 px, 17 KB)

Reviewers: atul, rohan, kamil

Reviewed By: atul

Subscribers: ashoat, tomek

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

Details

Provenance
ginsuAuthored on Dec 27 2023, 8:04 PM
Reviewer
atul
Differential Revision
D10472: [web] extend navigation sidebar tooltip api
Parents
rCOMM76943624a5ef: [web] introduce AppList
Branches
Unknown
Tags
Unknown