Skip to content

feat: client-side collection load limits with 'Load more' button#688

Open
albertodainotti wants to merge 2 commits intoNotionX:masterfrom
InetIntel:feature-load-more
Open

feat: client-side collection load limits with 'Load more' button#688
albertodainotti wants to merge 2 commits intoNotionX:masterfrom
InetIntel:feature-load-more

Conversation

@albertodainotti
Copy link
Contributor

Summary

Adds client-side support for Notion's inline_collection_first_load_limit format property. When a collection view has a load limit configured, only the first N items are shown initially, with a "Load more" button to reveal the rest.

Changes

  • collection-view-gallery.tsx: Added load limit logic with useState for expand state, renders "Load more" button with chevron icon when items exceed the limit
  • collection-view-table.tsx: Same load limit pattern applied to table views
  • collection-view-list.tsx: Same load limit pattern applied to list views
  • styles.css: Added styles for .notion-collection-load-more button (hover effect, spacing, cursor)

How It Works

  1. Reads inline_collection_first_load_limit.limit from the collection view's format
  2. If a limit is set and there are more items than the limit, shows only the first N items
  3. Renders a "Load more" button below the collection
  4. On click, reveals all items (one-time expand, no pagination)

Motivation

Notion allows setting a "load limit" on inline collections to keep pages compact. Without this feature, all collection items are rendered immediately regardless of the Notion-configured limit, which can result in very long pages.

@vercel
Copy link

vercel bot commented Mar 7, 2026

@albertodainotti is attempting to deploy a commit to the Saasify Team on Vercel.

A member of the Team first needs to authorize it.

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.

1 participant