Skip to content

Commit e46589f

Browse files
Tighten sidebar timeline top inset (#5635)
Reduce the reserved timeline chrome inset and update sidebar timeline expectations.
1 parent 6ec1c1b commit e46589f

2 files changed

Lines changed: 10 additions & 10 deletions

File tree

apps/desktop/src/sidebar/timeline/index.test.tsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -221,11 +221,11 @@ describe("TimelineView", () => {
221221

222222
expect(
223223
container.querySelector("[data-sidebar-timeline-top-spacer]")?.className,
224-
).toContain("h-12");
224+
).toContain("h-8");
225225
expect(
226226
container.querySelector("[data-sidebar-timeline-bucket-header]")
227227
?.className,
228-
).toContain("top-12");
228+
).toContain("top-8");
229229
});
230230

231231
it("pins bucket headers to the sidebar chrome while scrolled", () => {
@@ -251,7 +251,7 @@ describe("TimelineView", () => {
251251
);
252252

253253
expect(scroller).toBeInstanceOf(HTMLDivElement);
254-
expect(header?.className).toContain("top-12");
254+
expect(header?.className).toContain("top-8");
255255

256256
Object.defineProperty(scroller, "clientHeight", {
257257
configurable: true,
@@ -264,7 +264,7 @@ describe("TimelineView", () => {
264264
scroller!.scrollTop = 120;
265265
fireEvent.scroll(scroller!);
266266

267-
expect(header?.className).toContain("top-12");
267+
expect(header?.className).toContain("top-8");
268268
expect(header?.className).toContain("z-20");
269269
});
270270

@@ -450,7 +450,7 @@ describe("TimelineView", () => {
450450
);
451451
expect(
452452
container.querySelector("[data-sidebar-timeline-top-spacer]")?.className,
453-
).toContain("h-12");
453+
).toContain("h-8");
454454
expect(screen.queryByText("Now")).toBeNull();
455455

456456
fireEvent.click(chip!);
@@ -587,11 +587,11 @@ describe("TimelineView", () => {
587587
expect(screen.getByRole("button", { name: "Go back to now" })).toBeTruthy();
588588
expect(
589589
container.querySelector("[data-sidebar-timeline-top-spacer]")?.className,
590-
).toContain("h-12");
590+
).toContain("h-8");
591591
expect(
592592
container.querySelector("[data-sidebar-timeline-bucket-header]")
593593
?.className,
594-
).toContain("top-12");
594+
).toContain("top-8");
595595
expect(getTopFade(container).className).toContain("h-16");
596596
});
597597

apps/desktop/src/sidebar/timeline/index.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -152,12 +152,12 @@ export function TimelineView({
152152
const topSpacerClassName = topChromeInset
153153
? hasReservedTopChromeChip
154154
? "h-20"
155-
: "h-12"
155+
: "h-8"
156156
: "h-10";
157157
const bucketHeaderTopClassName = topChromeInset
158158
? hasReservedTopChromeChip
159159
? "top-20"
160-
: "top-12"
160+
: "top-8"
161161
: "top-0";
162162
const selectedSessionScrollFrameRef = useRef<number | null>(null);
163163
const scrollSelectedSessionIntoView = useCallback<
@@ -466,7 +466,7 @@ export function TimelineView({
466466
<div
467467
className={cn([
468468
"absolute left-1/2 z-20 flex -translate-x-1/2 transform flex-col items-center gap-2",
469-
topChromeInset ? "top-12" : "top-2",
469+
topChromeInset ? "top-8" : "top-2",
470470
])}
471471
>
472472
{showOpenCalendarChip && (

0 commit comments

Comments
 (0)