Skip to content

8.21.0

Choose a tag to compare

@github-actions github-actions released this 20 Apr 10:21
· 241 commits to main since this release
dba8d97

@comet/cms-admin@8.21.0

Minor Changes

  • 1ffc664: Add SitePreviewAction to DocumentInterface

    Allows 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 FolderDataGrid sortable via column header clicks, using the standard muiGridSortToGql pattern 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 getSiteConfigs and op read calls to avoid redundant execution

    When a template contains multiple placeholders for the same environment, getSiteConfigs(env) and op read were called repeatedly with identical arguments. Both are now cached per invocation so each unique env and each unique op:// URI is resolved only once.