High performance self-hosted photo and video management solution.
TypeScript backup-toolfluttergoogle-photosgoogle-photos-alternativejavascriptmobile-appnestjsnodejsphoto-galleryphotosphotos-managementself-hostedsveltesveltekittypescriptvideos
fix: incorrect header height calculation in estimated month height (#23923)
Min Idzelis237ddcb64876
diff --git a/web/src/lib/managers/timeline-manager/internal/layout-support.svelte.ts b/web/src/lib/managers/timeline-manager/internal/layout-support.svelte.tsindex 434b2d1847..0f6ca112d1 100644--- a/web/src/lib/managers/timeline-manager/internal/layout-support.svelte.ts+++ b/web/src/lib/managers/timeline-manager/internal/layout-support.svelte.ts@@ -12,7 +12,7 @@ export function updateGeometry(timelineManager: TimelineManager, month: MonthGroif (!month.isHeightActual) {const unwrappedWidth = (3 / 2) * month.assetsCount * timelineManager.rowHeight * (7 / 10);const rows = Math.ceil(unwrappedWidth / viewportWidth);- const height = 51 + Math.max(1, rows) * timelineManager.rowHeight;+ const height = timelineManager.headerHeight + Math.max(1, rows) * timelineManager.rowHeight;month.height = height;}return;diff --git a/web/src/lib/managers/timeline-manager/timeline-manager.svelte.spec.ts b/web/src/lib/managers/timeline-manager/timeline-manager.svelte.spec.tsindex a3fda3a85c..e6eddef9b6 100644--- a/web/src/lib/managers/timeline-manager/timeline-manager.svelte.spec.ts+++ b/web/src/lib/managers/timeline-manager/timeline-manager.svelte.spec.ts@@ -84,13 +84,13 @@ describe('TimelineManager', () => {expect.arrayContaining([expect.objectContaining({ year: 2024, month: 3, height: 283 }),expect.objectContaining({ year: 2024, month: 2, height: 7711 }),- expect.objectContaining({ year: 2024, month: 1, height: 286 }),+ expect.objectContaining({ year: 2024, month: 1, height: 283 }),]),);});it('calculates timeline height', () => {- expect(timelineManager.totalViewerHeight).toBe(8340);+ expect(timelineManager.totalViewerHeight).toBe(8337);});});