logto icon indicating copy to clipboard operation
logto copied to clipboard

Support vertical center in `usePosition` hook

Open charIeszhao opened this issue 1 year ago • 2 comments

In Logto admin console, the usePosition hook is used in popover-ish components (tooltip, dropdown, etc.) to help locate their render positions relative to their parent component. Currently the supported alignments in the hook are:

  • Horizontal: left, center, right
  • Vertical: top, bottom

We would like to add vertical center support to the hook, so that we will be able to implement tooltips that pop up sideways with a tail pointing to the vertical center of its parent. For example:

image

charIeszhao avatar Sep 01 '22 06:09 charIeszhao

Can i be assigned to this?

FlurryNight avatar Sep 02 '22 02:09 FlurryNight

@FlurryNight go ahead

gao-sun avatar Sep 02 '22 06:09 gao-sun

@FlurryNight Hi, any updates on this one? Let me know if you have any blocker and we can work this out together. Ping me on discord if you need anything

charIeszhao avatar Sep 19 '22 01:09 charIeszhao

@FlurryNight Hi, any updates on this one? Let me know if you have any blocker and we can work this out together. Ping me on discord if you need anything

Hi, sorry for the delay. I didn't get it right and now I'll be busy for a while, but I managed to do a little, if it doesn't bother you I can show you how it is, I didn't quite understand the behavior of the hook

FlurryNight avatar Sep 19 '22 20:09 FlurryNight