Skip to content

Commit bf82168

Browse files
authored
style(live-test): Update Copy Button style (#37632)
### What changed? ![image.png](https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/PTsI7qAmiIMkhFQg04QF/cf8fd0ab-14a9-4e47-a7ef-814f71361fa8.png) 1. Restyled the copy to clipboard button 2. Reordered styles so that it went element > class ### Why make this change? To improve the readability and aesthetics of the report generated by the template.
1 parent 9f02739 commit bf82168

File tree

1 file changed

+66
-42
lines changed
  • airbyte-ci/connectors/live-tests/src/live_tests/regression_tests/templates

1 file changed

+66
-42
lines changed

airbyte-ci/connectors/live-tests/src/live_tests/regression_tests/templates/report.html.j2

+66-42
Original file line numberDiff line numberDiff line change
@@ -25,67 +25,45 @@
2525
</script>
2626
<style>
2727
body {
28-
font-family: -apple-system,system-ui,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
28+
font-family: -apple-system,system-ui,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
2929
background-color: #0d1117;
3030
color: #c9d1d9;
3131
padding: 16px;
3232
font-size: 14px;
3333
}
3434
35-
.monospace {
36-
font-family: SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;
37-
margin: 0;
38-
font-size: 85%;
39-
color: #fff;
40-
}
41-
42-
.test-name {
43-
font-family: SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;
44-
font-size: 1.15rem
45-
}
46-
47-
.metric {
48-
text-align: center;
49-
}
50-
.highlighted {
51-
background-color: #212c36;
52-
}
5335
a {
5436
color: #4493f8;
5537
text-decoration: underline;
5638
text-underline-offset: .2rem;
5739
}
40+
5841
button {
5942
border: 1px solid #30363d;
6043
background-color: #1a1c26;
6144
padding: 5px;
6245
cursor: pointer;
46+
opacity: 0.7;
47+
border-radius: 5px;
48+
transition: opacity 0.5s;
6349
}
64-
65-
.container {
66-
max-width: 1280px;
67-
margin-right: auto;
68-
margin-left: auto;
50+
51+
button:hover {
52+
opacity: 1;
6953
}
54+
7055
section {
7156
margin-bottom: 30px;
7257
border: 1px solid #30363d;
7358
border-radius: 6px;
7459
}
7560
76-
.section_content {
77-
padding: 15px;
78-
}
79-
80-
.no-border {
81-
border: none;
82-
}
83-
8461
h1 {
8562
font-optical-sizing: auto;
8663
font-weight: 600;
8764
font-size: 2rem;
8865
}
66+
8967
h2 {
9068
font-size: 1.5rem;
9169
font-optical-sizing: auto;
@@ -120,14 +98,17 @@
12098
list-style: none;
12199
padding: 0;
122100
}
101+
123102
li {
124103
margin-bottom: 15px;
125104
}
105+
126106
table {
127107
border-collapse: collapse;
128108
margin-top: 15px;
129109
width: 100%;
130110
}
111+
131112
th, td {
132113
border: 1px solid #30363d;
133114
padding: 8px;
@@ -137,6 +118,7 @@
137118
overflow-x: auto;
138119
scrollbar-color: hotpink #0d1116;
139120
}
121+
140122
th {
141123
text-align: center;
142124
}
@@ -148,7 +130,41 @@
148130
scrollbar-color: hotpink #1a1b26;
149131
white-space: pre-wrap;
150132
}
151-
133+
134+
.monospace {
135+
font-family: SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;
136+
margin: 0;
137+
font-size: 85%;
138+
color: #fff;
139+
}
140+
141+
.test-name {
142+
font-family: SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;
143+
font-size: 1.15rem
144+
}
145+
146+
.metric {
147+
text-align: center;
148+
}
149+
150+
.highlighted {
151+
background-color: #212c36;
152+
}
153+
154+
.container {
155+
max-width: 1280px;
156+
margin-right: auto;
157+
margin-left: auto;
158+
}
159+
160+
.section_content {
161+
padding: 15px;
162+
}
163+
164+
.no-border {
165+
border: none;
166+
}
167+
152168
.full-width {
153169
width: 100%;
154170
}
@@ -169,9 +185,10 @@
169185
animation: rotation 1s linear infinite;
170186
margin-right: 10px;
171187
}
188+
172189
.loader::after,
173190
.loader::before {
174-
content: '';
191+
content: '';
175192
box-sizing: border-box;
176193
position: absolute;
177194
left: 0;
@@ -182,6 +199,7 @@
182199
transform: translate(150%, 150%);
183200
border-radius: 50%;
184201
}
202+
185203
.loader::before {
186204
left: auto;
187205
top: auto;
@@ -199,14 +217,20 @@
199217
.testDescription {
200218
color: #9c9c9c;
201219
}
220+
221+
.secondaryButton {
222+
font-size: 0.75rem;
223+
padding: 2px 10px;
224+
}
225+
202226
@keyframes rotation {
203227
0% {
204228
transform: rotate(0deg);
205229
}
206230
100% {
207231
transform: rotate(360deg);
208232
}
209-
}
233+
}
210234
</style>
211235
</head>
212236
<body>
@@ -288,16 +312,16 @@
288312
<section>
289313
<h2>Connection objects</h2>
290314
<div class="section_content">
291-
<h3>Source configuration <button class="monospace" onclick="copyToClipboard('config')">Copy</button></h3>
315+
<h3>Source configuration <button class="monospace secondaryButton" onclick="copyToClipboard('config')">📋 copy</button></h3>
292316
<pre><code class="language-json" id="config">{{ source_config }}</code></pre>
293317
{% if state %}
294-
<h3>State <button class="monospace" onclick="copyToClipboard('state')">Copy</button></h3>
318+
<h3>State <button class="monospace secondaryButton" onclick="copyToClipboard('state')">📋 copy</button></h3>
295319
<pre><code class="language-json" id="state">{{ state }}</code>
296320
</pre>
297321
{% endif %}
298-
<h3>Configured catalog <button class="monospace" onclick="copyToClipboard('configured-catalog')">Copy</button></h3>
322+
<h3>Configured catalog <button class="monospace secondaryButton" onclick="copyToClipboard('configured-catalog')">📋 copy</button></h3>
299323
<pre><code class="language-json" id="configured-catalog">{{ configured_catalog }}</code></pre>
300-
<h3>Catalog <button class="monospace" onclick="copyToClipboard('catalog')">Copy</button></h3>
324+
<h3>Catalog <button class="monospace secondaryButton" onclick="copyToClipboard('catalog')">📋 copy</button></h3>
301325
<pre><code class="language-json" id="catalog">{{ catalog }}</code></pre>
302326
</div>
303327
</section>
@@ -390,7 +414,7 @@
390414
<th>duplicate request count</th>
391415
<th>cache hit ratio</th>
392416
<th>request count</th>
393-
</tr>
417+
</tr>
394418
<tbody>
395419
{% for command in http_metrics_per_command %}
396420
<tr>
@@ -417,7 +441,7 @@
417441
<h2><span class="loader"></span>Requested URLs</h2>
418442
{% else%}
419443
<h2>Requested URLs</h2>
420-
{% endif %}
444+
{% endif %}
421445
<div class="section_content">
422446
{% for command, flows in requested_urls_per_command.items() %}
423447
<h3>{{ command.value.upper() }}</h3>
@@ -453,7 +477,7 @@
453477
<h2><span class="loader"></span>Test results</h2>
454478
{% else%}
455479
<h2>Test results</h2>
456-
{% endif %}
480+
{% endif %}
457481
<div class="section_content">
458482
{% for test in test_results %}
459483
<div class="test-result">

0 commit comments

Comments
 (0)