fix(activity): keep tooltips within viewport (@ahamSel) - #8324
Conversation
|
hi @ahamSel , thank you for your contribution. The problem still exists for tooltips close to the edge on small screens on both sides:
|
|
Thanks for pointing this out. I replaced the final-week alignment with viewport-edge detection on both sides. The tooltip box now shifts inward only when needed while its arrow stays centered over the hovered day; the text also scales modestly and wraps on narrow screens. I verified the behavior manually at small viewport widths. |
Screen.Recording.2026-08-14.at.12.53.19.movSomething expensive is running on resize because its very slow. |
37ebbbf to
117873f
Compare
|
Thanks for catching this. The tooltip library's I limited the tooltip transitions to opacity and transform. The sizing transitions are now gone, while the tooltip fade, edge positioning, and centered arrow remain. I checked the left, middle, and right tooltips at narrow and wide viewport widths and ran the existing calendar tests (29 passed), formatting, and lint checks. Also rebased onto current master. I also tested by dragging the browser window narrower and wider, and resizing now feels smooth. |


Description
Activity-calendar tooltips could be clipped when their trigger day was close to either viewport edge, particularly on small screens.
This update measures each tooltip when it is shown and shifts only the tooltip box far enough to keep it inside an 8 px viewport margin. The arrow stays centered over the hovered day. Tooltip text also scales modestly on narrow viewports and wraps when needed.
Only opacity and transform animate, preventing responsive tooltip sizing from starting animations for every calendar day during resize.
Closes #8240