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

[JENKINS 60920] header breadcrumbs CSS update #4463

Merged
Merged
Show file tree
Hide file tree
Changes from 23 commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
925e713
Created new styles for the page header
fqueiruga Jan 28, 2020
6868cff
New styles for breadcrumbs and warnings monitor
fqueiruga Jan 2, 2020
9d1fb59
Adds the svgxuse polyfill for svg sprites on IE 11
fqueiruga Jan 14, 2020
7c40d96
Create new base styles file and undo changes to the layout-common and…
fqueiruga Jan 28, 2020
9441dc4
Fixes and refactor for the new UI CSS code
fqueiruga Jan 27, 2020
fcccd45
Make the new header color and logo section opt-in
fqueiruga Jan 28, 2020
97bd6ff
Rename and refactor the page-header css
fqueiruga Jan 29, 2020
090636b
Updated localization for header and admin monitor
fqueiruga Jan 30, 2020
a4856ff
Update core/src/main/resources/lib/layout/layout.jelly
fqueiruga Feb 3, 2020
3fd2181
Most measurements migrated to REMs
fqueiruga Feb 3, 2020
8b1410c
Code cleanup and apply new-ui toggle to the html.jelly file
fqueiruga Feb 3, 2020
fa95c46
Breadcrumb fixes
fqueiruga Feb 3, 2020
be0860c
Implemented some fixes from the feedback received
fqueiruga Feb 4, 2020
7751b34
Created jelly helper to use svg icons
fqueiruga Feb 4, 2020
42c9371
Fix: restore proper icon for the user on the header
fqueiruga Feb 4, 2020
10a77e6
Fixes for Edge, IE 11 and IE 10
fqueiruga Feb 5, 2020
6e31a40
Improvements on the header and breadcrumbs
fqueiruga Feb 6, 2020
0a1a835
Bumped JTH version with the SVG download fix
fqueiruga Feb 10, 2020
58b04d2
Update test/pom.xml
fqueiruga Feb 12, 2020
a1e45d3
Added a function to check boolean system properties from jelly
fqueiruga Feb 12, 2020
b55389d
Fix header links and add svg styles for legacy layout
fqueiruga Feb 17, 2020
fc1a10f
Some bug fixing for the new header
fqueiruga Feb 17, 2020
2d5420c
Update core/src/main/java/hudson/Functions.java
fqueiruga Feb 18, 2020
205fa3a
Do not check the system property on every page render
daniel-beck Feb 19, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 12 additions & 0 deletions core/src/main/java/hudson/Functions.java
Expand Up @@ -493,6 +493,18 @@ public static String getSystemProperty(String key) {
return SystemProperties.getString(key);
}

/**
* Gets the boolean system property indicated by the specific key.
*
* Delegates to {@link SystemProperties#getBoolean(java.lang.String)}
fqueiruga marked this conversation as resolved.
Show resolved Hide resolved
*
* @since TODO
*/
@Restricted(DoNotUse.class)
public static boolean isSystemPropertyEnabled(String key) {
fqueiruga marked this conversation as resolved.
Show resolved Hide resolved
return SystemProperties.getBoolean(key);
fqueiruga marked this conversation as resolved.
Show resolved Hide resolved
}

public static Map getEnvVars() {
return new TreeMap<>(EnvVars.masterEnvVars);
}
Expand Down
Expand Up @@ -27,7 +27,11 @@ THE SOFTWARE.
<st:adjunct includes="jenkins.management.AdministrativeMonitorsDecorator.resources"/>
<div id="visible-am-container">
<a id="visible-am-button" href="#" onclick="toggleVisibleAmList(event)" title="${%tooltip(it.activeAdministrativeMonitorsCount)}">
${it.activeAdministrativeMonitorsCount}
<l:svgIcon href="${resURL}/images/material-icons/svg-sprite-social-symbol.svg#ic_notifications_24px" />
<span class="hidden-xs hidden-sm">${%monitors(it.activeAdministrativeMonitorsCount)}</span>
<span class="am-monitor__count">
${it.activeAdministrativeMonitorsCount}
</span>
</a>
<div id="visible-am-list">
<j:forEach var="am" items="${it.activeAdministrativeMonitors}">
Expand All @@ -41,7 +45,14 @@ THE SOFTWARE.
</div>
</div>
<script type="text/javascript">
document.getElementById("header").appendChild(document.getElementById("visible-am-container"));
(function() {
var amContainer = document.getElementById("visible-am-container");
var amInsertion = document.getElementById("visible-am-insertion");

if (amInsertion) {
amInsertion.appendChild(amContainer);
}
})();
</script>
</j:if>
</j:jelly>
@@ -1 +1,2 @@
tooltip=There are {0} active administrative monitors.
tooltip=There are {0} active administrative monitors.
monitors={0,choice,0#monitors|1#monitor|1<monitors}
Expand Up @@ -22,3 +22,4 @@

Manage\ Jenkins=Jenkins verwalten
tooltip={0,choice,0#Keine Administrator-Warnungen sind|1#{0} Administrator-Warnung ist|1<{0} Administrator-Warnungen sind} aktiv.
monitors={0,choice,0#Warnungen|1#Warnung|1<Warnungen}
fqueiruga marked this conversation as resolved.
Show resolved Hide resolved
@@ -1,29 +1,28 @@
#visible-am-container {
float: right;
height: 100%;
}

#visible-am-button {
text-align: center;
font-size: 20px;
font-weight: bold;
background-color: #e01716;
color: #fff;
margin: 0;
line-height: 40px;
text-decoration: none;
min-width: 2em;
display: inline-block;
position: relative;
transition: all .1s;
}
#visible-am-button:hover, #visible-am-button:focus, #visible-am-button:active {
background: #e23635;
}
#visible-am-container.visible #visible-am-button {
box-shadow: inset 0px 1px 14px rgba(0,0,0,.5);

#visible-am-button .am-monitor__count {
display: inline-block;
display: inline-flex;
Wadeck marked this conversation as resolved.
Show resolved Hide resolved
justify-content: center;
align-items: center;
height: 20px;
min-width: 20px;

color:#F94B4E;
background-color: #fff;
font-weight: bold;

border-radius: 4px;
}
#visible-am-container div#visible-am-list {
position: absolute;
top: 35px;
top: 48px;
right: 2%;
height: auto;
z-index: 0;
Expand All @@ -32,7 +31,10 @@
display: block;
background-color: #fff;
border-radius: 5px;
box-shadow: 0 7px 20px rgba(0,0,0,.1);

/* Darken the box shadow to make the popup visible over the search box */
box-shadow: 0 1px 7px 0 rgba(0,0,0,0.3);

transition: all .15s cubic-bezier(.84,.03,.21,.96);
opacity: 0;
transform: scale(0);
Expand All @@ -46,7 +48,7 @@
content: '';
display: inline-block;
position: absolute;
bottom: -5px;
bottom: 0;
left: 32%;
width: 0;
height: 0;
Expand All @@ -55,10 +57,10 @@
border-bottom: 7px solid #fff;
opacity: 0;
transition: all .05s;
z-index: 1001;
}
#visible-am-container.visible #visible-am-button:after {
opacity: 1;
bottom: 4px;
transition: all .25s;
}
#visible-am-container .am-message {
Expand All @@ -85,3 +87,23 @@
#visible-am-container .am-message dl dt::after {
content: ": ";
}

/* Restore hyperlink style overriden by the page header */
#visible-am-container #visible-am-list a:link {
display: inline-block;
color: #204A87;
text-decoration: underline;
padding: 0;
font-weight: normal;
}
#visible-am-container #visible-am-list a:visited {
color: #5c3566;
}
#visible-am-container #visible-am-list a:hover,
#visible-am-container #visible-am-list a:focus,
#visible-am-container #visible-am-list a:active {
color: #5c3566;
text-decoration-color: #5c3566;
background-color: transparent;
text-decoration: underline;
}
63 changes: 31 additions & 32 deletions core/src/main/resources/lib/layout/breadcrumbBar.jelly
Expand Up @@ -39,49 +39,48 @@ THE SOFTWARE.
<st:adjunct includes="lib.layout.breadcrumbs" />
<div class="top-sticker noedge">
<div class="top-sticker-inner">
<div id="right-top-nav">
<j:if test="${norefresh==null or norefresh==false}">
<div id="right-top-nav">
<div class="smallfont">
<div class="breadcrumbs__wrapper">
<ul id="breadcrumbs">
<j:forEach var="anc" items="${request.ancestors}">
<j:if test="${h.isModel(anc.object) and anc.prev.url!=anc.url}">
<li class="item">
<a href="${anc.url}/" class="${h.isModelWithContextMenu(anc.object)?'model-link':null} inside">
${anc.object.displayName}
</a>
</li>
<j:choose>
<j:when test="${h.isAutoRefresh(request)}">
<a href="?auto_refresh=false">${%DISABLE AUTO REFRESH}</a>
<j:when test="${h.isModelWithChildren(anc.object)}">
<li class="children" href="${anc.url}/">
<!-- shows '>' for rendering children -->
</li>
</j:when>
<j:otherwise>
<a href="?auto_refresh=true">${%ENABLE AUTO REFRESH}</a>
<li class="separator">
</li>
</j:otherwise>
</j:choose>
</div>
</div>
</j:if>
</div>
<ul id="breadcrumbs">
<j:forEach var="anc" items="${request.ancestors}">
<j:if test="${h.isModel(anc.object) and anc.prev.url!=anc.url}">
<li class="item">
<a href="${anc.url}/" class="${h.isModelWithContextMenu(anc.object)?'model-link':null} inside">
${anc.object.displayName}
</a>
</li>
</j:if>
</j:forEach>

<!-- render additional breadcrumb items -->
<d:invokeBody />
</ul>

<j:if test="${norefresh==null or norefresh==false}">
<div id="right-top-nav">
<j:choose>
<j:when test="${h.isModelWithChildren(anc.object)}">
<li class="children" href="${anc.url}/">
<!-- shows '>' for rendering children -->
</li>
<j:when test="${h.isAutoRefresh(request)}">
<a href="?auto_refresh=false" class="breadcrumbs__auto-refresh">${%DISABLE AUTO REFRESH}</a>
</j:when>
<j:otherwise>
<li class="separator">
</li>
<a href="?auto_refresh=true" class="breadcrumbs__auto-refresh">${%ENABLE AUTO REFRESH}</a>
</j:otherwise>
</j:choose>
</j:if>
</j:forEach>

<!-- render additional breadcrumb items -->
<d:invokeBody />
</ul>
</div>
</j:if>

<div id="breadcrumb-menu-target"/><!-- this is where the menu gets rendered -->
<div id="breadcrumb-menu-target"/><!-- this is where the menu gets rendered -->
</div>
</div>
</div>
</td>
Expand Down