Skip to content

Commit 7a0469b

Browse files
committed
Change layout of comparison table
Remove fixed layout hacks and improve the layout w.r.t. the new expansion icon.
1 parent 463a886 commit 7a0469b

File tree

1 file changed

+21
-13
lines changed

1 file changed

+21
-13
lines changed

site/frontend/src/pages/compare/compile/table/comparisons-table.vue

Lines changed: 21 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -90,12 +90,12 @@ const {toggleExpanded, isExpanded} = useExpandedStore();
9090
<table v-else class="benches compare">
9191
<thead>
9292
<tr>
93-
<th></th>
93+
<th class="toggle"></th>
9494
<th>Benchmark</th>
9595
<th>Profile</th>
9696
<th>Scenario</th>
9797
<th>% Change</th>
98-
<th>
98+
<th class="narrow">
9999
Significance Threshold
100100
<Tooltip>
101101
The minimum % change that is considered significant. The higher
@@ -109,7 +109,7 @@ const {toggleExpanded, isExpanded} = useExpandedStore();
109109
how the significance threshold is calculated.
110110
</Tooltip>
111111
</th>
112-
<th>
112+
<th class="narrow">
113113
Significance Factor
114114
<Tooltip>
115115
How much a particular result is over the significance threshold. A
@@ -124,7 +124,7 @@ const {toggleExpanded, isExpanded} = useExpandedStore();
124124
<tbody>
125125
<template v-for="comparison in comparisons">
126126
<tr>
127-
<td @click="toggleExpanded(comparison.testCase)">
127+
<td @click="toggleExpanded(comparison.testCase)" class="toggle">
128128
{{ isExpanded(comparison.testCase) ? "▼" : "▶" }}
129129
</td>
130130
<td>
@@ -161,7 +161,7 @@ const {toggleExpanded, isExpanded} = useExpandedStore();
161161
</div>
162162
</div>
163163
</td>
164-
<td>
164+
<td class="narrow">
165165
<div class="numeric-aligned">
166166
<div>
167167
{{
@@ -172,7 +172,7 @@ const {toggleExpanded, isExpanded} = useExpandedStore();
172172
</div>
173173
</div>
174174
</td>
175-
<td>
175+
<td class="narrow">
176176
<div class="numeric-aligned">
177177
<div>
178178
{{
@@ -214,8 +214,9 @@ const {toggleExpanded, isExpanded} = useExpandedStore();
214214

215215
<style scoped lang="scss">
216216
.benches {
217+
width: 100%;
218+
table-layout: auto;
217219
font-size: medium;
218-
table-layout: fixed;
219220
220221
td,
221222
th {
@@ -237,15 +238,22 @@ const {toggleExpanded, isExpanded} = useExpandedStore();
237238
border-right: dotted 1px;
238239
}
239240
240-
.benches th {
241-
text-align: center;
242-
min-width: 50px;
241+
.benches {
242+
td,
243+
th {
244+
text-align: center;
245+
246+
&.toggle {
247+
padding-right: 5px;
248+
cursor: pointer;
249+
}
250+
&.narrow {
251+
max-width: 100px;
252+
}
253+
}
243254
}
244255
245256
.benches td {
246-
text-align: center;
247-
width: 25%;
248-
249257
& > .numeric-aligned {
250258
display: flex;
251259
flex-direction: column;

0 commit comments

Comments
 (0)