-
-
Notifications
You must be signed in to change notification settings - Fork 8.9k
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-73563] create a jenkins-button instead of a yui button in makeButton #9511
Conversation
makeButton is one of the last places in core were YUI is used. This method is called by a few plugins directly but also when plugins create inputs of type button with class `submit-button` or `yui-button`. Frequently they then also attach an onclick handler. This change will replace the input with a button with class `jenkins-button` on the fly. Looking at the code of several plugins that rely on the behaviour it seems they will not be affected by this change.
@@ -913,47 +913,68 @@ function escapeHTML(html) { | |||
* YUI Button widget. | |||
*/ | |||
function makeButton(e, onclick) { |
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.
docs above could do with an update as it no longer is a YUI button
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.
code lgtm, will approve once i've had time to manually test it
ath is passing |
Co-authored-by: Kevin Guerroudj <91883215+Kevin-CB@users.noreply.github.com>
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.
Thanks for the change, LGTM security wise
/label ready-for-merge This PR is now ready for merge, after ~24 hours, we will merge it if there's no negative feedback. Thanks! |
Breaks PCT:
I am reverting this commit so that the 2.472 weekly release can be delivered tomorrow with Jetty 12 (EE 8) and without PCT failures. This can be reintegrated when there are no PCT failures. |
I've temporarily added the |
Seems that htmlunit doesn't support the |
See JENKINS-73563
makeButton is one of the last places in core were YUI is used. This method is called by a few plugins directly but also when plugins create inputs of type button or submit with class
submit-button
oryui-button
. Frequently they then also attach an onclick handler.This change will replace the input with a button with class
jenkins-button
on the fly.Looking at the code of several plugins that rely on the behaviour it seems they will not be affected by this change (tested with shelve-plugin)
credentials plugin works with the returned YUI object and try to set the button to disabled or get the associated form, for this case a small wrapper is added that implements the 2 methods and credentials plugin still works without problems.
There is PR open for credentials that cleans up the code and removes yui usage
(Another usage affects the multi-slave-config plugin which is deprecated and not usable anyway due to prototype usage)
See https://docs.google.com/spreadsheets/d/1UjvtFmNmEdjMN5DUoFxJfBryA8q-E5_HwOzVKbVG9b0/edit?usp=sharing for a complete list of plugins that use makeButton directly or indirectly.
Need to test if ath needs to be adjusted
Testing done
Manual testing
Proposed changelog entries
Proposed upgrade guidelines
N/A
Submitter checklist
Desired reviewers
@mention
Before the changes are marked as
ready-for-merge
:Maintainer checklist