Introduce calculation of tooltip size basing on labels size and number of actions inside.
Some parts of this logic was in findTooltipPosition before
Details
Details
Flow; Tested with the rest of diffs stack.
Diff Detail
Diff Detail
- Repository
- rCOMM Comm
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
web/chat/tooltip-utils.js | ||
---|---|---|
50–52 ↗ | (On Diff #15855) | After web redesign we changed the fonts and now our font stack looks like: :root { --font-stack: 'Inter', -apple-system, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', ui-sans-serif; So update here is necessary to calculate the size correctly |
web/chat/tooltip-utils.js | ||
---|---|---|
50–52 ↗ | (On Diff #15855) | We can consider reading this from the stylesheet by using getComputedStyle with getPropertyValue. Not sure if this approach will work with SSR, but it might be a good solution to avoid the issue in the future. Another option is to modify calculateTooltipSize to always use the default font - we always call this function with it, but that would make it less reusable. |