-
Notifications
You must be signed in to change notification settings - Fork 68
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 tooltips with Tippy.js #120
Conversation
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.
I tested on 2.277.1 and with jenkinsci/jenkins#6408
Works fine and looks much better with the new core PR
Yes
Use |
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.
Checking and unchecking a checkbox takes seconds to apply. There needs to be a better solution than this.
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.
Checking and unchecking a checkbox takes seconds to apply. There needs to be a better solution than this.
(I forgot that I restarted with 2.345 rather than the incremental, so everything was fast 😑)
src/main/java/org/jenkinsci/plugins/matrixauth/AuthorizationContainerDescriptor.java
Outdated
Show resolved
Hide resolved
data-message-empty="${%groupEmpty}" | ||
data-message-error="${%groupError}" | ||
/> | ||
<div class="jenkins-!-margin-top-2"> |
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.
minor spacing fix, can extract if needed
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.
Is this CSS class one that I can rely on existing in the future?
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.
Yes it's a stable API, documented at:
https://weekly.ci.jenkins.io/design-library/Spacing/
<f:helpLink featureName="${%Permissions matrix}" url="${descriptor.find('hudson.security.GlobalMatrixAuthorizationStrategy$DescriptorImpl').getHelpFile('user-group')}"/> | ||
<f:helpArea /> |
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.
fixes display of help link if ambiguous warning is on the page
Nice, the current state no longer opens the browser built-in tooltip after clicking a checkbox. Is it necessary to have the tooltips interactable? With a grid like matrix-auth's, it's annoying to move the pointer up and rather than disappear and allowing me to interact with the row of checkboxes, the tooltip is now itself the hovered element (and I can select text etc. from it). |
hmm on the demo on https://atomiks.github.io/tippyjs/ it doesn't do that, looking I assume it's the For some reason only the |
src/main/resources/hudson/security/GlobalMatrixAuthorizationStrategy/config.jelly
Show resolved
Hide resolved
tested and yes it's that, it behaves how you expect without it, asked on https://github.com/jenkinsci/jenkins/pull/6408/files#r863493271 |
@daniel-beck any chance of another review please, thanks! |
Heya @daniel-beck, any update on this? Cheers :) |
TIL this is blocking the core fix. Sorry about that. |
That didn't survive a code reorg in the core PR: #130 (comment) |
if (window.registerTooltips) { | ||
window.registerTooltips(e.nextSibling.parentElement); | ||
} |
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.
What was the purpose of this? It doesn't work since jenkinsci/jenkins#7464 renamed the method, and the other occurrence of registerTooltips
was fixed up in #130, but this code still exists.
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.
I think it was fixed in core itself with behaviour and then applying subtree here.
the purpose was so that when checkboxes were dynamically added they would have tippy run on this but it was fixed in another way...
This PR fixes tooltips for Jenkins #6408 which replaces YUI tooltips with Tippy.js ones.
Essentially the fix is to reregister the tooltips once a new item has been added otherwise Tippy won't know about the new element.
Thanks @timja :)