Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(web): responsive people scroll #16913

Open
wants to merge 38 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
026e347
feat(web): max grid row height responsive
midzelis Mar 16, 2025
3026d7c
also gallery-viewer
midzelis Mar 16, 2025
f0e7468
lint
midzelis Mar 19, 2025
4cd5b3e
Merge branch 'main' into mobile_rowheight
midzelis Mar 19, 2025
40e5e0f
feat(web): support long-press selection on mobile web
midzelis Mar 16, 2025
f4c6571
use svelte-gestures
midzelis Mar 19, 2025
5342297
feat(web): shrink header on small screens
midzelis Mar 16, 2025
a2f7ad6
fix test
midzelis Mar 19, 2025
d29da0b
fix test
midzelis Mar 19, 2025
fe2472f
test
midzelis Mar 19, 2025
621f7cd
Fix test
midzelis Mar 19, 2025
bae6e1c
Bug fix
midzelis Mar 21, 2025
6938582
globalThis
midzelis Mar 21, 2025
044f5a0
Merge branch 'main' into mobile_longpress
midzelis Mar 21, 2025
699aac4
format
midzelis Mar 21, 2025
5d32d88
revert generator
midzelis Mar 21, 2025
d5d1ada
Merge branch 'mobile_longpress' into mobile_responsive_header
midzelis Mar 21, 2025
dfca6b5
feat(web): responsive people scroll
midzelis Mar 17, 2025
38163da
wip
midzelis Mar 17, 2025
8fb6f91
Revert user-page-layout chagne
midzelis Mar 21, 2025
091c8f7
Merge branch 'mobile_responsive_header' into mobile_responsive_people
midzelis Mar 21, 2025
f8bd12e
tweak,lint
midzelis Mar 21, 2025
442f11c
Testing
midzelis Mar 22, 2025
67b49d0
bad merge
midzelis Mar 23, 2025
d3ec32b
Fix typo/tap on thumbnail
midzelis Mar 24, 2025
68fe3a3
Merge branch 'main' into mobile_longpress
midzelis Mar 24, 2025
4b9cd76
Merge branch 'mobile_longpress' into mobile_responsive_header
midzelis Mar 24, 2025
a2cefa8
Restore icons sizes, make consistent, improve logo responsiveness
midzelis Mar 24, 2025
1ac64da
remove 4 more pix, lint
midzelis Mar 24, 2025
64d1176
Merge branch 'mobile_responsive_header' into mobile_responsive_people
midzelis Mar 24, 2025
4bfe5d0
lint
midzelis Mar 24, 2025
cd4e94c
Merge branch 'mobile_responsive_header' into mobile_responsive_people
midzelis Mar 24, 2025
0405a36
feat: shrink header on small screens (#16909)
midzelis Mar 24, 2025
18ddb47
Revert "Testing"
midzelis Mar 24, 2025
8d3b8a1
Merge remote-tracking branch 'origin/main' into mobile_longpress
midzelis Mar 24, 2025
e30f366
Merge branch 'mobile_longpress' into mobile_responsive_people
midzelis Mar 24, 2025
e983164
bad merge
midzelis Mar 24, 2025
ab8e59a
merge main
alextran1502 Mar 24, 2025
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
3 changes: 2 additions & 1 deletion web/src/lib/components/album-page/album-card-group.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,10 @@

<div class="mt-4">
{#if !isCollapsed}
<div class="grid grid-auto-fill-56 gap-y-4" transition:slide={{ duration: 300 }}>
<div class="flex flex-wrap" transition:slide={{ duration: 300 }}>
{#each albums as album, index (album.id)}
<a
class="w-[250px]"
data-sveltekit-preload-data="hover"
href="{AppRoute.ALBUMS}/{album.id}"
animate:flip={{ duration: 400 }}
Expand Down
41 changes: 21 additions & 20 deletions web/src/lib/components/faces-page/people-infinite-scroll.svelte
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<script lang="ts">
import { intersectionObserver } from '$lib/actions/intersection-observer';
import type { PersonResponseDto } from '@immich/sdk';

interface Props {
Expand All @@ -9,32 +10,32 @@
}

let { people, hasNextPage = undefined, loadNextPage, children }: Props = $props();

let lastPersonContainer: HTMLElement | undefined = $state();

const intersectionObserver = new IntersectionObserver((entries) => {
const entry = entries.find((entry) => entry.target === lastPersonContainer);
if (entry?.isIntersecting) {
loadNextPage();
}
});

$effect(() => {
if (lastPersonContainer) {
intersectionObserver.disconnect();
intersectionObserver.observe(lastPersonContainer);
}
});
</script>

<div class="w-full grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-5 xl:grid-cols-7 2xl:grid-cols-10 gap-1">
<section class="w-full flex flex-wrap gap-2">
{#each people as person, index (person.id)}
{#if hasNextPage && index === people.length - 1}
<div bind:this={lastPersonContainer}>
<div
class="flex-none max-md:w-[100px] w-[122px]"
use:intersectionObserver={{
onIntersect: loadNextPage,
}}
>
{@render children?.({ person, index })}
</div>
{:else}
{@render children?.({ person, index })}
<div class="flex-none max-md:w-[100px] w-[122px]">
{@render children?.({ person, index })}
</div>
{/if}
{/each}
</div>
</section>

<style>
section::after {
content: '';
flex: auto;
flex-basis: 122px;
flex-grow: 0;
}
</style>
2 changes: 1 addition & 1 deletion web/src/lib/components/layouts/user-page-layout.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
<section class="relative">
{#if title || buttons}
<div
class="absolute flex h-16 w-full place-items-center justify-between border-b p-4 dark:border-immich-dark-gray dark:text-immich-dark-fg"
class="absolute flex h-16 gap-2 w-full place-items-center justify-between border-b p-4 dark:border-immich-dark-gray dark:text-immich-dark-fg"
>
<div class="flex gap-2 items-center">
{#if title}
Expand Down
4 changes: 2 additions & 2 deletions web/src/routes/(user)/albums/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
</div>
{/snippet}

<div class="xl:hidden">
<div class="xl:hidden flex gap-2">
<div class="w-fit h-14 dark:text-immich-dark-fg py-2">
<GroupTab
label={$t('show_albums')}
Expand All @@ -38,7 +38,7 @@
onSelect={(selected) => ($albumViewSettings.filter = selected)}
/>
</div>
<div class="w-60">
<div class="w-fit h-14 py-2">
<SearchBar placeholder={$t('search_albums')} bind:name={searchQuery} showLoadingSpinner={false} />
</div>
</div>
Expand Down
Loading