Skip to content
Open
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
1 change: 1 addition & 0 deletions e2e/playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ export const playwriteSlowMo = Number.parseInt(process.env.PLAYWRIGHT_SLOW_MO ??
export const playwrightDisableWebserver = process.env.PLAYWRIGHT_DISABLE_WEBSERVER;

process.env.PW_EXPERIMENTAL_SERVICE_WORKER_NETWORK_EVENTS = '1';
process.env.TZ = 'UTC';

const config: PlaywrightTestConfig = {
testDir: './src/specs/server',
Expand Down
2 changes: 1 addition & 1 deletion e2e/src/ui/specs/timeline/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ export const pageUtils = {
},
async selectDay(page: Page, day: string) {
await page.getByTitle(day).hover();
await page.locator('[data-group] .w-8').click();
await page.locator('[data-group] .opacity-100').click();
},
async pauseTestDebug() {
console.log('NOTE: pausing test indefinately for debug');
Expand Down
19 changes: 14 additions & 5 deletions web/src/lib/components/timeline/Month.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -64,19 +64,22 @@
]}
data-group
style:position="absolute"
style:transform={`translate3d(${absoluteWidth}px,${dayGroup.top}px,0)`}
style:left={`${absoluteWidth}px`}
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be style:inset-inline-start for RTL languages, see also #26513

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I need to find some time to find a way that both works with my change and works with RTL languages. Since the change to left was intentional to fix some issues with the fixed header.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

inset-inline-start is just the logical/rtl-friendly css property for offsetting something from the 'left' margin that we're used to. In general, it is always correct to replace left with inset-inline-start, unless you're dealing for example with pixel offsets of the face bounding boxes in an image.

style:top={`${dayGroup.top}px`}
onmouseenter={() => (hoveredDayGroup = dayGroup.groupTitle)}
onmouseleave={() => (hoveredDayGroup = null)}
>
<!-- Month title -->
<div
class="flex pt-7 pb-5 max-md:pt-5 max-md:pb-3 h-6 place-items-center text-xs font-medium text-immich-fg dark:text-immich-dark-fg md:text-sm"
class="sticky top-0 z-[100] flex pt-7 pb-5 max-md:pt-5 max-md:pb-3 h-6 place-items-center text-xs font-medium text-immich-fg dark:text-immich-dark-fg md:text-sm bg-immich-bg dark:bg-immich-dark-bg"
style:width={dayGroup.width + 'px'}
style:will-change="transform"
style:transform="translateZ(0)"
>
{#if !singleSelect}
<div
class="hover:cursor-pointer transition-all duration-200 ease-out overflow-hidden w-0"
class:w-8={(hoveredDayGroup === dayGroup.groupTitle && isMouseOverGroup) ||
class="absolute hover:cursor-pointer transition-all duration-200 ease-out overflow-hidden w-8 opacity-0"
class:opacity-100={(hoveredDayGroup === dayGroup.groupTitle && isMouseOverGroup) ||
assetInteraction.selectedGroup.has(dayGroup.groupTitle)}
onclick={() => onDayGroupSelect(dayGroup, assetsSnapshot(dayGroup.getAssets()))}
onkeydown={() => onDayGroupSelect(dayGroup, assetsSnapshot(dayGroup.getAssets()))}
Expand All @@ -89,7 +92,12 @@
</div>
{/if}

<span class="w-full truncate first-letter:capitalize" title={getDayGroupFullDate(dayGroup)}>
<span
class="w-full truncate first-letter:capitalize transition-transform duration-200 ease-out"
class:translate-x-8={(hoveredDayGroup === dayGroup.groupTitle && isMouseOverGroup) ||
assetInteraction.selectedGroup.has(dayGroup.groupTitle)}
title={getDayGroupFullDate(dayGroup)}
>
{dayGroup.groupTitle}
</span>
</div>
Expand All @@ -111,5 +119,6 @@
<style>
section {
contain: layout paint style;
will-change: transform;
}
</style>
4 changes: 2 additions & 2 deletions web/src/lib/components/timeline/Timeline.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -652,7 +652,7 @@
<div
style:height={monthGroup.height + 'px'}
style:position="absolute"
style:transform={`translate3d(0,${absoluteHeight}px,0)`}
style:top={`${absoluteHeight}px`}
style:width="100%"
>
<Skeleton {invisible} height={monthGroup.height} title={monthGroup.monthGroupTitle} />
Expand All @@ -662,7 +662,7 @@
class="month-group"
style:height={monthGroup.height + 'px'}
style:position="absolute"
style:transform={`translate3d(0,${absoluteHeight}px,0)`}
style:top={`${absoluteHeight}px`}
style:width="100%"
>
<Month
Expand Down
Loading