Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow to configure the views tab bar per user #10379

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

mawinter69
Copy link
Contributor

@mawinter69 mawinter69 commented Mar 5, 2025

Views on the dashboard are selectable at the top of the dashboard in the Views Tab Bar

image

An extension point exists that allows to change the way this tab bar is presented. While most plugins that implement that extension point are quite old I recently adopted one such plugin (favorite-view) and made it work with current Jenkins.
Which tabbar is used is configured on the system page or on the folder page. Currently what is configured there is the truth and users don't have the possibility to adjust it to their needs.

A similar extension point exists that allows to configure the Tab bar on the users My Views page but there is no plugin that implements the extension point (MyViewsTabBar class)

This change proposes the following:

  • deprecate the MyViewsTabBar class (and it's default implementation)
  • Introduce a new user property that makes it possible for a user to override what is configured for the global dashboard or a folder as Views Tab Bar
  • Instead of the MyViewsTabBar, a user can select one of the implementations of ViewsTabBar to be used for the My Views dashboard
  • the default view on the My Views configuration is filled with a select instead of checking if the user enters a valid view name.

There a few plugins that should be adjusted once they consume a Jenkins core version with this change as they refer to the myViewsTabBar (only in jelly/groovy files)

  • dynamic-search-view
  • categorized-view
  • sectioned-view
  • delivery-pipeline

See JENKINS-XXXXX.

Testing done

So far interactive testing only

  • create several views on the main dashboard
  • configure an alternative ViewsTabBar (favorite-view under Manage -> System
  • Under User preferences select (Inherit from Container)
  • The main dashboard uses the favorite-view tabbar
  • Under User preferences select (Default Views Tabbar)
  • The main dashboard uses the default
  • create a second user without configuring anything in the user preferences
  • dashboard shows favorite-view tabbar

Proposed changelog entries

  • Allow to configure the views tab bar per user

Proposed changelog category

/label rfe,web-ui

Proposed upgrade guidelines

N/A

Submitter checklist

  • The Jira 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.
  • 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, a Jira issue must exist, be a Bug or Improvement, and be labeled as lts-candidate to be considered (see query).

@comment-ops-bot comment-ops-bot bot added rfe For changelog: Minor enhancement. use `major-rfe` for changes to be highlighted web-ui The PR includes WebUI changes which may need special expertise labels Mar 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rfe For changelog: Minor enhancement. use `major-rfe` for changes to be highlighted web-ui The PR includes WebUI changes which may need special expertise
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant