-
-
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-72170] fix nested hetero-list entries with mixture of inputs and buttons #8602
Conversation
when a plugin defines the hetero-list elements on its own and still uses an <input type="button"> element and an inner element is already using a hetero-list with a <button> element, then the old input wasn't converted to a button as the inner button was found first. Avoid this by converting all inputs to buttons before actually looking up the button. Recreate the hetero-list.js file to avoid the "No such adjunct found" warning message
The PR description does not address whether or not it is desired for plugins to include the hetero-list adjunct. If it is not desired, then the warning is justified and the plugins should be migrated. |
the file is not needed anymore and plugins can just remove the inclusion of the adjunct once they require Jenkins 2.422 or newer |
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.
Thank you for the quick fix and the thorough testing.
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 very much for the rapid response to the issue. I tested with a local build and confirmed that the case I had tested for JENKINS-72170 is resolved.
This PR is now ready for merge. We will merge it after approximately 24 hours if there is no negative feedback. /label ready-for-merge |
@@ -21,6 +21,23 @@ function generateHandles() { | |||
}); | |||
} | |||
|
|||
function convertInputsToButtons(e) { |
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.
should there be a deprecation warning logged to get developers to adapt code?
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.
@timja would you be OK if this were merged without the deprecation warning or would you strongly prefer that the deprecation warning be added before it is merged?
I'd like to be sure this is included in the next weekly so that it is a strong candidate for a backport to the Nov 15, 2023 LTS baseline.
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 merged with the assumption that we can add the deprecation message in a later pull request
… and buttons (jenkinsci#8602) * [JENKINS-72170] fix for nested-hetero-list entries when a plugin defines the hetero-list elements on its own and still uses an <input type="button"> element and an inner element is already using a hetero-list with a <button> element, then the old input wasn't converted to a button as the inner button was found first. Avoid this by converting all inputs to buttons before actually looking up the button. Recreate the hetero-list.js file to avoid the "No such adjunct found" warning message * remove hetero-list.js again (cherry picked from commit 97dde8f)
when a plugin defines the hetero-list elements on its own and still uses an
<input type="button">
element and an inner element is already using a hetero-list with a<button>
element, then the old input wasn't converted to a button as the inner button was selected as the target. Avoid this by converting all inputs to buttons before actually looking up the button.See JENKINS-72170.
Testing done
Manually tested as described in JENKINS-72170 that the button is working properly with this fix
Proposed changelog entries
Proposed upgrade guidelines
N/A
Submitter checklist
Desired reviewers
N/A
Before the changes are marked as
ready-for-merge
:Maintainer checklist
upgrade-guide-needed
label is set and there is a Proposed upgrade guidelines section in the pull request title (see example).lts-candidate
to be considered (see query).