You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I don’t believe there’s need for the Truncate component to be calculating whether or not to include the tooltip upfront or even on resize. The tooltip is only shown either on mouse over or on focus. Therefore it should be possible to remove the resize observer.
Furthermore, this component unmounts the children whenever the truncation state changes instead of simply marking the tooltip as hidden.
It would seem to me that a lot of performance could be gained here if a page contains many Truncate components susceptible to resizing.
How do you reproduce the problem?
Visit https://www.patternfly.org/components/truncate#default
Using inspector dev tools, to track react component re-renders.
Drag the bounding box of the truncated text such that all the text is shown and then back to truncated.
Observe the component remounts every time the threshold is met.
Expected behavior
Unless the content changes, the component shouldn't remount.
Is this issue blocking you?
No
What is your environment?
OS: mac
Browser chrome
Version 127
What is your product and what release date are you targeting?
RHOAI
Any other information?
The text was updated successfully, but these errors were encountered:
Describe the problem
I don’t believe there’s need for the
Truncate
component to be calculating whether or not to include the tooltip upfront or even on resize. The tooltip is only shown either on mouse over or on focus. Therefore it should be possible to remove the resize observer.Furthermore, this component unmounts the children whenever the truncation state changes instead of simply marking the tooltip as hidden.
It would seem to me that a lot of performance could be gained here if a page contains many
Truncate
components susceptible to resizing.How do you reproduce the problem?
Visit https://www.patternfly.org/components/truncate#default
Using inspector dev tools, to track react component re-renders.
Drag the bounding box of the truncated text such that all the text is shown and then back to truncated.
Observe the component remounts every time the threshold is met.
Expected behavior
Unless the content changes, the component shouldn't remount.
Is this issue blocking you?
No
What is your environment?
What is your product and what release date are you targeting?
RHOAI
Any other information?
The text was updated successfully, but these errors were encountered: