Skip to content

Commit 77e89f5

Browse files
committed
hotfix
1 parent f080360 commit 77e89f5

File tree

2 files changed

+17
-11
lines changed

2 files changed

+17
-11
lines changed

apps/web/src/lib/components/recal/Left.svelte

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -94,11 +94,17 @@
9494
9595
// Cap at measured content height to prevent gaps
9696
$: topHeight = Math.min(rawTopHeight, topContentHeight);
97-
$: bottomHeight = usableHeight - topHeight;
97+
$: bottomHeight = Math.min(usableHeight - topHeight, bottomContentHeight);
98+
99+
// Hide handlebar if content actually fits after capping
100+
$: actuallyShowHandlebar =
101+
showHandlebar && topHeight + bottomHeight >= usableHeight - 10;
98102
99103
// Style strings
100-
$: topSectionStyle = showHandlebar ? `height: ${topHeight}px;` : "";
101-
$: bottomSectionStyle = showHandlebar ? `height: ${bottomHeight}px;` : "";
104+
$: topSectionStyle = actuallyShowHandlebar ? `height: ${topHeight}px;` : "";
105+
$: bottomSectionStyle = actuallyShowHandlebar
106+
? `height: ${bottomHeight}px;`
107+
: "";
102108
103109
function handleResize(e: CustomEvent<{ ratio: number }>) {
104110
if (e.detail.ratio === -1) {
@@ -126,8 +132,8 @@
126132
<!-- Top Section: Events + Saved -->
127133
<div
128134
class="flex flex-col gap-2 overflow-y-hidden min-h-0"
129-
class:shrink-0={showHandlebar}
130-
class:flex-1={!showHandlebar}
135+
class:shrink-0={actuallyShowHandlebar}
136+
class:flex-1={!actuallyShowHandlebar}
131137
style={topSectionStyle}>
132138
<div bind:this={eventsWrapperEl} class="shrink-0">
133139
<Events />
@@ -138,7 +144,7 @@
138144
</div>
139145

140146
<!-- Handlebar -->
141-
{#if showHandlebar}
147+
{#if actuallyShowHandlebar}
142148
<Handlebar
143149
on:resize={handleResize}
144150
containerHeight={usableHeight} />
@@ -148,9 +154,9 @@
148154
{#if hasSearchResults}
149155
<div
150156
class="min-h-0 flex flex-col flex-1"
151-
class:shrink-0={showHandlebar}
152-
class:overflow-y-hidden={showHandlebar}
153-
class:overflow-y-auto={!showHandlebar}
157+
class:shrink-0={actuallyShowHandlebar}
158+
class:overflow-y-hidden={actuallyShowHandlebar}
159+
class:overflow-y-auto={!actuallyShowHandlebar}
154160
style={bottomSectionStyle}>
155161
<SearchResults bind:contentHeight={searchContentHeight} />
156162
</div>

apps/web/src/lib/components/recal/left/SearchResults.svelte

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,10 @@
3535
<div
3636
class="flex flex-col overflow-y-hidden border-2
3737
dark:border-zinc-800
38-
rounded-sm">
38+
rounded-sm flex-1">
3939
<div
4040
bind:this={scrollContainerEl}
41-
class="overflow-y-auto"
41+
class="overflow-y-auto flex-1"
4242
style="scrollbar-gutter: stable;">
4343
{#key resetKey}
4444
{#each $searchResults as course}

0 commit comments

Comments
 (0)