Support experimental Dashboard view (Jenkins 2.534+)#85
Draft
Support experimental Dashboard view (Jenkins 2.534+)#85
Conversation
Replace global View/index.jelly override with class-specific SectionedView/index.jelly. The global override was an anti-pattern that affected all view types and prevented core's experimental dashboard UI from activating. The new template checks the newDashboardPage experimental flag: - When enabled: delegates to core's new-view-page.jelly for the modern app bar layout with inline widgets - When disabled: renders the classic layout without calling it.items (preserving the JENKINS-37174 performance fix) Also guards viewTabs rendering in SectionedView/main.jelly behind the dashboard flag check to prevent duplicate tab bars. No minimum Jenkins version change required — the l:userExperimentalFlag tag gracefully returns null on Jenkins < 2.534. Fixes #84
|
I also run it on 2.558 and it looks the same as for 2.534+ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Summary
Adds compatibility with Jenkins' experimental Dashboard UI (jenkinsci/jenkins#11208, shipped in Jenkins 2.534).
Problem: The plugin overrode core's
hudson/model/View/index.jellyglobally, which prevented the new dashboard layout from activating for any view type. Additionally,SectionedView/main.jellyrendered view tabs unconditionally, causing duplicate tabs when the dashboard was active.Fix:
View/index.jellyoverride — replaced with a class-specificSectionedView/index.jellythat only affects SectionedView instances (other views now fall through to core's template, which already has dashboard support)newDashboardPageflag detection — when the experimental flag is active, delegates to core'snew-view-page.jellyfor the modern app bar layoutSectionedView/main.jellyto prevent duplicate tab bars in dashboard modeit.itemsNo minimum Jenkins version change required — the
l:userExperimentalFlagtag gracefully returns null on Jenkins < 2.534. Same approach as jenkinsci/branch-api-plugin#805.Status
This PR still needs to be validated against:
Fixes #84