Skip to content

Commit f7c1f67

Browse files
authored
Move experimental run sidepanel to overflow (#11127)
1 parent 865bff5 commit f7c1f67

File tree

4 files changed

+67
-20
lines changed

4 files changed

+67
-20
lines changed

core/src/main/resources/hudson/model/AbstractBuild/sidepanel.jelly

Lines changed: 22 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -30,17 +30,29 @@ THE SOFTWARE.
3030
<l:header />
3131
<l:side-panel>
3232
<l:tasks>
33+
<l:userExperimentalFlag var="newBuildPage" flagClassName="jenkins.model.experimentalflags.NewBuildPageUserExperimentalFlag" />
3334
<j:set var="buildUrl" value="${h.decompose(request2)}" />
34-
<st:include page="tasks.jelly"/>
35-
<st:include page="delete.jelly" />
36-
<st:include page="actions.jelly" />
37-
<t:actions actions="${it.transientActions}"/>
38-
<j:if test="${it.previousBuild!=null}">
39-
<l:task contextMenu="false" href="${buildUrl.previousBuildUrl}" icon="icon-previous icon-md" title="${%Previous Build}"/>
40-
</j:if>
41-
<j:if test="${it.nextBuild!=null}">
42-
<l:task contextMenu="false" href="${buildUrl.nextBuildUrl}" icon="icon-next icon-md" title="${%Next Build}"/>
43-
</j:if>
35+
36+
<j:choose>
37+
<j:when test="${newBuildPage}">
38+
<st:include page="tasks.jelly"/>
39+
<st:include page="actions.jelly" />
40+
<t:actions actions="${it.transientActions}"/>
41+
<st:include page="delete.jelly" />
42+
</j:when>
43+
<j:otherwise>
44+
<st:include page="tasks.jelly"/>
45+
<st:include page="delete.jelly" />
46+
<st:include page="actions.jelly" />
47+
<t:actions actions="${it.transientActions}"/>
48+
<j:if test="${it.previousBuild!=null}">
49+
<l:task contextMenu="false" href="${buildUrl.previousBuildUrl}" icon="icon-previous icon-md" title="${%Previous Build}"/>
50+
</j:if>
51+
<j:if test="${it.nextBuild!=null}">
52+
<l:task contextMenu="false" href="${buildUrl.nextBuildUrl}" icon="icon-next icon-md" title="${%Next Build}"/>
53+
</j:if>
54+
</j:otherwise>
55+
</j:choose>
4456
</l:tasks>
4557
</l:side-panel>
4658
</j:jelly>

core/src/main/resources/hudson/model/AbstractBuild/tasks.jelly

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,31 @@ THE SOFTWARE.
2727
-->
2828
<?jelly escape-by-default='true'?>
2929
<j:jelly xmlns:j="jelly:core" xmlns:l="/lib/layout" xmlns:p="/lib/hudson/project">
30+
<j:choose>
31+
<j:when test="${newBuildPage}">
32+
<l:task href="${buildUrl.baseUrl}/changes" icon="symbol-changes" title="${%Changes}"/>
33+
<p:console-link/>
34+
<j:choose>
35+
<j:when test="${h.hasPermission(it,it.UPDATE)}">
36+
<l:task icon="symbol-edit-note" href="${buildUrl.baseUrl}/configure" title="${%Edit Build Information}"/>
37+
</j:when>
38+
<j:otherwise>
39+
<l:task icon="symbol-view" href="${buildUrl.baseUrl}/configure" title="${%View Build Information}"/>
40+
</j:otherwise>
41+
</j:choose>
42+
</j:when>
43+
<j:otherwise>
3044
<l:task contextMenu="false" href="${buildUrl.baseUrl}/" icon="symbol-details" title="${%Status}"/>
3145
<l:task href="${buildUrl.baseUrl}/changes" icon="symbol-changes" title="${%Changes}"/>
3246
<p:console-link/>
3347
<j:choose>
34-
<j:when test="${h.hasPermission(it,it.UPDATE)}">
35-
<l:task icon="symbol-edit-note" href="${buildUrl.baseUrl}/configure" title="${%Edit Build Information}"/>
36-
</j:when>
37-
<j:otherwise>
38-
<l:task icon="symbol-view" href="${buildUrl.baseUrl}/configure" title="${%View Build Information}"/>
39-
</j:otherwise>
48+
<j:when test="${h.hasPermission(it,it.UPDATE)}">
49+
<l:task icon="symbol-edit-note" href="${buildUrl.baseUrl}/configure" title="${%Edit Build Information}"/>
50+
</j:when>
51+
<j:otherwise>
52+
<l:task icon="symbol-view" href="${buildUrl.baseUrl}/configure" title="${%View Build Information}"/>
53+
</j:otherwise>
4054
</j:choose>
55+
</j:otherwise>
56+
</j:choose>
4157
</j:jelly>

core/src/main/resources/hudson/model/Run/new-build-page.jelly

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,18 +24,23 @@ THE SOFTWARE.
2424
-->
2525

2626
<?jelly escape-by-default='true'?>
27-
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:l="/lib/layout" xmlns:t="/lib/hudson" xmlns:x="jelly:xml">
27+
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:l="/lib/layout" xmlns:t="/lib/hudson" xmlns:dd="/lib/layout/dropdowns">
2828
<l:layout title="${it.fullDisplayName}">
29-
<st:include page="sidepanel.jelly" />
3029

3130
<!-- no need for additional breadcrumb here as we're on an index page already including breadcrumb -->
3231
<l:main-panel>
33-
<script src="${resURL}/jsbundles/pages/job.js" type="text/javascript" defer="true" />
34-
3532
<j:set var="controls">
3633
<l:hasPermission permission="${it.UPDATE}">
3734
<st:include page="logKeep.jelly" />
3835
</l:hasPermission>
36+
<l:overflowButton>
37+
<dd:custom>
38+
<div class="app-build-overflow">
39+
<j:set var="mode" value="side-panel" />
40+
<st:include page="sidepanel.jelly" />
41+
</div>
42+
</dd:custom>
43+
</l:overflowButton>
3944
</j:set>
4045

4146
<t:buildCaption controls="${controls}">${it.displayName}</t:buildCaption>

src/main/scss/pages/_build.scss

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,20 @@
9494
}
9595
}
9696

97+
.app-build-overflow {
98+
#side-panel {
99+
width: 250px !important;
100+
101+
#tasks {
102+
margin: 0;
103+
104+
.task {
105+
margin-left: unset !important;
106+
}
107+
}
108+
}
109+
}
110+
97111
.app-console-output-widget {
98112
overflow-y: auto;
99113
margin: 0 -1rem -1rem;

0 commit comments

Comments
 (0)