Use correct views tabbar in new dashboard page respecting user preferences#26640
Conversation
The new dashboard page always used the views tabbar defined on the container ignoring the user preferences. And the path j:when to detect the myviews proeprty was comparing against the view class and not the owner so that always evaluated to false
| <j:choose> | ||
| <j:when test="${view.class.name eq 'hudson.model.MyViewsProperty'}"> | ||
| <st:include page="viewTabs" it="${view.owner.userViewsTabBar}" /> | ||
| <j:when test="${view.owner.class.name eq 'hudson.model.MyViewsProperty'}"> |
There was a problem hiding this comment.
That condition was always false as it compared the view class instead of the owner class
| </j:when> | ||
| <j:otherwise> | ||
| <st:include page="viewTabs" it="${view.owner.viewsTabBar}" /> | ||
| <st:include page="viewTabs" it="${view.owner.userViewsTabBar}" /> |
There was a problem hiding this comment.
That ignored the user preferences
utafrali
left a comment
There was a problem hiding this comment.
Two real bugs fixed and confirmed working via before/after screenshots: the condition was comparing the wrong object's class (view vs. view.owner), and the two tabbar references in the branches were swapped. The fix is correct; the main gap is that the PR description only describes the condition bug, leaving the branch swap unexplained.
timja
left a comment
There was a problem hiding this comment.
/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!
The new dashboard page always used the views tabbar defined on the container ignoring the user preferences. And the path
j:whento detect the myviews property was comparing against the view class and not the owner so that always evaluated to falseTesting done
Favorite Viewfor Default Views Tab BarScreenshots (UI changes only)
With Favorite View plugin installed, selected in user preferences and one view marked as favorite, global configuration set to default views tabbar
Before
After
Proposed changelog entries
Proposed changelog category
/label bug,web-ui
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
@jenkinsci/sig-ux
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.