Skip to content

Support experimental Dashboard view (Jenkins 2.534+)#85

Draft
mbSmaga wants to merge 1 commit intomasterfrom
feature/dashboard-view-support
Draft

Support experimental Dashboard view (Jenkins 2.534+)#85
mbSmaga wants to merge 1 commit intomasterfrom
feature/dashboard-view-support

Conversation

@mbSmaga
Copy link
Copy Markdown
Contributor

@mbSmaga mbSmaga commented Apr 8, 2026

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.jelly globally, which prevented the new dashboard layout from activating for any view type. Additionally, SectionedView/main.jelly rendered view tabs unconditionally, causing duplicate tabs when the dashboard was active.

Fix:

  • Remove the global View/index.jelly override — replaced with a class-specific SectionedView/index.jelly that only affects SectionedView instances (other views now fall through to core's template, which already has dashboard support)
  • Add newDashboardPage flag detection — when the experimental flag is active, delegates to core's new-view-page.jelly for the modern app bar layout
  • Guard tab rendering in SectionedView/main.jelly to prevent duplicate tab bars in dashboard mode
  • Preserve JENKINS-37174 fix — the classic layout path still avoids calling it.items

No minimum Jenkins version change required — the l:userExperimentalFlag tag gracefully returns null on Jenkins < 2.534. Same approach as jenkinsci/branch-api-plugin#805.

Status

⚠️ Draft — needs manual testing before merge

This PR still needs to be validated against:

  • Jenkins 2.492.3 (current deploy target) — classic mode, verify no regressions
  • Jenkins 2.534+ — classic mode (flag off), verify no regressions
  • Jenkins 2.534+ — dashboard mode (flag on), verify: no duplicate tabs, sections render, sidebar widgets appear in inline panel
  • Other view types (e.g. All view) still work correctly with the plugin installed

Fixes #84

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
@novinxy
Copy link
Copy Markdown

novinxy commented Apr 8, 2026

Scenario:

  • simple SectionedView with 2 Text sections

2.492.3

  • No issues ✅
    image

2.534+ - flag OFF

  • No issues ✅
    image

2.534+ - flag ON

  • No duplicate tab ✅
  • Missing sidebar ⛔
    image

@novinxy
Copy link
Copy Markdown

novinxy commented Apr 8, 2026

I also run it on 2.558 and it looks the same as for 2.534+

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support for new experimental Dashboard view

2 participants