LuccaSA / lucca-front

documentation
https://prisme.lucca.io
MIT License
40 stars 4 forks source link

fix(tooltip): too many reflows #3225

Closed GuillaumeNury closed 1 week ago

GuillaumeNury commented 1 week ago

Description

Each time a width is read after a class has been added or the dom has been updated, the browser recompute all layers (reflow). Before this PR, this occured twice per tooltip. Now, this append twice, whatever number of tooltip is appended at the same time.

Before:

image

After:

image

Optionally, technical or more in-depth description for reviewers. Keep an empty line under your text, as well as the 5 lines that follow it.


LuccaIntegration commented 1 week ago

:woman_cook: https://lucca-front.lucca.tech/PR-3225/storybook

jeremie-lucca commented 1 week ago

@GuillaumeNury Tooltips on buttons seem to be down (e.g. this story or this one). Could it be related to this PR ?

LuccaIntegration commented 1 week ago

:woman_cook: https://lucca-front.lucca.tech/PR-3225/storybook

LuccaIntegration commented 1 week ago

:woman_cook: https://lucca-front.lucca.tech/PR-3225/storybook