8.21.0
@comet/cms-admin@8.21.0
Minor Changes
-
1ffc664: Add
SitePreviewActiontoDocumentInterfaceAllows overriding the site preview button in the page tree row actions on a per-document-type basis. When set, the provided component replaces the default preview
RowActionsItem, enabling custom preview URL construction (e.g., using additional GraphQL queries or scope data).Example
import { RowActionsItem } from "@comet/admin"; import { Preview } from "@comet/admin-icons"; import { type DocumentInterface, openSitePreviewWindow, type SitePreviewActionProps } from "@comet/cms-admin"; function PageSitePreviewAction({ pageTreeNode }: SitePreviewActionProps) { // Use hooks to construct a custom preview URL const previewPath = useCustomPreviewPath(pageTreeNode); return ( <RowActionsItem icon={<Preview />} disabled={!previewPath} onClick={() => { if (previewPath) { openSitePreviewWindow(previewPath, "/custom-root"); } }} > Open preview </RowActionsItem> ); } export const Page: DocumentInterface = { // ... SitePreviewAction: PageSitePreviewAction, }; -
2491e24: Make DataGrid columns in DAM sortable
Make Name, Type/Format, Info, Creation, and Latest Change columns in the
FolderDataGridsortable via column header clicks, using the standardmuiGridSortToGqlpattern from generated grids. Remove the separate Sort dropdown from the toolbar. Sort state is now stored in URL params instead of localStorage.
@comet/cms-api@8.21.0
Patch Changes
- 2491e24: Support sorting folders by size (child count) in
FoldersService
@comet/cli@8.21.0
Patch Changes
-
d3904b9: Cache
getSiteConfigsandop readcalls to avoid redundant executionWhen a template contains multiple placeholders for the same environment,
getSiteConfigs(env)andop readwere called repeatedly with identical arguments. Both are now cached per invocation so each uniqueenvand each uniqueop://URI is resolved only once.