Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(ui): fixing run overview truncated tag tooltips on hover #3212

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

ArtsiomWB
Copy link

@ArtsiomWB ArtsiomWB commented Dec 11, 2024

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:

  • Adding another tag, or
  • Removing any tag

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?

@ArtsiomWB ArtsiomWB requested review from a team as code owners December 11, 2024 23:39
Copy link
Contributor

CLA Assistant Lite bot:
Thank you for your submission, we really appreciate it. Like many open-source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution. You can sign the CLA by just posting a Pull Request Comment same as the below format.


I have read the CLA Document and I hereby sign the CLA


You can retrigger this bot by commenting recheck in this Pull Request

weave-js/src/components/Tag/Tag.tsx Outdated Show resolved Hide resolved
weave-js/src/components/Tag/TagTooltip.tsx Outdated Show resolved Hide resolved
Copy link
Contributor

@onx2 onx2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

one nit, but non-blocking - nice work!

weave-js/src/components/Tag/Tag.tsx Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants