From 4653de3301df655f209e77bca2d76dd142e5d586 Mon Sep 17 00:00:00 2001 From: midzelis Date: Thu, 28 Aug 2025 23:45:31 +0000 Subject: [PATCH] Review comments --- .../timeline/actions/timeline-keyboard-actions.svelte | 6 +++--- .../timeline/base-components/base-timeline.svelte | 2 ++ web/src/lib/components/timeline/base-components/hmr.svelte | 6 +++--- web/src/lib/managers/timeline-manager/day-group.svelte.ts | 2 +- 4 files changed, 9 insertions(+), 7 deletions(-) diff --git a/web/src/lib/components/timeline/actions/timeline-keyboard-actions.svelte b/web/src/lib/components/timeline/actions/timeline-keyboard-actions.svelte index 53d968b70a..b04e1cc8a9 100644 --- a/web/src/lib/components/timeline/actions/timeline-keyboard-actions.svelte +++ b/web/src/lib/components/timeline/actions/timeline-keyboard-actions.svelte @@ -128,9 +128,9 @@ } }; - let isTrashEnabled = $derived($featureFlags.loaded && $featureFlags.trash); - let isEmpty = $derived(timelineManager.isInitialized && timelineManager.months.length === 0); - let idsSelectedAssets = $derived(assetInteraction.selectedAssets.map(({ id }) => id)); + const isTrashEnabled = $derived($featureFlags.loaded && $featureFlags.trash); + const isEmpty = $derived(timelineManager.isInitialized && timelineManager.months.length === 0); + const idsSelectedAssets = $derived(assetInteraction.selectedAssets.map(({ id }) => id)); let isShortcutModalOpen = false; const handleOpenShortcutModal = async () => { diff --git a/web/src/lib/components/timeline/base-components/base-timeline.svelte b/web/src/lib/components/timeline/base-components/base-timeline.svelte index f862f30ce5..d0a541abb7 100644 --- a/web/src/lib/components/timeline/base-components/base-timeline.svelte +++ b/web/src/lib/components/timeline/base-components/base-timeline.svelte @@ -135,6 +135,8 @@ // Tracks if we found the month intersecting the viewport top let foundIntersectingMonth = false; + // loop starts at -1, which represents lead-in + // loops ends at months.length + 1, representing lead-out for (let i = MONTH_LOOP_START; i < getMonthLoopEnd(monthsLength); i++) { const monthSection = getMonthSection(i); const nextRemainingDistance = remainingScrollDistance - monthSection.height * maxScrollPercent; diff --git a/web/src/lib/components/timeline/base-components/hmr.svelte b/web/src/lib/components/timeline/base-components/hmr.svelte index d6120d7cbf..acd80603fc 100644 --- a/web/src/lib/components/timeline/base-components/hmr.svelte +++ b/web/src/lib/components/timeline/base-components/hmr.svelte @@ -8,9 +8,9 @@ let { onAfterUpdate }: Props = $props(); onMount(() => { - if (import.meta && import.meta?.hot) { - import.meta.hot?.on('vite:afterUpdate', onAfterUpdate); - return () => import.meta.hot?.off('vite:afterUpdate', onAfterUpdate); + if (import.meta && import.meta.hot) { + import.meta.hot.on('vite:afterUpdate', onAfterUpdate); + return () => import.meta.hot && import.meta.hot.off('vite:afterUpdate', onAfterUpdate); } }); diff --git a/web/src/lib/managers/timeline-manager/day-group.svelte.ts b/web/src/lib/managers/timeline-manager/day-group.svelte.ts index ee59b085e3..384bc15af3 100644 --- a/web/src/lib/managers/timeline-manager/day-group.svelte.ts +++ b/web/src/lib/managers/timeline-manager/day-group.svelte.ts @@ -32,7 +32,7 @@ export class DayGroup { this.monthGroup = monthGroup; this.day = day; this.groupTitle = groupTitle; - this.groupTitleFull = groupTitle; + this.groupTitleFull = groupTitleFull; } get top() {