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

[JENKINS-71148] avoid empty tooltips #8975

Merged
merged 2 commits into from
Feb 24, 2024

Conversation

mawinter69
Copy link
Contributor

@mawinter69 mawinter69 commented Feb 20, 2024

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:
image

After:
image

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

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.
Comment on lines 25 to 27
tooltip != null &&
tooltip.length > 0 &&
(htmlTooltip == null || htmlTooltip.length == 0)
Copy link
Member

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)

Copy link
Member

@daniel-beck daniel-beck left a 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 👍

Copy link
Member

@NotMyFault NotMyFault left a 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!

@comment-ops-bot comment-ops-bot bot added the ready-for-merge The PR is ready to go, and it will be merged soon if there is no negative feedback label Feb 21, 2024
@NotMyFault NotMyFault added the regression-fix Pull request that fixes a regression in one of the previous Jenkins releases label Feb 21, 2024
@daniel-beck
Copy link
Member

daniel-beck commented Feb 22, 2024

NotMyFault added the regression-fix label

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?

@mawinter69
Copy link
Contributor Author

I think it is a regression introduced with #6408 when YUI tooltips were replaced by tippy

@daniel-beck
Copy link
Member

daniel-beck commented Feb 22, 2024

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.

@NotMyFault NotMyFault added bug For changelog: Minor bug. Will be listed after features and removed regression-fix Pull request that fixes a regression in one of the previous Jenkins releases labels Feb 24, 2024
@NotMyFault NotMyFault merged commit 0675943 into jenkinsci:master Feb 24, 2024
17 checks passed
krisstern pushed a commit to krisstern/jenkins that referenced this pull request Mar 5, 2024
* [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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug For changelog: Minor bug. Will be listed after features ready-for-merge The PR is ready to go, and it will be merged soon if there is no negative feedback
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants