-
-
Notifications
You must be signed in to change notification settings - Fork 8.8k
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
[JENKINS-71148] avoid empty tooltips #8975
Conversation
when the tooltip or html tooltip is empty or whitespace only it is avoided that the tippy is invoked at all which would otherwise just display a small but empty element.
tooltip != null && | ||
tooltip.length > 0 && | ||
(htmlTooltip == null || htmlTooltip.length == 0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you doing null
checks deliberately not with ===
etc? (Curiosity more than request for change)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems to work well, thanks 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/label ready-for-merge
This PR is now ready for merge. We will merge it after ~24 hours if there is no negative feedback.
Please see the merge process documentation for more information about the merge process.
Thanks!
IMO not a regression. The tooltip that #8972 addresses has been empty since it was added in 2.220, with the problem existing probably far longer. If you disagree, what release introduced the regression? |
I think it is a regression introduced with #6408 when YUI tooltips were replaced by tippy |
That was merged in 2.380. Note the screenshot in my issue that I took in 2.220 (and that's just when that tooltip was added). So at least that specific instance is far older. |
* [JENKINS71148] avoid empty tooltips when the tooltip or html tooltip is empty or whitespace only it is avoided that the tippy is invoked at all which would otherwise just display a small but empty element. * better null checks (cherry picked from commit 0675943)
when the tooltip or html tooltip attribute is empty or whitespace only it is avoided that tippy is invoked at all which would otherwise just display a small but empty element.
Before:
After:
See JENKINS-71148.
Solves also JENKINS-72743 but in a generic way that also avoids empty tooltips in other places.
see also #8972
Testing done
Proposed changelog entries
Proposed upgrade guidelines
N/A
Submitter checklist
Desired reviewers
@mention
Before the changes are marked as
ready-for-merge
:Maintainer checklist