fix(ui): fixing run overview truncated tag tooltips on hover #3212
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
There's an issue with tag tooltips on the run overview page. When a tag's text is too long and gets truncated, users should be able to hover over it to see the full text in a tooltip. However, the tooltip functionality is currently inconsistent.
Currently, there's an issue with the tooltip behavior:
The tooltip for a tag only appears after either:
Before these actions, the first tag's tooltip doesn't show up after truncation at all.
Screen.Recording.2024-12-11.at.4.27.01.PM.mov
With my changes below and adding it a state, the tool tips show up on the tags right as you load in the overivew page
Screen.Recording.2024-12-11.at.4.30.44.PM.mov
The PR adds useState:
const [isTruncated, setIsTruncated] = useState(false);
to track and make sure that the tag is truncated. That after the tag has been truncated without any elements of the UI being edited, the page remembers and displays the tooltip of the truncated tag right away.
Testing
How was this PR tested?