Skip to content

Minor dropdown / notice tweaks#26189

Merged
timja merged 2 commits intojenkinsci:masterfrom
timja:css-fixes
Jan 27, 2026
Merged

Minor dropdown / notice tweaks#26189
timja merged 2 commits intojenkinsci:masterfrom
timja:css-fixes

Conversation

@timja
Copy link
Member

@timja timja commented Jan 25, 2026

Improvements to dropdowns based on requirements in jenkinsci/credentials-plugin#992

  • Buttons display properly in l:notice now
  • l:overflowButton in l:notice headings are correctly left aligned
  • Add support for a description in a dropdown list

Testing done

Applied this diff into core and then reviewed the result on a view with no jobs:

diff --git i/core/src/main/resources/hudson/model/View/noJob.jelly w/core/src/main/resources/hudson/model/View/noJob.jelly
index 23011d448e..118dc4be02 100644
--- i/core/src/main/resources/hudson/model/View/noJob.jelly
+++ w/core/src/main/resources/hudson/model/View/noJob.jelly
@@ -23,10 +23,26 @@ THE SOFTWARE.
 -->

 <?jelly escape-by-default='true'?>
-<j:jelly xmlns:j="jelly:core" xmlns:l="/lib/layout">
-    <l:notice title="${%description_1}" icon="symbol-weather-icon-health-00to19">
-        <j:if test="${it.hasPermission(it.CONFIGURE)}">
-            ${%description_2}
-        </j:if>
-    </l:notice>
+<j:jelly xmlns:j="jelly:core" xmlns:l="/lib/layout" xmlns:dd="/lib/layout/dropdowns">
+  <l:notice title="${%description_1}" icon="symbol-weather-icon-health-00to19">
+    <l:overflowButton text="${%Add Credentials}"
+                      icon="symbol-add"
+                      clazz="jenkins-button--primary"
+                      tooltip="${null}">
+      <dd:header text="System"/>
+      <dd:custom>
+        <button class="jenkins-dropdown__item"
+                data-type="credentials-add-store-item"
+                data-url="/blah"
+                type="button">
+          <div class="jenkins-dropdown__item__icon">
+            <l:icon src="symbol-arrow-right"/>
+          </div>
+          <span>My domain</span>
+          <div class="jenkins-dropdown__item__description">this is a description</div>
+        </button>
+      </dd:custom>
+    </l:overflowButton>
+
+  </l:notice>
 </j:jelly>

Screenshots (UI changes only)

Before

image

After

image

Proposed changelog entries

  • Minor refinement of dropdowns and empty states.

Proposed changelog category

/label

Proposed upgrade guidelines

N/A

Submitter checklist

  • The issue, if it exists, is well-described.
  • The changelog entries and upgrade guidelines are appropriate for the audience affected by the change (users or developers, depending on the change) and are in the imperative mood (see examples). Fill in the Proposed upgrade guidelines section only if there are breaking changes or changes that may require extra steps from users during upgrade.
  • There is automated testing or an explanation as to why this change has no tests.
  • New public classes, fields, and methods are annotated with @Restricted or have @since TODO Javadocs, as appropriate.
  • New deprecations are annotated with @Deprecated(since = "TODO") or @Deprecated(forRemoval = true, since = "TODO"), if applicable.
  • UI changes do not introduce regressions when enforcing the current default rules of Content Security Policy Plugin. In particular, new or substantially changed JavaScript is not defined inline and does not call eval to ease future introduction of Content Security Policy (CSP) directives (see documentation).
  • For dependency updates, there are links to external changelogs and, if possible, full differentials.
  • For new APIs and extension points, there is a link to at least one consumer.

Desired reviewers

@mention

Before the changes are marked as ready-for-merge:

Maintainer checklist

  • There are at least two (2) approvals for the pull request and no outstanding requests for change.
  • Conversations in the pull request are over, or it is explicit that a reviewer is not blocking the change.
  • Changelog entries in the pull request title and/or Proposed changelog entries are accurate, human-readable, and in the imperative mood.
  • Proper changelog labels are set so that the changelog can be generated automatically.
  • If the change needs additional upgrade steps from users, the upgrade-guide-needed label is set and there is a Proposed upgrade guidelines section in the pull request title (see example).
  • If it would make sense to backport the change to LTS, be a Bug or Improvement, and either the issue or pull request must be labeled as lts-candidate to be considered.

@timja timja added the rfe For changelog: Minor enhancement. use `major-rfe` for changes to be highlighted label Jan 25, 2026
@timja timja requested review from a team and janfaracik January 25, 2026 20:19
@timja timja requested a review from a team January 25, 2026 22:13
@timja
Copy link
Member Author

timja commented Jan 26, 2026

/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!

@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 Jan 26, 2026
@timja timja merged commit b13dd5d into jenkinsci:master Jan 27, 2026
18 checks passed
@timja timja deleted the css-fixes branch January 27, 2026 15:34
meetgoti07 pushed a commit to meetgoti07/jenkins that referenced this pull request Jan 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-merge The PR is ready to go, and it will be merged soon if there is no negative feedback rfe For changelog: Minor enhancement. use `major-rfe` for changes to be highlighted

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants