Skip to content

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Conversation

TorstenDittmann
Copy link
Contributor

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

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.
@coolify-appwrite-org
Copy link

coolify-appwrite-org bot commented Jun 18, 2025

The preview deployment failed. 🔴

Open Build Logs

Last updated at: 2025-06-18 13:57:17 CET

@TorstenDittmann TorstenDittmann requested a review from Copilot June 18, 2025 09:29
@coolify-appwrite-org
Copy link

coolify-appwrite-org bot commented Jun 18, 2025

The preview deployment failed. 🔴

Open Build Logs

Last updated at: 2025-06-18 13:57:10 CET

Copy link

@Copilot Copilot AI left a 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 bumped pink-icons-svelte
  • Swapped out the legacy Table.Root for Table.VirtualRoot in table.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)}
Copy link
Preview

Copilot AI Jun 18, 2025

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.

Suggested change
{@const attr = $attributes.find((n) => n.key === id)}
{@const attr = attributesMap[id]}

Copilot uses AI. Check for mistakes.

@ItzNotABug ItzNotABug self-requested a review June 18, 2025 10:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants