Skip to content

Commit ce41459

Browse files
authored
Ken/standardize scroll (#350)
## Summary Quick change to standardize scroll styles across the app ## Checklist - [ ] Added Unit Tests - [ ] Covered by existing CI - [ ] Integration tested - [ ] Documentation update <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - Style - Enhanced the appearance of scrollbars with updated styling and customizable color options. - Refactor - Simplified scroll behavior by replacing custom scrolling components with standard, CSS-managed scroll containers across the layout and key content areas. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
1 parent bff5c86 commit ce41459

File tree

6 files changed

+24
-75
lines changed

6 files changed

+24
-75
lines changed

frontend/src/app.css

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,16 +119,36 @@
119119
--job-queued-bg: 0 0% 16%;
120120
--job-queued-border: 0 0% 24%;
121121
--job-queued-active-border: 0 0% 40%;
122+
123+
--scrollcolor: hsla(0, 0%, 13%, 1);
124+
--scrollbackground: transparent;
125+
scrollbar-color: var(--scrollcolor) var(--scrollbackground);
122126
}
123127
}
124128

125129
@layer base {
126130
* {
127131
@apply border-border antialiased;
132+
scrollbar-width: thin;
128133
}
129134
body {
130135
@apply bg-background text-foreground;
131136
}
137+
138+
::-webkit-scrollbar {
139+
border-radius: 1rem;
140+
background: var(--scrollbackground);
141+
}
142+
143+
::-webkit-scrollbar-thumb {
144+
border-radius: 1rem;
145+
background: var(--scrollcolor);
146+
}
147+
148+
::-webkit-scrollbar-track {
149+
border-radius: 1rem;
150+
background: var(--scrollbackground);
151+
}
132152
}
133153

134154
@font-face {

frontend/src/lib/components/ui/scroll-area/index.ts

Lines changed: 0 additions & 10 deletions
This file was deleted.

frontend/src/lib/components/ui/scroll-area/scroll-area-scrollbar.svelte

Lines changed: 0 additions & 27 deletions
This file was deleted.

frontend/src/lib/components/ui/scroll-area/scroll-area.svelte

Lines changed: 0 additions & 32 deletions
This file was deleted.

frontend/src/routes/+layout.svelte

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
import NavigationSlider from '$lib/components/NavigationSlider.svelte';
66
import NavigationBar from '$lib/components/NavigationBar.svelte';
77
import BreadcrumbNav from '$lib/components/BreadcrumbNav.svelte';
8-
import { ScrollArea } from '$lib/components/ui/scroll-area';
98
import { entityConfig } from '$lib/types/Entity/Entity';
109
1110
let { children }: { children: Snippet } = $props();
@@ -33,11 +32,11 @@
3332
<div
3433
class="absolute top-0 left-0 w-full h-4 border-l border-t border-border rounded-tl-xl z-20"
3534
></div>
36-
<ScrollArea class="flex-1">
35+
<div class="flex-1 overflow-y-auto">
3736
<div class="px-8 py-5">
3837
<BreadcrumbNav {breadcrumbs} class="mb-[38px]" />
3938
{@render children()}
4039
</div>
41-
</ScrollArea>
40+
</div>
4241
</main>
4342
</div>

frontend/src/routes/joins/[slug]/observability/drift/+page.svelte

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
1010
import CollapsibleSection from '$lib/components/CollapsibleSection.svelte';
1111
import type { ITileSummarySeries } from '$src/lib/types/codegen';
12-
import { ScrollArea } from '$lib/components/ui/scroll-area';
1312
import { Api } from '$lib/api/api';
1413
import { Dialog, DialogContent, DialogHeader } from '$lib/components/ui/dialog';
1514
import { formatDate } from '$lib/util/format';
@@ -219,7 +218,7 @@
219218
/>
220219
</DialogHeader>
221220

222-
<ScrollArea class="flex-grow px-7">
221+
<div class="flex-grow px-7 overflow-y-auto">
223222
{#if selectedSeriesPoint}
224223
{@const [groupName, values] =
225224
driftSeriesByGroupName.find(([_, values]) =>
@@ -367,7 +366,7 @@
367366
{/snippet}
368367
</CollapsibleSection>
369368
{/if}
370-
</ScrollArea>
369+
</div>
371370
</DialogContent>
372371
</Dialog>
373372

0 commit comments

Comments
 (0)