-
-
Notifications
You must be signed in to change notification settings - Fork 9.5k
Redesign the Jenkins header #10245
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
Merged
Merged
Redesign the Jenkins header #10245
Changes from all commits
Commits
Show all changes
172 commits
Select commit
Hold shift + click to select a range
5a0eee2
WB
janfaracik c9c8669
Push
janfaracik 82b85a2
More responsive
janfaracik 3d08ab8
Update headerContent.jelly
janfaracik f04343b
Push
janfaracik 6fbb8e8
Update logo.jelly
janfaracik 6fbabad
Update _page-header.scss
janfaracik 363b63a
Update _page-header.scss
janfaracik 278f8c5
Update header
janfaracik 0b1eb50
Merge branch 'master' into new-header
janfaracik 46b4296
Merge branch 'master' into new-header
janfaracik 53d1f72
Tidy up breadcrumbs
janfaracik ae239df
Tidy up focus
janfaracik d85458f
Update _breadcrumbs.scss
janfaracik cd3c384
Update configure.jelly
janfaracik a5e3d54
push
janfaracik 5b340a8
Add badges
janfaracik 73b81a3
Tidy
janfaracik a04b8f2
Push
janfaracik 82a3d80
Update headerContent.jelly
janfaracik 1123309
Update ManageJenkinsAction.java
janfaracik d5c986f
Update headerContent.jelly
janfaracik 25f04d9
Working!
janfaracik 244f48d
WB
janfaracik abe4770
Tidy up
janfaracik 3970e8d
Fixes
janfaracik be07296
Update sidepanel.jelly
janfaracik 7134580
Lint
janfaracik cf56f45
Tidy up
janfaracik 21c74a7
Update ManageJenkinsAction.java
janfaracik aab79d0
Simplify
janfaracik 5ddd415
Update _side-panel-tasks.scss
janfaracik 5c8f872
Merge branch 'simplify-search' into new-header
janfaracik 181d9d2
Update _side-panel-tasks.scss
janfaracik 46a9c35
Update UserAction.java
janfaracik bb7b73f
Update Jenkins.java
janfaracik 7131e9a
Add border to account image
janfaracik 15fc210
Tidy up avatars
janfaracik 9b5dd43
Merge branch 'master' into new-header
janfaracik a309687
Update _side-panel-tasks.scss
janfaracik 564f050
Init
janfaracik b447e27
Tidy up
janfaracik 0ebc7f1
Merge branch 'circle-avatar' into new-header
janfaracik 77b0baa
Merge branch 'improve-dialog' into new-header
janfaracik c2fb2ad
Merge branch 'rename-jenkins-in-tab-title' into new-header
janfaracik a800200
Merge branch 'master' into new-header
janfaracik 60e0a00
Hide behind flag
janfaracik 9cc86bd
Update sidepanel.jelly
janfaracik b403502
Push
janfaracik d89c24c
Tidy up
janfaracik 6bacea0
Update logo.jelly
janfaracik ac72328
Merge branch 'master' into new-header
janfaracik 1becb26
Accessibility
janfaracik 7a42953
Update _breadcrumbs-new.scss
janfaracik f76088b
Fix dropdown theme
janfaracik 7c16c18
Update _breadcrumbs.scss
janfaracik dc7a46d
Update _header.scss
janfaracik e5c3670
Update ManageJenkinsAction.java
janfaracik 3397f39
Remove flag
janfaracik 79c1280
Tidy up
janfaracik 2ea0b1f
Update with HeaderAction
janfaracik bee9422
Merge branch 'master' into new-header
janfaracik 19b4f27
Revert "Update with HeaderAction"
janfaracik 0875038
Tidy
janfaracik a9c648d
Update RootAction.java
janfaracik 9feda44
Update _breadcrumbs.scss
janfaracik 56a808f
Push
janfaracik 025a596
Update _header.scss
janfaracik 1e67e70
Update _header.scss
janfaracik 4a60bb7
Fix invisible actions not actually being invisible, make avatar huge …
janfaracik 4a3f71a
Tidy
janfaracik abdb235
Push
janfaracik 950cdee
Fix breadcrumbs + notification
janfaracik 5bd87dc
Update jumplist.jelly
janfaracik ef847c9
Getting there 🚀
janfaracik 49cb8cc
WB
janfaracik 18677f1
Update index.jelly
janfaracik eed89b7
Update headerContent.jelly
janfaracik c6324ca
Responsive
janfaracik 76b9bcf
Push
janfaracik 857885c
Push
janfaracik 6752284
Push
janfaracik 062636c
Update index.js
janfaracik d586b51
Push
janfaracik e2d75a5
Tidy up
janfaracik 4a2cd7e
Tidy up
janfaracik 668871b
Tidy
janfaracik 575632f
Update logo.jelly
janfaracik a222707
Delete NewHeaderUserExperimentalFlag.java
janfaracik a8a8af7
Merge branch 'master' into new-header
janfaracik def576a
Lint
janfaracik 6066472
Update index.js
janfaracik 32ac982
Update index.js
janfaracik e8903b8
Fix some tests
janfaracik 531e1b8
Update headerContent.jelly
janfaracik 540ae4b
Update headerContent.jelly
janfaracik 770f5d9
Remove bravo test - need to confirm this
janfaracik 615e5a0
Update Security3349Test.java
janfaracik ff33e12
Update pom.xml
janfaracik e89f74a
Merge branch 'master' into new-header
janfaracik 90dd49f
Fix SpotBugs + i18n
janfaracik c493a41
Add doc for header scroll, support prefers contrast
janfaracik cadf01e
Add overflow menu for actions, improve accessibility
janfaracik f740741
Update actions-overflow.js
janfaracik dbb67ca
Fix tests + accessibility
janfaracik 2fdb00b
Merge branch 'master' into new-header
janfaracik 8eda9d1
Fix JS
janfaracik 57e67af
Update breadcrumbs-overflow.js
janfaracik ddc968a
Merge branch 'master' into new-header
janfaracik 1f8cc8b
Update breadcrumbs-overflow.js
janfaracik ee5c7fe
Merge branch 'master' into new-header
janfaracik c4de77b
Merge branch 'master' into new-header
janfaracik 6df76ce
Merge branch 'master' into new-header
janfaracik 5fae312
Merge branch 'master' into new-header
janfaracik d967de5
Add breadcrumb menu on hover, fix issues on mobile
janfaracik 27662c8
Update _breadcrumbs.scss
janfaracik 9ea5305
i18n
janfaracik 70e1608
Update pom.xml
janfaracik 4306342
Merge branch 'master' into new-header
janfaracik 7ca2e8f
Add tab support for user dropdown
janfaracik ca0176a
Squashed commit of the following:
janfaracik 25647d6
Move logo
janfaracik 1299718
Revert "Move logo"
janfaracik f4eb1e1
Move actions to taglib
janfaracik 470c42c
Split logo from breadcrumbs
janfaracik 4290f25
Fix sticky app bar
janfaracik a7876f7
Update _page-header.scss
janfaracik fb0d6fd
Update HudsonTest.java
janfaracik c80ddd4
Update _page-header.scss
janfaracik 16d2064
Merge branch 'master' into new-header
janfaracik 5bb55a9
Merge branch 'master' into new-header
janfaracik 5ab7432
Merge branch 'master' into new-header
janfaracik 3f92937
Move breadcrumb loading above setting mode to header
janfaracik 36c7b20
Merge branch 'master' into new-header
janfaracik 376e95a
Merge branch 'master' into new-header
janfaracik bda9067
Reduce header height
janfaracik 99d2cb6
Increase logo height
janfaracik 8b67b1b
Move getActions to Header
janfaracik 55c1722
Merge branch 'master' into new-header
janfaracik 111fca4
Merge branch 'master' into new-header
janfaracik cb9a343
Merge branch 'master' into new-header
janfaracik 9ca137b
Merge branch 'master' into new-header
janfaracik 7b49f81
Update header avatar with jenkins-avatar
janfaracik 7e6d79d
Squashed commit of the following:
janfaracik 4b22e8b
Merge branch 'master' into new-header
janfaracik aae268e
Merge branch 'master' into new-header
janfaracik 1e7ccb9
Merge branch 'master' into new-header
janfaracik 285bfb0
Delete idea files
janfaracik 45252c1
Merge branch 'master' into new-header
janfaracik e050154
Merge branch 'master' into new-header
janfaracik 65d178e
Merge branch 'master' into new-header
timja dc8fa10
Merge branch 'master' into new-header
krisstern b55fdf8
Merge branch 'master' into new-header
janfaracik b444ad4
Update core/src/main/java/jenkins/views/Header.java
janfaracik 6021618
Merge branch 'master' into new-header
janfaracik 741787e
Sort actions manually in header
janfaracik 21bc645
Update markup and CSS
janfaracik eb061c7
Handle that dodgy SVG messing up the label
janfaracik b39590e
Merge branch 'master' into new-header
janfaracik 78a6ee6
Fix new computer missing sidepanel
janfaracik c4717e8
Merge branch 'fix-new-computer' into new-header
janfaracik bb67c4c
Merge branch 'master' into new-header
janfaracik 660b574
Merge branch 'master' into new-header
janfaracik d7e2354
Merge branch 'master' into new-header
janfaracik 98b3b4e
Merge branch 'master' into new-header
janfaracik ee1e9d8
Merge branch 'master' into new-header
janfaracik aec4fab
Merge branch 'master' into new-header
krisstern 22078cb
Merge branch 'master' into new-header
janfaracik afd5622
Update core/src/main/resources/lib/layout/header/actions.jelly
janfaracik db5c2ed
Update core/src/main/java/jenkins/views/Header.java
janfaracik b02349b
Update core/src/main/resources/lib/layout/header/actions.jelly
janfaracik 8f81ff7
Update Header.java
janfaracik File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
96 changes: 96 additions & 0 deletions
96
core/src/main/java/jenkins/model/navigation/UserAction.java
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,96 @@ | ||
| /* | ||
| * The MIT License | ||
| * | ||
| * Copyright (c) 2025, Jan Faracik | ||
| * | ||
| * Permission is hereby granted, free of charge, to any person obtaining a copy | ||
| * of this software and associated documentation files (the "Software"), to deal | ||
| * in the Software without restriction, including without limitation the rights | ||
| * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
| * copies of the Software, and to permit persons to whom the Software is | ||
| * furnished to do so, subject to the following conditions: | ||
| * | ||
| * The above copyright notice and this permission notice shall be included in | ||
| * all copies or substantial portions of the Software. | ||
| * | ||
| * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
| * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
| * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
| * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
| * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
| * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
| * THE SOFTWARE. | ||
| */ | ||
|
|
||
| package jenkins.model.navigation; | ||
|
|
||
| import static hudson.Functions.getAvatar; | ||
|
|
||
| import hudson.Extension; | ||
| import hudson.model.Action; | ||
| import hudson.model.RootAction; | ||
| import hudson.model.User; | ||
| import java.util.ArrayList; | ||
| import java.util.List; | ||
| import org.kohsuke.accmod.Restricted; | ||
| import org.kohsuke.accmod.restrictions.NoExternalUse; | ||
|
|
||
| /** | ||
| * Display the user avatar in the navigation bar. | ||
| * Provides a handy jumplist for common user actions. | ||
| */ | ||
| @Extension(ordinal = -1) | ||
| public class UserAction implements RootAction { | ||
|
|
||
| @Override | ||
| public String getIconFileName() { | ||
| User current = User.current(); | ||
|
|
||
| if (current == null) { | ||
| return null; | ||
| } | ||
|
|
||
| return getAvatar(current, "96x96"); | ||
| } | ||
|
|
||
| @Override | ||
| public String getDisplayName() { | ||
| User current = User.current(); | ||
|
|
||
| if (current == null) { | ||
| return null; | ||
| } | ||
|
|
||
| return current.getFullName(); | ||
| } | ||
|
|
||
| @Override | ||
| public String getUrlName() { | ||
| User current = User.current(); | ||
|
|
||
| if (current == null) { | ||
| return null; | ||
| } | ||
|
|
||
| return current.getUrl(); | ||
| } | ||
|
|
||
| @Restricted(NoExternalUse.class) | ||
| public User getUser() { | ||
| return User.current(); | ||
| } | ||
|
|
||
| @Restricted(NoExternalUse.class) | ||
| public List<Action> getActions() { | ||
| User current = User.current(); | ||
|
|
||
| if (User.current() == null) { | ||
| return null; | ||
| } | ||
|
|
||
| List<Action> actions = new ArrayList<>(); | ||
| actions.addAll(current.getPropertyActions()); | ||
| actions.addAll(current.getTransientActions()); | ||
| return actions.stream().filter(e -> e.getIconFileName() != null).toList(); | ||
| } | ||
| } | ||
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This would not work if
@Extensionis placed on a member other than a type (class), which would be unusual but is legal. Nor would it work for dynamically installed (ExtensionList.add) actions. Whatever you are trying to solve here, it sounds like the wrong way to do it (maybe there is some minor unfiled bug inExtensionList).