-
Notifications
You must be signed in to change notification settings - Fork 183
use new table virtualization #2033
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
base: main
Are you sure you want to change the base?
Conversation
This commit updates the pink-svelte and pink-icons-svelte dependencies to new versions and refactors the collection table to use the new virtualized table component for improved performance.
The preview deployment failed. 🔴 Last updated at: 2025-06-18 13:57:17 CET |
The preview deployment failed. 🔴 Last updated at: 2025-06-18 13:57:10 CET |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR upgrades dependencies and refactors the collection table to use the new virtualized table component for improved rendering performance.
- Updated
pink-svelte
dependency source and bumpedpink-icons-svelte
- Swapped out the legacy
Table.Root
forTable.VirtualRoot
intable.svelte
- Centralized column definitions and visibility logic in
+page.svelte
Reviewed Changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
src/routes/(console)/…/collection-[collection]/table.svelte | Replaced non-virtualized table with Table.VirtualRoot and associated cell loops |
src/routes/(console)/…/collection-[collection]/+page.svelte | Adjusted column store initialization to include ID/created/updated columns and hide flags |
src/lib/stores/preferences.ts | Changed default return from getCustomCollectionColumns to null instead of [] |
src/lib/components/columnSelector.svelte | Added type annotation for containerRef and converted selectedColumnsNumber to a const derived store |
package.json | Updated @appwrite.io/pink-svelte URL |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
</Table.VirtualCell> | ||
{:else} | ||
{@const id = column.id} | ||
{@const attr = $attributes.find((n) => n.key === id)} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Calling .find
on $attributes
for every cell renders in O(n) per cell. Precompute a lookup map (e.g., {[key]: attribute}
) before rendering to achieve constant-time attribute access.
{@const attr = $attributes.find((n) => n.key === id)} | |
{@const attr = attributesMap[id]} |
Copilot uses AI. Check for mistakes.
This commit updates the pink-svelte and pink-icons-svelte dependencies to new versions and refactors the collection table to use the new virtualized table component for improved performance.
Bildschirmaufnahme.2025-06-18.um.11.28.25.mov