Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions apps/desktop/src/sidebar/timeline/index.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -221,11 +221,11 @@ describe("TimelineView", () => {

expect(
container.querySelector("[data-sidebar-timeline-top-spacer]")?.className,
).toContain("h-12");
).toContain("h-8");
expect(
container.querySelector("[data-sidebar-timeline-bucket-header]")
?.className,
).toContain("top-12");
).toContain("top-8");
});

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

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

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

expect(header?.className).toContain("top-12");
expect(header?.className).toContain("top-8");
expect(header?.className).toContain("z-20");
});

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

fireEvent.click(chip!);
Expand Down Expand Up @@ -587,11 +587,11 @@ describe("TimelineView", () => {
expect(screen.getByRole("button", { name: "Go back to now" })).toBeTruthy();
expect(
container.querySelector("[data-sidebar-timeline-top-spacer]")?.className,
).toContain("h-12");
).toContain("h-8");
expect(
container.querySelector("[data-sidebar-timeline-bucket-header]")
?.className,
).toContain("top-12");
).toContain("top-8");
expect(getTopFade(container).className).toContain("h-16");
});

Expand Down
6 changes: 3 additions & 3 deletions apps/desktop/src/sidebar/timeline/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -152,12 +152,12 @@ export function TimelineView({
const topSpacerClassName = topChromeInset
? hasReservedTopChromeChip
? "h-20"
: "h-12"
: "h-8"
: "h-10";
const bucketHeaderTopClassName = topChromeInset
? hasReservedTopChromeChip
? "top-20"
: "top-12"
: "top-8"
: "top-0";
const selectedSessionScrollFrameRef = useRef<number | null>(null);
const scrollSelectedSessionIntoView = useCallback<
Expand Down Expand Up @@ -466,7 +466,7 @@ export function TimelineView({
<div
className={cn([
"absolute left-1/2 z-20 flex -translate-x-1/2 transform flex-col items-center gap-2",
topChromeInset ? "top-12" : "top-2",
topChromeInset ? "top-8" : "top-2",
])}
>
{showOpenCalendarChip && (
Expand Down
Loading