Skip to content

Commit

Permalink
Remove chart controls in print view (#1753)
Browse files Browse the repository at this point in the history
Most buttons are removed from the print view already, but some of the
chart UX was still there; this removes it, resulting in a cleaner print
view.

Issue #1747 Print view improvements
  • Loading branch information
slifty authored Feb 18, 2024
1 parent d22bef3 commit f1171f3
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 0 deletions.
9 changes: 9 additions & 0 deletions frontend/src/charts/Chart.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
<slot />
<button
type="button"
class="show-charts"
on:click={() => {
showCharts.update((v) => !v);
}}
Expand All @@ -76,3 +77,11 @@
{/if}
{/if}
</div>

<style>
@media print {
button.show-charts {
display: none;
}
}
</style>
15 changes: 15 additions & 0 deletions frontend/src/charts/ChartSwitcher.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -72,4 +72,19 @@
button:hover {
color: var(--text-color-lighter);
}
@media print {
button {
display: none;
border-left: none;
}
button + button {
border-left: none;
}
button.selected {
display: inline;
}
}
</style>
6 changes: 6 additions & 0 deletions frontend/src/charts/ModeSwitch.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,10 @@
label + label {
margin-left: 0.125rem;
}
@media print {
label {
display: none;
}
}
</style>
6 changes: 6 additions & 0 deletions frontend/src/charts/SelectCombobox.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -207,4 +207,10 @@
color: var(--background);
background-color: var(--link-color);
}
@media print {
span {
display: none;
}
}
</style>

0 comments on commit f1171f3

Please sign in to comment.