[JENKINS-75727] Distinguish between primary and secondary actions in the header#10729
[JENKINS-75727] Distinguish between primary and secondary actions in the header#10729MarkEWaite merged 6 commits intojenkinsci:masterfrom
Conversation
| <j:set var="jumplist"> | ||
| <st:include it="${action}" page="jumplist.jelly" optional="true" /> | ||
| </j:set> | ||
| <j:set var="allActions" value="${it.actions}"/> |
There was a problem hiding this comment.
tbh this all seems a bit wrong.
We have a generic taglib, but this rendering is specific to the JenkinsHeader
Open to better suggestions.
This comment was marked as resolved.
This comment was marked as resolved.
This PR distinguishes between primary and secondary Actions for the header. Primary actions are always shown, and secondary actions are by default in the Hamburger menu. When the current page is the page for the secondary action (or a parent thereof) the action is put in the main header action list and not in the hamburger menu.
| @@ -0,0 +1,17 @@ | |||
| export default function updateActionsForTouch() { | |||
| // We want to disable the User action href on touch devices so that they can still activate the overflow menu | |||
There was a problem hiding this comment.
extracted as the only remaining code from actions-overflow.js
| const originalHref = link.getAttribute("href"); | ||
| const isTouchDevice = window.matchMedia("(hover: none)").matches; | ||
|
|
||
| // HTMLUnit doesn't register itself as supporting hover, thus the href is removed when it shouldn't be |
There was a problem hiding this comment.
I am not sure why we consider it is only important to do this for the User action and not any action with a JumpList.
At the same time, this comment seems incorrect. I can use touch to get the dropdown menu on windows 11 with a touch screen using a long touch and I can navigate directly using a quick touch. (My laptop is not (generally) detected as a touch device :-) )
Anyway, this was existing code I have just relocated and I am not intending to unpick this in this PR (or even in a follow-up).
There was a problem hiding this comment.
Additionally this seems to behave no differently on an android phone on weekly.ci.jenkins.io 🤷
There was a problem hiding this comment.
renamed to actions-touch.js and all the collapsing removed
| <j:set var="icon" value="${action.iconClassName != null ? action.iconClassName : action.iconFileName}"/> | ||
| <x:element name="${action.urlName == null ? 'button' : 'a'}"> | ||
| <x:attribute name="data-dropdown">${interactive}</x:attribute> | ||
| <x:attribute name="id">root-action-${action.class.simpleName}</x:attribute> |
There was a problem hiding this comment.
NB: existing code, simpleName is liable to collisions.
There was a problem hiding this comment.
Pull Request Overview
This PR distinguishes between primary and secondary header actions by separating their rendering logic and behavior. Key changes include:
- Introducing updateActionsForTouch in the header to disable UserAction href on touch devices.
- Splitting the rendering of header actions into primary and secondary (hamburger menu) actions via updated Jelly templates.
- Updating Java interfaces and classes with an isPrimaryAction method to support the new behavior.
Reviewed Changes
Copilot reviewed 11 out of 12 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/main/js/components/header/index.js | Added updateActionsForTouch and removed computeActions from computeOverflow. |
| src/main/js/components/header/actions-touch.js | New module to control touch-specific behavior for header actions. |
| src/main/js/components/header/actions-overflow.js | Removed overflow logic now replaced by updated action rendering. |
| core/src/main/resources/lib/layout/header/*.jelly | Updated Jelly templates to differentiate between primary and secondary actions. |
| core/src/main/java/jenkins/views/Header.java, etc. | Updated Java classes to override isPrimaryAction and adjust documentation. |
core/src/main/resources/lib/layout/header/secondaryAction.jelly
Outdated
Show resolved
Hide resolved
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
MarkEWaite
left a comment
There was a problem hiding this comment.
Two comments on Javadoc. Testing looks good to me. Will continue later today
MarkEWaite
left a comment
There was a problem hiding this comment.
Passed my interactive testing. Works well with the plugins that I tested, including purge build queue and priority sorter.
|
@MarkEWaite this solves JENKINS-75727 (a bug) by never collapsing an action for the current page, thus allowing its menu to be shown. I think this qualifies for the |
Co-authored-by: Mark Waite <mark.earl.waite@gmail.com>
You are right that it can be classified as a bug in addition to being an enhancement. I was worried that applying both the rfe and the bug label may attempt to create two entries in the Jenkins weekly changelog. If that happens, the changelog curator (@kmartens27) will probably delete one of the two. I was trying to avoid the risk that one of the two would need to be deleted and thought that readers of the Jenkins weekly changelog would be more likely to read the description of the change as a bug than as an enhancement. No problem if it is labeled as both bug and rfe. @kmartens27 will assure that the weekly changelog makes sense in any case. |
|
@janfaracik I'd really like your review and approval of this pull request. I think this is the right direction for the collapsing menu in the header so that components specifically declare that they want to always appear in the header or appear in the collapsing menu. |
|
@scherler I'd like your review and approval of this pull request as well. I very much want to include it in the June 24, 2025 release of Jenkins 2.516 so that we can include it in the LTS baseline for the July 23, 2025 LTS release. |
MarkEWaite
left a comment
There was a problem hiding this comment.
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
|
Apologies I've been on leave - Haven't had a chance to try this but idea/code wise looks fine to me as is. It'd be good to have some guidance written up as to what makes a good primary/secondary action for the header, and when a plugin should/should not contribute to it. |
As this is ready for merge (and CloudBees' has already integrated this into our build) selfishly I would prefer to do this in a separate PR to avoid merge conflicts. |
Yeah no worries/rush at all - I've opened jenkinsci/design-library-plugin#428 that can be used as a spot for that guidance. |
Ahh I was half way through doing this in javadoc :) ❯ git diff
diff --git a/core/src/main/java/hudson/model/RootAction.java b/core/src/main/java/hudson/model/RootAction.java
index b13e69f160..5565593d79 100644
--- a/core/src/main/java/hudson/model/RootAction.java
+++ b/core/src/main/java/hudson/model/RootAction.java
@@ -54,7 +54,10 @@ public interface RootAction extends Action, ExtensionPoint {
/**
* Identifies if the action as a primary action.
* Primary actions may be handled differently in the UI (for existence by always showing on the header rather than in an actions dropdown).
- * In almost all cases this should return {@code false} which is the default
+ * In almost all cases this should return {@code false} which is the default.
+ * Examples of a Primary action would be where actions would be used regularly or they would need to be prominent to convey some status.
+ * A concrete example would be an action that provides for Help with a submenu containing various different links would be a prime candidate for this to return true.
+ * If your action has the possibility of a {@link #getBadge() badge} then this is another indicator that the action should be a primary action (or otherwise refactored!)
* @return {@code true} iff this action should be considered primary.
*/
default boolean isPrimaryAction() {
|
Address review from Jan in jenkinsci#10729 (comment)
Address review from Jan in jenkinsci#10729 (comment)
* [JENKINS-75605] sl message catalog typo fix (jenkinsci#10601) JENKINS-75605: sl message catalog typo fix Co-authored-by: Marko Pohajač <marko.pohajac@hycu.com> * Update dependency org.jenkins-ci.plugins:matrix-project to v849 (jenkinsci#10593) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Update dependency webpack to v5.99.7 (jenkinsci#10605) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Update dependency stylelint to v16.19.1 (jenkinsci#10608) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * [maven-release-plugin] prepare release jenkins-2.508 * [maven-release-plugin] prepare for next development iteration * Update a single `InterruptedBuildAction` rather than creating a second one * Regression test * [JENKINS-75615] remove jenkins-avatar class the jenkins-avatar class should only be applied on the UserAction and not on every icon. * [JENKINS-75533] Remove jbcrypt mindrot, use Spring Security instead (jenkinsci#10604) Co-authored-by: Daniel Beck <daniel-beck@users.noreply.github.com> Co-authored-by: James Nord <jtnord@users.noreply.github.com> * [JENKINS-75465] (Recreate) Delete RunIdMigrator as it has been 10 years since this migration (jenkinsci#10521) * [JENKINS-75350] Displays plugin health score in Plugin Manager (jenkinsci#10351) Co-authored-by: Markus Winter <m.winter@sap.com> Co-authored-by: Tim Jacomb <21194782+timja@users.noreply.github.com> Co-authored-by: Daniel Beck <1831569+daniel-beck@users.noreply.github.com> Co-authored-by: Daniel Beck <daniel-beck@users.noreply.github.com> * Let renovate automatically update to node LTS versions (jenkinsci#10613) * Update dependency org.jenkins-ci.main:jenkins-test-harness to v2443 (jenkinsci#10616) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Update babel monorepo to v7.27.1 (jenkinsci#10614) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Simpler `InboundAgentRule.AgentArguments` constructor (jenkinsci#10615) * [JENKINS-75081] Avoid heap allocation when rendering large logs (jenkinsci#10515) * Update Winstone and Jetty (jenkinsci#10617) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Update dependency io.jenkins.plugins:ionicons-api to v87 (jenkinsci#10618) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Remove legacy compat for LogRecorder (jenkinsci#10612) * Run `GlobalBuildDiscarderListener` asynch (jenkinsci#10555) Co-authored-by: Vincent Latombe <vincent@latombe.net> * Update stapler.version to v1981 (major) (jenkinsci#10606) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Render `t:artifactList` lazily * Tracked down the icon problem * `yarn lint:fix` * Running `RenderOnDemandTest.testMemoryConsumption` and it is not good * 10× * Calling `releaseMe` does not appear to work * Update dependency io.jenkins.plugins:ionicons-api to v88 * [maven-release-plugin] prepare release jenkins-2.509 * [maven-release-plugin] prepare for next development iteration * Test may have been misleading; now it seems `releaseMe` does in fact work * `querySelector` Co-authored-by: Tim Jacomb <21194782+timja@users.noreply.github.com> * Remove deprecated IOException2 * Render lazily only for custom `ArtifactManager`; and cleaner not to use `renderOnDemand` at all * Remove obsolete attributes (copy in `WorkflowJob/main.jelly` is harmless) * Update dependency org.jenkins-ci.main:remoting to v3309 (jenkinsci#10621) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Update dependency org.jenkins-ci.main:jenkins-test-harness to v2444 (jenkinsci#10620) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Update eslint monorepo to v9.26.0 (jenkinsci#10622) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Update Stapler from 1981 to 1982, add test for jenkinsci/stapler#655 (jenkinsci#10500) * Add test for jenkinsci/stapler#655 * Newer snapshot, amend test --------- Co-authored-by: Daniel Beck <daniel-beck@users.noreply.github.com> * Friendlier error message when the password is too long (jenkinsci#10626) * Friendlier error message when the password is too long * Remove CTA Co-authored-by: Tim Jacomb <21194782+timja@users.noreply.github.com> * Remove "yours" --------- Co-authored-by: Daniel Beck <daniel-beck@users.noreply.github.com> Co-authored-by: Tim Jacomb <21194782+timja@users.noreply.github.com> * Replace with skeleton * Tidy * [JENKINS-75621] Fix visual regression on Thread Dump page (jenkinsci#10627) Co-authored-by: Kris Stern <krisstern@outlook.com> * Add notice for legacy .behavior-loading, fix in unit test * Update skeleton.jelly * `RunListener.createLoadAllower` * Update dependency webpack to v5.99.8 (jenkinsci#10635) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Update dependency eslint-config-prettier to v10.1.3 (jenkinsci#10637) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * [JENKINS-75634] Restore children context menu for breadcrumbs (jenkinsci#10629) * Init * Format * Update jumplists.js * Tidy * Update jumplists.js * Update jumplists.js * Update jumplists.js * Don't use async/awai * Update dependency globals to v16.1.0 (jenkinsci#10638) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Update dependency org.jenkins-ci:jenkins to v1.132 (jenkinsci#10633) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Mark Waite <mark.earl.waite@gmail.com> * Update babel monorepo to v7.27.2 (jenkinsci#10636) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Update dependency org.jenkins-ci.plugins:junit to v1334 (jenkinsci#10642) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Update stapler.version to v1983 (major) (jenkinsci#10639) Update stapler.version to v1983 Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Update dependency org.jenkins-ci.main:jenkins-test-harness to v2447 (jenkinsci#10641) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Update dependency eslint-config-prettier to v10.1.5 (jenkinsci#10640) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * [maven-release-plugin] prepare release jenkins-2.510 * [maven-release-plugin] prepare for next development iteration * Update dependency org.jenkins-ci.plugins.workflow:workflow-api to v1373 (jenkinsci#10643) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Update dependency org.jenkins-ci.plugins:junit to v1335 * Update Winstone and Jetty (jenkinsci#10644) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Update dependency sass to v1.88.0 (jenkinsci#10648) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Update dependency org.springframework:spring-framework-bom to v6.2.7 * [JENKINS-75664] Revert call to `BoundObjectTable#releaseMe` (jenkinsci#10647) Revert call to `BoundObjectTable#releaseMe` * Add retry to flaky test in ResponseTimeMonitorTest (jenkinsci#10654) * Add retry to flaky test in ResponseTimeMonitorTest * Retry with awaitility * Update test/src/test/java/hudson/node_monitors/ResponseTimeMonitorTest.java Co-authored-by: Tim Jacomb <21194782+timja@users.noreply.github.com> --------- Co-authored-by: Tim Jacomb <21194782+timja@users.noreply.github.com> * handle ConnectionRefusalException * Update dependency stylelint-config-standard-scss to v15 (jenkinsci#10646) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Mark Waite <mark.earl.waite@gmail.com> * Update Node.js to v22.15.1 (jenkinsci#10652) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Add skeleton items to the sidebar for job configure pages * Restore skeleton to appearance page * Relax checks for flaky tests in ComputerStateTest (jenkinsci#10656) Co-authored-by: Tim Jacomb <21194782+timja@users.noreply.github.com> * Update dependency io.jenkins.plugins:commons-text-api to v1.13.1-176.v74d88f22034b_ * Update dependency sass to v1.89.0 (jenkinsci#10658) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * don't suggest pam-auth plugin * Fix dropdown menu close when hover on sub dropdown * Update eslint monorepo to v9.27.0 (jenkinsci#10665) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * [maven-release-plugin] prepare release jenkins-2.511 * [maven-release-plugin] prepare for next development iteration * Update dependency org.springframework.security:spring-security-bom to v6.5.0 (jenkinsci#10664) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Update xmlunit.version to v2.10.1 (jenkinsci#10660) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Use XMLUnit BOM * Update dependency org.jenkins-ci.plugins:bouncycastle-api to v2.30.1.80-261.v00c0e2618ec3 (jenkinsci#10661) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Update dependency org.jenkins-ci.main:jenkins-test-harness to v2451 (jenkinsci#10666) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Update mheap/github-action-required-labels digest to fb29a14 * Update dependency org.jenkins-ci.main:jenkins-test-harness to v2455 (jenkinsci#10672) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * [JENKINS-75388] Remove `?path` and `?pattern` support from DBS (jenkinsci#10650) Co-authored-by: Daniel Beck <daniel-beck@users.noreply.github.com> * Update dependency stylelint-config-standard-scss to v15.0.1 (jenkinsci#10670) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Update Node.js to v22.16.0 (jenkinsci#10671) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Replaced groovy file with jelly for `GlobalSCMRetryCountConfiguration` (jenkinsci#10673) * Removed dead code from `Queue.ItemList` (jenkinsci#10674) * Update utils.js * Update dependency org.jenkins-ci.plugins:jackson2-api to v2.19.0-404.vb_b_0fd2fea_e10 (jenkinsci#10677) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Update dependency com.puppycrawl.tools:checkstyle to v10.24.0 (jenkinsci#10675) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Update dependency webpack to v5.99.9 (jenkinsci#10680) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Update jenkins/ath Docker tag to v6242 (jenkinsci#10682) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Update dependency org.xmlunit:xmlunit-bom to v2.10.2 * Update dependency io.jenkins.plugins:json-api to v20250517 * [maven-release-plugin] prepare release jenkins-2.512 * [maven-release-plugin] prepare for next development iteration * Migrate tests to JUnit5 (core / hudson / 1) (jenkinsci#10576) * Migrate annotations and imports * Migrate assertions * Remove public visibility for test classes and methods * Minor code cleanup Co-authored-by: Mark Waite <mark.earl.waite@gmail.com> * Allow to configure the views tab bar per user (jenkinsci#10379) * allow to configure the views tab bar per user * apply prettier * fix spotbugs * add license header * Update commons-fileupload2.version to v2.0.0-M3 (jenkinsci#10686) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Update dependency globals to v16.2.0 (jenkinsci#10688) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Migrate tests to JUnit5 (core / jenkins / 3) (jenkinsci#10578) * Migrate annotations and imports * Migrate assertions * Remove public visibility for test classes and methods * Minor code cleanup Co-authored-by: Mark Waite <mark.earl.waite@gmail.com> * Use Jenkins color palette for CodeMirror (jenkinsci#10687) * Init * Update _codemirror.scss * Update _codemirror.scss * Reset files * Fix FileChannelWriterTest and VirtualFileTest by reverting to JUnit 4 (jenkinsci#10698) * Fix FileChannelWriterTest by reverting to JUnit 4 Test does not fail on my local Windows computer with JUnit 5 or with JUnit 4. Reverting this to see if it resolves the issue so that other pull requests will not be blocked by the failing test. * Fix VirtualFileTest by reverting back to JUnit 4 (cherry picked from commit dc3ae00) * Revert "Update jackson2-api to v2.19.0-404.vb_b_0fd2fea_e10" (jenkinsci#10699) The kubernetes client has issues with Jackson 2.19.0. Original pull request that updated to 2.19.0 was: * jenkinsci#10677 Reverted from the Jenkins plugin BOM in pull request: * jenkinsci/bom#5114 Distribution suspended from Jenkins update center in: * jenkins-infra/update-center2#869 Refer to the following Kubernetes client API issues: * fabric8io/kubernetes-client#7036 * fabric8io/kubernetes-client#7106 Backport of the Jackson 2.19.0 change to Kubernetes client 6.x has been requested at: * fabric8io/kubernetes-client#7107 Also described in detail in Spring Cloud issue report: * spring-cloud/spring-cloud-kubernetes#1923 Also described in Jenkins issue report: * https://issues.jenkins.io/browse/JENKINS-75712 Also verified as failing in kubernetes plugin pull request: * jenkinsci/kubernetes-plugin#1702 Also mentioned in Kubernetes client API upgrade pull request: * jenkinsci/kubernetes-client-api-plugin#292 This reverts commit 11e5d5c. * Update dependency io.jenkins.plugins:design-library to v388 (jenkinsci#10697) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Update dependency org.jenkins-ci.plugins:cloudbees-folder to v6.1023.v4fcb_72152519 (jenkinsci#10690) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Update jenkins/ath Docker tag to v6250 (jenkinsci#10692) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Update dependency webpack-remove-empty-scripts to v1.1.1 (jenkinsci#10693) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Move Jackson 2.19.0 exclusion into packageRule section (jenkinsci#10701) Testing done: npx --package renovate -- renovate-config-validator .github/renovate.json INFO: Config validated successfully * Update dependency @babel/core to v7.27.3 (jenkinsci#10702) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Update dependency postcss to v8.5.4 (jenkinsci#10703) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Update dependency postcss-preset-env to v10.2.0 (jenkinsci#10704) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Update dependency stylelint to v16.20.0 (jenkinsci#10705) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Set `SameSite` attribute on cookies (jenkinsci#10630) * Set SameSite attribute on cookies * Fix link --------- Co-authored-by: Daniel Beck <daniel-beck@users.noreply.github.com> * Migrate tests to JUnit5 (cli) (jenkinsci#10559) Co-authored-by: Mark Waite <mark.earl.waite@gmail.com> * Complete Japanese translation for keepDependencies help file (jenkinsci#10366) * Complete Japanese translation for keepDependencies help file * refactor: improve phrasing for more natural, native-like expression * Prevent horizontal overflow on script console (jenkinsci#10694) * Prevent horizontal overflow on script console * Handle resizer positioning --------- Co-authored-by: Mark Waite <mark.earl.waite@gmail.com> * Use secondary text color CSS variable (jenkinsci#10695) Co-authored-by: Mark Waite <mark.earl.waite@gmail.com> * Accept UserIdCause or LegacyCodeCause in disconnectCause test (jenkinsci#10700) * Accept UserIdCause or LegacyCodeCause in disconnectCause test The hudson.model.ExecutorTest.disconnectCause() test fails in up to 10% of jobs on ci.jenkins.io because the cause is a LegacyCodeCause instead of the expected UserIdCause. In my 140 runs on my local Linux computer, I never saw a LegacyCodeCause, but it seems safe to check one of two failure messages rather than fail the test. * Fix compilation error * Update dependency org.jenkins-ci.main:jenkins-test-harness to v2457 (jenkinsci#10706) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Update dependency org.jenkins-ci.plugins:structs to v350 (jenkinsci#10707) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Update dependency commons-beanutils:commons-beanutils to v1.11.0 [SECURITY] (jenkinsci#10691) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Add 'jenkins-!-text-color-secondary' class (jenkinsci#10708) * Increase contrast of colorful buttons (jenkinsci#10709) * Init * Refine further * Update _theme.scss * Update border for dropdowns too * Fix border not showing in submenus * Migrate tests to JUnit5 (test / hudson / 2) (jenkinsci#10580) * Migrate annotations and imports * Migrate assertions * Remove public visibility for test classes and methods * Minor code cleanup Co-authored-by: Mark Waite <mark.earl.waite@gmail.com> * Migrate tests to JUnit5 (test / jenkins / 3) (jenkinsci#10581) * Migrate tests to JUnit5 (test / jenkins / 3) * Migrate annotations and imports * Migrate assertions * Remove public visibility for test classes and methods * Minor code cleanup * Stabilize SetupWizardTest --------- Co-authored-by: Mark Waite <mark.earl.waite@gmail.com> Co-authored-by: Kris Stern <krisstern@outlook.com> * Update dependency io.jenkins.plugins:design-library to v392 (jenkinsci#10714) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Update dependency com.puppycrawl.tools:checkstyle to v10.25.0 (jenkinsci#10710) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Migrate tests to JUnit5 (test / hudson / 1) (jenkinsci#10579) Co-authored-by: Mark Waite <mark.earl.waite@gmail.com> * Add copy-to-clipboard button to oops' stacktrace (jenkinsci#10712) Co-authored-by: Tim Jacomb <21194782+timja@users.noreply.github.com> * Fix FileChannelWriterTest and VirtualFileTest for JUnit 5 (jenkinsci#10713) * Update dependency @babel/core to v7.27.4 (jenkinsci#10717) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Update eslint monorepo to v9.28.0 (jenkinsci#10718) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Update dependency sass to v1.89.1 (jenkinsci#10719) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * [maven-release-plugin] prepare release jenkins-2.513 * [maven-release-plugin] prepare for next development iteration * Migrate tests to JUnit5 (test / misc / 4) (jenkinsci#10582) * Migrate annotations and imports * Migrate assertions * Remove public visibility for test classes and methods * Minor code cleanup Co-authored-by: Mark Waite <mark.earl.waite@gmail.com> Co-authored-by: Tim Jacomb <21194782+timja@users.noreply.github.com> * Update Winstone and Jetty (jenkinsci#10720) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Update stapler.version to v1990 (major) (jenkinsci#10723) Update stapler.version to v1990 Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Update Yarn to v4.9.2 (jenkinsci#10724) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Update jenkins/ath Docker tag to v6254 (jenkinsci#10727) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Fill in since annotations (jenkinsci#10728) Co-authored-by: timja <21194782+timja@users.noreply.github.com> * Refine dialogs and Command Palette (jenkinsci#10721) * Init * Update index.js * Update index.js * Update _dialogs.scss * Improve appearance * Update _dialogs.scss * Tidy * Update _theme.scss * Format * Fix glow in dark themes * Update dependency org.apache.maven:maven-core to v3.9.10 (jenkinsci#10730) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Update dependency postcss-preset-env to v10.2.1 * [JENKINS-75683] Restore transient view actions (jenkinsci#10676) Restore view actions * Fix url in search result list when running at root context (jenkinsci#10725) fix url when running at root when the rootURL is empty the urls would start with a double slash which is interpreted by browser like a complete url including domain. That leads to non working links. Use the same approach for the url as used by command pallete to include the additional slash only when the url is not starting with a slash * Cleanup HudsonPrivateSecurityRealmTest * [maven-release-plugin] prepare release jenkins-2.514 * [maven-release-plugin] prepare for next development iteration * Update dependency org.jenkins-ci.main:jenkins-test-harness to v2460 (jenkinsci#10734) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Update softprops/action-gh-release action to v2.3.2 (jenkinsci#10733) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Update dependency org.springframework:spring-framework-bom to v6.2.8 * Update core/src/main/resources/lib/layout/skeleton.jelly Co-authored-by: Alexander Brandes <brandes.alexander@web.de> * Update dependency postcss-preset-env to v10.2.2 * Update jenkins/ath Docker tag to v6260 (jenkinsci#10741) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Update dependency io.jenkins.plugins:checks-api to v373 (jenkinsci#10740) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Update dependency sass to v1.89.2 (jenkinsci#10737) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Update dependency postcss-preset-env to v10.2.3 * Update dependency postcss to v8.5.5 * Update dawidd6/action-send-mail action to v6 * Update dependency org.jenkins-ci.main:jenkins-test-harness to v2462 (jenkinsci#10745) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Distinguish between primary and secondary actions in the header This PR distinguishes between primary and secondary Actions for the header. Primary actions are always shown, and secondary actions are by default in the Hamburger menu. When the current page is the page for the secondary action (or a parent thereof) the action is put in the main header action list and not in the hamburger menu. * Update commons-fileupload2.version to v2.0.0-M4 (jenkinsci#10746) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Update eslint monorepo to v9.29.0 (jenkinsci#10748) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Update dependency org.springframework.security:spring-security-bom to v6.5.1 (jenkinsci#10750) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Update dependency postcss to v8.5.6 (jenkinsci#10751) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * remove actions-overflow * [maven-release-plugin] prepare release jenkins-2.515 * [maven-release-plugin] prepare for next development iteration * Fix Typo Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * fix inverted badgeClass Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * [JENKINS-75683] re-introduce actions for Jenkins with custom action.jelly actions without a URL but a custom action.jelly where not shown correctly in the header. This re-introduces them and allows custom rendering of actions again (by using an action.jelly). adjust the task taglib so that it renders in the style of the header when in the header. Nested tasks work, but when expanded the original looses its tooltip. move subtasks to the dropdown use tasks class to fix layout fix scss formatting * [JENKINS-75794] Fix CodeMirror component being hidden after skeleton loading * Update jenkins/ath Docker tag to v6266 * start introducing data-testids for test usage The Header rework exposed numerous test failures due to changes in structure. This could have been avoided if we had already been using data-testid attributes for the various things. This starts small with the signin button. Using "login" as the testid as this is what cloudbees had already been using in our custom header and the jelly is still loginLink * Update dependency org.xmlunit:xmlunit-bom to v2.10.3 (jenkinsci#10753) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Update dependency org.jenkins-ci.plugins:cloudbees-folder to v6.1026.ve06dfa_cf31c3 (jenkinsci#10757) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Update dependency stylelint to v16.21.0 (jenkinsci#10761) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Update dependency com.puppycrawl.tools:checkstyle to v10.25.1 * Update mheap/github-action-required-labels digest to 8afbe8a (jenkinsci#10763) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * [JENKINS-75727] Distinguish between primary and secondary actions in the header (jenkinsci#10729) * Distinguish between primary and secondary actions in the header This PR distinguishes between primary and secondary Actions for the header. Primary actions are always shown, and secondary actions are by default in the Hamburger menu. When the current page is the page for the secondary action (or a parent thereof) the action is put in the main header action list and not in the hamburger menu. * remove actions-overflow * Fix Typo Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * fix inverted badgeClass Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update Javadoc comment for isPrimaryAction Co-authored-by: Mark Waite <mark.earl.waite@gmail.com> * add ID to header "More Actions" button --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Mark Waite <mark.earl.waite@gmail.com> * Implement `SystemProperties.getDuration` (jenkinsci#10561) Co-authored-by: Tim Jacomb <21194782+timja@users.noreply.github.com> Co-authored-by: Mark Waite <mark.earl.waite@gmail.com> * Update jenkins/ath Docker tag to v6269 (jenkinsci#10766) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * [maven-release-plugin] prepare release jenkins-2.516 * [maven-release-plugin] prepare for next development iteration * Update Node.js to v22.17.0 (jenkinsci#10770) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Update stapler.version to v1997 (major) (jenkinsci#10769) Update stapler.version to v1997 Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Update dependency com.puppycrawl.tools:checkstyle to v10.26.0 (jenkinsci#10768) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --------- Co-authored-by: vandrewskis <vandrewskis@users.noreply.github.com> Co-authored-by: Marko Pohajač <marko.pohajac@hycu.com> Co-authored-by: Kris Stern <krisstern@outlook.com> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Jenkins Release Bot <66998184+jenkins-release-bot@users.noreply.github.com> Co-authored-by: Jesse Glick <jglick@cloudbees.com> Co-authored-by: Markus Winter <m.winter@sap.com> Co-authored-by: Daniel Beck <1831569+daniel-beck@users.noreply.github.com> Co-authored-by: Daniel Beck <daniel-beck@users.noreply.github.com> Co-authored-by: James Nord <jtnord@users.noreply.github.com> Co-authored-by: Guruprasad Bhat <gbhat@cloudbees.com> Co-authored-by: Adrien Lecharpentier <alecharpentier@cloudbees.com> Co-authored-by: Tim Jacomb <21194782+timja@users.noreply.github.com> Co-authored-by: Vincent Latombe <vincent@latombe.net> Co-authored-by: strangelookingnerd <49242855+strangelookingnerd@users.noreply.github.com> Co-authored-by: Jan Faracik <43062514+janfaracik@users.noreply.github.com> Co-authored-by: Mark Waite <mark.earl.waite@gmail.com> Co-authored-by: car-roll <cchiou@cloudbees.com> Co-authored-by: yen-cheng <lin0905580802@gmail.com> Co-authored-by: Basil Crow <me@basilcrow.com> Co-authored-by: Stefan Spieker <S.Spieker@gmx.net> Co-authored-by: Ahmed Fatthi <91102592+AhmedFatthy1040@users.noreply.github.com> Co-authored-by: Alexander Brandes <mc.cache@web.de> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Alexander Brandes <brandes.alexander@web.de> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This PR distinguishes between primary and secondary Actions for the header.
Primary actions are always shown, and secondary actions are by default in the Hamburger menu.
When the current page is the page for the secondary action (or a parent thereof) the action is put in the main header action list and not in the hamburger menu.
This solves (partially) JENKINS-75727 in that whilst the collapsed icon is still collapsed when on its page the dropdown would be shown.
Screenshots
in the root of Jenkins

in the system identity page (the action is now in the main header)

See JENKINS-75727.
Testing done
Manual testing
** check the action shows in the hamburger when on the root page
** check the action shows in the top panel when on the job-config-history page
Proposed changelog entries
Proposed changelog category
/label rfe
Proposed upgrade guidelines
N/A
Submitter checklist
@Restrictedor have@since TODOJavadocs, as appropriate.@Deprecated(since = "TODO")or@Deprecated(forRemoval = true, since = "TODO"), if applicable.evalto ease future introduction of Content Security Policy (CSP) directives (see documentation).Desired reviewers
@mention
Before the changes are marked as
ready-for-merge:Maintainer checklist
upgrade-guide-neededlabel is set and there is a Proposed upgrade guidelines section in the pull request title (see example).lts-candidateto be considered (see query).