Extract asset grid core logic into asset-grid-without-scrubber component

• Move all timeline rendering and scrolling logic to new component
• Keep scrubber logic and interaction handlers in original asset-grid 
• Use composition pattern with header snippet for scrubber integration
• Simplify asset-grid to ~450 lines by extracting ~390 lines of core logic
This commit is contained in:
Min Idzelis 2025-06-21 03:40:29 +00:00 committed by midzelis
parent cc6d64e259
commit 0beeea6985
5 changed files with 536 additions and 401 deletions

View file

@ -23,11 +23,12 @@ export type TimelineDateTime = TimelineDate & {
millisecond: number;
};
export type ScrubberListener = (
scrubberMonth: { year: number; month: number },
overallScrollPercent: number,
scrubberMonthScrollPercent: number,
) => void | Promise<void>;
export type ScrubberListener = (args: {
scrubberMonth: { year: number; month: number };
overallScrollPercent: number;
scrubberMonthScrollPercent: number;
handleScrollTop?: (top: number) => void;
}) => void | Promise<void>;
// used for AssetResponseDto.dateTimeOriginal, amongst others
export const fromISODateTime = (isoDateTime: string, timeZone: string): DateTime<true> =>