-
-
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-73114] avoid conflicts with css classes from bootstrap #9254
Conversation
jenkins and bootstrap both have definitions for alert and alert-warning, alert-info, alert-danger. Bootstrap css definitions are included when e.g. the warning-ng plugin is installed and a job is configured to scan for warnings. The css classes from bootstrap are then chosen instead of the ones for Jenkins for things like the admin monitors. To make things umambiguous, add additional classes prefixed with `jenkins-` and make use of them in code. Keep the old definitions for backward compatibility with plugins. Followup changes are needed in plugins (Mostly those that define admin monitors) and the design-library
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!
/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!
Can you create a PR for the design library to adapt to this please? |
done |
@mawinter69 can you also identify the plugins that need to be updated to use the new CSS classes? I think it is better to complete the migration from the old CSS classes to the new CSS classes in the most popular plugins. |
Should this maybe downported to LTS 2.452.2? Otherwise it will take quite a while until it arrives in an LTS. Plugins would otherwise need to use weekly 2.459. Specifying both the old and new classes doesn't help when bootstrap loaded so it can't really be made forward compatible |
I Identified following plugins making use of the any of the alert-* classes. That doesn't necessarily mean they need to be adjusted, e.g. pipeline-stage-view seems to have a bootstrap3 included and relies on the definitions there. active-directory |
Thanks @mawinter69 ! Is it valid CSS to refer to a CSS class that does not exist? For example, the branch-api plugin today has a line:
Could that be extended to:
and still be usable on Jenkins versions that don't yet include the new CSS classes? |
That would be valid (Jenkins is using all over the place classes without a corresponding css definition to be able to select things in queries). Though only by removing
that should become |
…insci#9254) * [JENKINS-73114] avoid conflict of css classes with bootstrap jenkins and bootstrap both have definitions for alert and alert-warning, alert-info, alert-danger. Bootstrap css definitions are included when e.g. the warning-ng plugin is installed and a job is configured to scan for warnings. The css classes from bootstrap are then chosen instead of the ones for Jenkins for things like the admin monitors. To make things umambiguous, add additional classes prefixed with `jenkins-` and make use of them in code. Keep the old definitions for backward compatibility with plugins. Followup changes are needed in plugins (Mostly those that define admin monitors) and the design-library * fix test (cherry picked from commit 90a6ac5)
…ap (jenkinsci#9254)" This reverts commit b87adb7.
…ap" on `stable-2.452` (#9409) Revert "[JENKINS-73114] avoid conflicts with css classes from bootstrap (#9254)" This reverts commit b87adb7.
jenkins and bootstrap both have definitions for
alert
andalert-warning
,alert-info
andalert-danger
. Bootstrap css definitions are included when e.g. the warning-ng plugin is installed and a job is configured to scan for warnings. The css classes from bootstrap are then chosen instead of the ones for Jenkins for things like the admin monitors. To make things unambiguous, add additional classes prefixed withjenkins-
and make use of them in code. Keep the old definitions for backward compatibility with plugins.Follow-up changes are needed in plugins (Mostly those that define admin monitors) and the design-library
After:
for a plugin message:
for a core message:
See JENKINS-73114.
Originally reported as jenkinsci/customizable-header-plugin#99
Testing done
Manual testing
/manage/
-> monitors are displayed properlyProposed changelog entries
Proposed upgrade guidelines
N/A
Submitter checklist
Desired reviewers
@mention
Before the changes are marked as
ready-for-merge
:Maintainer checklist