Skip to content

Commit 1b84809

Browse files
authored
Merge pull request #214 from pylon-code/upstream/2026-08-31-title-bar-fade
fix(web): reduce the title bar scroll fade height
2 parents b5c0ef7 + b21bf57 commit 1b84809

5 files changed

Lines changed: 17 additions & 17 deletions

File tree

apps/web/src/components/chat/MessagesTimeline.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,7 @@ describe("MessagesTimeline", () => {
385385

386386
expect(compactMarkup).toContain('class="h-3 sm:h-4"');
387387
expect(compactMarkup).not.toContain("topbar-scroll-fade");
388-
expect(fadedMarkup).toContain('class="h-10 sm:h-12"');
388+
expect(fadedMarkup).toContain('class="h-[var(--workspace-titlebar-scroll-fade-height)]"');
389389
expect(fadedMarkup).toContain("topbar-scroll-fade");
390390
});
391391

apps/web/src/components/chat/MessagesTimeline.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,9 @@ interface TimelineRowActivityState {
185185
const TimelineRowCtx = createContext<TimelineRowSharedState>(null!);
186186
const TimelineRowActivityCtx = createContext<TimelineRowActivityState>(null!);
187187
const TIMELINE_LIST_HEADER = <div className="h-3 sm:h-4" />;
188-
const TIMELINE_LIST_FADE_HEADER = <div className="h-10 sm:h-12" />;
188+
const TIMELINE_LIST_FADE_HEADER = (
189+
<div className="h-[var(--workspace-titlebar-scroll-fade-height)]" />
190+
);
189191

190192
// Header row shown when older turns exist beyond the loaded window. Plain
191193
// button, no spinner animation; the label change is the loading indicator.
@@ -199,7 +201,7 @@ function TimelineLoadEarlierHeader({
199201
fade: boolean;
200202
}) {
201203
return (
202-
<div className={fade ? "pt-10 sm:pt-12" : "pt-3 sm:pt-4"}>
204+
<div className={fade ? "pt-[var(--workspace-titlebar-scroll-fade-height)]" : "pt-3 sm:pt-4"}>
203205
<div className="mx-auto w-full max-w-3xl pb-2">
204206
<button
205207
type="button"

apps/web/src/components/settings/settingsLayout.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ export function SettingsPageContainer({
250250
return (
251251
<SettingsSearchTargetProvider targetId={targetId} onTargetHandled={clearTargetHash}>
252252
<div
253-
className="topbar-scroll-fade scrollbar-gutter-both flex-1 overflow-y-auto [--topbar-scroll-fade-height:1.5rem] sm:[--topbar-scroll-fade-height:1.5rem]"
253+
className="topbar-scroll-fade scrollbar-gutter-both flex-1 overflow-y-auto"
254254
data-settings-page-scroll
255255
>
256256
<WorkspacePageContainer width={width} className={cn("gap-12", className)}>

apps/web/src/index.css

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ html[data-mobile-composer-route-transition="true"]::view-transition-old(t3-mobil
111111
--workspace-native-controls-inset: 0px;
112112
--workspace-titlebar-control-size: 1.75rem;
113113
--workspace-titlebar-control-gap: 0.75rem;
114+
--workspace-titlebar-scroll-fade-height: 1.5rem;
114115

115116
@variant dark {
116117
--appearance-contrast-target: white;
@@ -358,7 +359,6 @@ html[data-mobile-composer-route-transition="true"]::view-transition-old(t3-mobil
358359
}
359360

360361
@utility topbar-scroll-fade {
361-
--topbar-scroll-fade-height: 2.5rem;
362362
-webkit-mask-image:
363363
linear-gradient(
364364
to bottom,
@@ -374,8 +374,8 @@ html[data-mobile-composer-route-transition="true"]::view-transition-old(t3-mobil
374374
-webkit-mask-position: top, bottom, right;
375375
-webkit-mask-repeat: no-repeat;
376376
-webkit-mask-size:
377-
100% var(--topbar-scroll-fade-height),
378-
100% calc(100% - var(--topbar-scroll-fade-height)),
377+
100% var(--workspace-titlebar-scroll-fade-height),
378+
100% calc(100% - var(--workspace-titlebar-scroll-fade-height)),
379379
var(--app-scrollbar-width) 100%;
380380
mask-image:
381381
linear-gradient(
@@ -392,13 +392,9 @@ html[data-mobile-composer-route-transition="true"]::view-transition-old(t3-mobil
392392
mask-position: top, bottom, right;
393393
mask-repeat: no-repeat;
394394
mask-size:
395-
100% var(--topbar-scroll-fade-height),
396-
100% calc(100% - var(--topbar-scroll-fade-height)),
395+
100% var(--workspace-titlebar-scroll-fade-height),
396+
100% calc(100% - var(--workspace-titlebar-scroll-fade-height)),
397397
var(--app-scrollbar-width) 100%;
398-
399-
@variant sm {
400-
--topbar-scroll-fade-height: 3rem;
401-
}
402398
}
403399

404400
/* Virtualizers own their native scroll element, so they cannot use ScrollArea's

apps/web/src/routes/_chat.pull-requests.tsx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1925,11 +1925,13 @@ function PullRequestsColumn({
19251925

19261926
<div
19271927
ref={scrollRef}
1928-
className="topbar-scroll-fade scrollbar-gutter-both min-h-0 flex-1 overflow-y-auto [--topbar-scroll-fade-height:1.5rem] sm:[--topbar-scroll-fade-height:1.5rem]"
1928+
className="topbar-scroll-fade scrollbar-gutter-both min-h-0 flex-1 overflow-y-auto"
19291929
>
1930-
{/* The top padding is the fade band's own height (1.5rem here), the same pairing the
1931-
settings page makes: at rest the controls sit fully below the mask, and only
1932-
content actually passing under the chrome fades. */}
1930+
{/* WorkspacePageContainer's pt-6 must stay at least as tall as
1931+
--workspace-titlebar-scroll-fade-height, so at rest the controls sit
1932+
fully below the mask and only content passing under the chrome fades.
1933+
The two live apart now, so raising the fade means raising that padding
1934+
here and on the settings page. */}
19331935
<WorkspacePageContainer className="gap-4">
19341936
<div className="flex flex-col gap-3">
19351937
<div ref={inFlowSearchRef} className="flex items-center gap-2">

0 commit comments

Comments
 (0)