Skip to content

Commit 810b6fb

Browse files
committed
Build results page restoration.
1 parent e9251bc commit 810b6fb

File tree

3 files changed

+156
-1
lines changed

3 files changed

+156
-1
lines changed

FrontEnd/main.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ $mobile-breakpoint: 740px;
2222
@import 'styles/breadcrumbs';
2323
@import 'styles/build_logs';
2424
@import 'styles/build_monitor';
25+
@import 'styles/build_results';
2526
@import 'styles/copyable_input';
2627
@import 'styles/error';
2728
@import 'styles/github_highlighting';

FrontEnd/styles/build_results.scss

Lines changed: 154 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,154 @@
1+
// Copyright Dave Verwer, Sven A. Schmidt, and other contributors.
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
// -------------------------------------------------------------------------
16+
// Build results page, showing all builds for a package.
17+
// -------------------------------------------------------------------------
18+
19+
.build-results {
20+
margin: 0;
21+
padding: 0;
22+
23+
li {
24+
margin: 5px 0;
25+
26+
@media screen and (max-width: $mobile-breakpoint) {
27+
margin: 20px 0;
28+
}
29+
}
30+
31+
.row {
32+
display: grid;
33+
grid-template-columns: 3fr 7fr;
34+
35+
.row-labels {
36+
display: flex;
37+
grid-row: 2;
38+
flex-direction: column;
39+
justify-content: center;
40+
41+
p {
42+
margin: 0;
43+
}
44+
}
45+
46+
.column-labels {
47+
display: flex;
48+
grid-column: 2;
49+
flex-direction: row;
50+
}
51+
52+
.results {
53+
display: flex;
54+
grid-column: 2;
55+
flex-direction: row;
56+
}
57+
58+
&:not(:first-child) {
59+
.row-labels {
60+
grid-row: unset;
61+
}
62+
63+
.column-labels {
64+
display: none;
65+
}
66+
}
67+
68+
@media (max-width: $mobile-breakpoint) {
69+
grid-template-columns: 1fr;
70+
71+
.row-labels,
72+
.column-labels,
73+
.results {
74+
grid-column: unset;
75+
grid-row: unset;
76+
}
77+
78+
.column-labels {
79+
display: flex;
80+
}
81+
}
82+
}
83+
84+
.column-labels > div {
85+
display: flex;
86+
flex-direction: column;
87+
flex-basis: 0;
88+
flex-grow: 1;
89+
align-items: center;
90+
justify-content: flex-start;
91+
padding: 5px 0;
92+
font-size: 14px;
93+
font-weight: 600;
94+
95+
small {
96+
font-weight: normal;
97+
}
98+
}
99+
100+
.results > div {
101+
position: relative;
102+
display: flex;
103+
flex-basis: 0;
104+
flex-grow: 1;
105+
align-items: center;
106+
justify-content: center;
107+
height: 35px;
108+
margin: 0 3px;
109+
background-color: var(--grid-default-background);
110+
111+
&.succeeded > a,
112+
&.failed > a {
113+
padding-left: 25px;
114+
background-position: left center;
115+
background-repeat: no-repeat;
116+
background-size: 18px;
117+
}
118+
119+
&.succeeded {
120+
background-color: var(--grid-succeeded-background);
121+
122+
a {
123+
background-image: var(--image-build-succeeded);
124+
}
125+
}
126+
127+
&.failed {
128+
background-color: var(--grid-failed-background);
129+
130+
a {
131+
background-image: var(--image-build-failed);
132+
}
133+
}
134+
135+
> .generated-docs {
136+
position: absolute;
137+
right: 5px;
138+
display: inline-block;
139+
width: 25px;
140+
height: 25px;
141+
background-position: center;
142+
background-repeat: no-repeat;
143+
background-size: 15px;
144+
background-color: var(--grid-callout-background);
145+
background-image: var(--image-documentation);
146+
border-radius: 50%;
147+
}
148+
}
149+
150+
.column-labels > div > span {
151+
font-size: 16px;
152+
background-position: top 4px right;
153+
}
154+
}

Sources/App/Views/PackageController/Builds/BuildIndex+View.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ enum BuildIndex {
8787
})
8888
),
8989
.ul(
90-
.class("matrix builds"),
90+
.class("build-results"),
9191
.group(model.buildMatrix[swiftVersion].map(\.node))
9292
)
9393
)

0 commit comments

Comments
 (0)