Review comments

This commit is contained in:
midzelis
2025-08-28 23:45:31 +00:00
parent 3ff24fc803
commit 4653de3301
4 changed files with 9 additions and 7 deletions
@@ -128,9 +128,9 @@
} }
}; };
let isTrashEnabled = $derived($featureFlags.loaded && $featureFlags.trash); const isTrashEnabled = $derived($featureFlags.loaded && $featureFlags.trash);
let isEmpty = $derived(timelineManager.isInitialized && timelineManager.months.length === 0); const isEmpty = $derived(timelineManager.isInitialized && timelineManager.months.length === 0);
let idsSelectedAssets = $derived(assetInteraction.selectedAssets.map(({ id }) => id)); const idsSelectedAssets = $derived(assetInteraction.selectedAssets.map(({ id }) => id));
let isShortcutModalOpen = false; let isShortcutModalOpen = false;
const handleOpenShortcutModal = async () => { const handleOpenShortcutModal = async () => {
@@ -135,6 +135,8 @@
// Tracks if we found the month intersecting the viewport top // Tracks if we found the month intersecting the viewport top
let foundIntersectingMonth = false; 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++) { for (let i = MONTH_LOOP_START; i < getMonthLoopEnd(monthsLength); i++) {
const monthSection = getMonthSection(i); const monthSection = getMonthSection(i);
const nextRemainingDistance = remainingScrollDistance - monthSection.height * maxScrollPercent; const nextRemainingDistance = remainingScrollDistance - monthSection.height * maxScrollPercent;
@@ -8,9 +8,9 @@
let { onAfterUpdate }: Props = $props(); let { onAfterUpdate }: Props = $props();
onMount(() => { onMount(() => {
if (import.meta && import.meta?.hot) { if (import.meta && import.meta.hot) {
import.meta.hot?.on('vite:afterUpdate', onAfterUpdate); import.meta.hot.on('vite:afterUpdate', onAfterUpdate);
return () => import.meta.hot?.off('vite:afterUpdate', onAfterUpdate); return () => import.meta.hot && import.meta.hot.off('vite:afterUpdate', onAfterUpdate);
} }
}); });
</script> </script>
@@ -32,7 +32,7 @@ export class DayGroup {
this.monthGroup = monthGroup; this.monthGroup = monthGroup;
this.day = day; this.day = day;
this.groupTitle = groupTitle; this.groupTitle = groupTitle;
this.groupTitleFull = groupTitle; this.groupTitleFull = groupTitleFull;
} }
get top() { get top() {