You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|`pageSize`|`number`| — | Comments per page. Falls back to `defaultCommentPageSize` from overrides, then 100. A "Load more" button appears when there are additional pages. |
277
+
|`sort`|`"asc" \| "desc"`| — | Sort direction for top-level comments by `createdAt`. Defaults to `defaultCommentSort` from overrides, then `"desc"` (newest first). Replies inside each thread always render chronologically and are unaffected. |
|`components.Renderer`|`ComponentType`| — | Custom renderer for comment body (default: `<p>`) |
279
280
@@ -528,6 +529,7 @@ Configure the comments plugin behavior from your layout:
528
529
|`currentUserId`|`string \| (() => string \| undefined \| Promise<string \| undefined>)`| Authenticated user's ID — used by the User Comments page. Supports async functions for session-based resolution. |
529
530
|`loginHref`|`string`| Login route used by comment UIs when user is unauthenticated. |
530
531
|`defaultCommentPageSize`|`number`| Default number of top-level comments per page for all `CommentThread` instances. Overridden per-instance by the `pageSize` prop. Defaults to `100` when not set. |
532
+
|`defaultCommentSort`|`"asc" \| "desc"`| Default sort direction for top-level comments in all `CommentThread` instances. Overridden per-instance by the `sort` prop. Defaults to `"desc"` (newest first). |
531
533
|`allowPosting`|`boolean`| Hide/show comment form and reply actions globally in `CommentThread` instances (defaults to `true`). |
532
534
|`allowEditing`|`boolean`| Hide/show edit affordances globally in `CommentThread` instances (defaults to `true`). |
533
535
|`resourceLinks`|`Record<string, (id: string) => string>`| Per-resource-type URL builders for linking comments back to their resource on the User Comments page (e.g. `{ "blog-post": (slug) => "/pages/blog/" + slug }`). The plugin appends `#comments` automatically so the page scrolls to the thread. |
0 commit comments