Skip to content

Releases: vivid-planet/comet

5.1.0

28 Nov 11:56
76325f4
Compare
Choose a tag to compare

@comet/admin@5.1.0

Minor Changes

  • 93b3d97: Extend error details in ErrorDialog

    Previously, uncaught errors in production environments would result in an "An error occurred" ErrorDialog, making the error difficult to debug.
    To improve the reproducibility of an error, we enrich the ErrorDialog with the following additionalInformation:

    • errorType: The type of the error, network or server error
    • httpStatus: The HTTP status of the request that failed
    • url: The URL where the error occurred
    • timestamp: The timestamp when the error occurred

    This information will be displayed in the ErrorDialog if no custom userMessage has been provided.
    In addition, a button has been added to allow this information to be copied to the clipboard.

Patch Changes

  • 21c3093: Fix saveAction in RouterPrompt of FinalForm

    The submit mutation wasn't correctly awaited if a FinalForm using an asynchronous validation was saved via the saveAction provided in the RouterPrompt.

    In practice, this affected FinalForms within an EditDialog. The EditDialog closed before the submission was completed. All changes were omitted. The result of the submission (fail or success) was never shown.

  • e33cd65: Fix EditDialog#onAfterSave not called on form submission

    The onAfterSave callback was only called when submitting a form inside an EditDialog by clicking the save button, but not when submitting the form by hitting the enter key.
    We fix this by adding the callback to the EditDialogFormApi and calling it after the form has been successfully submitted.

@comet/cms-admin@5.1.0

Patch Changes

  • e1d3f00: Prevent false positive save conflicts while editing documents (e.g. Page):

    • Stop checking for conflicts while saving is in progress
    • Ensure that all "CheckForChanges" polls are cleared
  • 6d69dfa: Fix issue in PixelImageBlock that caused the preview URLs for files without a file extension in their filename to be invalid

  • 21c3093: Improved the EditPageNode dialog ("Page Properties" dialog):

    • Execute the asynchronous slug validation less often (increased the debounce wait time from 200ms to 500ms)
    • Cache the slug validation results. Evict the cache on the initial render of the dialog

@comet/eslint-plugin@5.1.0

Minor Changes

  • ec0582e: Add new ESLint rule to enforce absolute imports when importing from other modules

    For instance, an import import { AThingInModuleA } from "../moduleA/AThingInModuleA" in module B needs to be imported as import { AThingInModuleA } from "@src/moduleA/AThingInModuleA".
    The default source root "./src" and alias "@src" can be changed via the rule's sourceRoot and sourceRootAlias options.
    This rule will be enforced by @comet/eslint-config in the next major release.

5.0.0

21 Nov 12:43
2e3eb5c
Compare
Choose a tag to compare

Highlights

Admin CRUD Generator

The Admin CRUD Generator was added.
It automatically generates an admin page, grid and form based on the GraphQL schema definition of an object type. It's meant to be used together with the existing API Generator.

More information in section @comet/cms-admin.

Support for Relations in the API CRUD Generator

The API CRUD Generator now supports relations.

More information in section @comet/cms-api.

DAM Scoping

The DAM now supports scoping.
Scoping can be enabled optionally. You can still use the DAM without scoping.

More information in sections @comet/cms-api and @comet/cms-admin.

Cross-Scope & Cross-Environment Copying

When copying documents from one scope to another, the used DAM files are automatically imported into the target scope.
When copying documents from one environment to another (e.g. from production to your local dev environment), the used DAM files are imported to your environment via download.

More information in section @comet/cms-admin.

Dependencies

The new DependenciesService provides methods to create and access an index containing all dependencies from blocks to entities.

Note: Currently, the library doesn't offer a way to display the dependencies in the admin. This will be added in a later minor release of v5.

More information in section @comet/cms-api.

No "Discard unsaved Changes" Dialog in RouterTabs in Forms

Switching tabs in RouterTabs inside a FinalForm no longer triggers a "Discard unsaved changes" dialog.

More information in section @comet/admin.

Multi-Select Form Field

FinalFormSelect now supports multi-select.

More information in section @comet/admin.

DocumentInterface Implementation Helper

The new createDocumentRootBlocksMethods() helper function can be used to create some of the methods required by the DocumentInterface (useful for Page and other document types).

More information in section @comet/cms-admin.

@comet/admin@5.0.0

Major Changes

  • 692c855: Replaced the DirtyHandler with Prompt (no change needed if DirtyHandler was only used indirectly, e.g. in Form)

    Using routes (e.g. Tabs) in a component with dirty handling (e.g. a FinalForm) is now supported

  • 0f2794e: Change the icon used in the Loading component from MUI's CircularProgress to our BallTriangle

  • fe5e073: Add support for multi-select to FinalFormSelect (via the multiple prop)

    Add a new getOptionValue() prop that can be used to extract a unique string representation for a given option. The default implementation should work in most cases.
    Remove the getOptionSelected() prop that is not needed anymore.

    You can find an example in our storybook

  • d0773a1: Change styling of FilterBar components to be more consistent with other form components. The classes of FilterBarMoreFilters have changed, which may cause custom styling of this component to break.

Minor Changes

  • 2559ff7: Add CrudVisibility component for implementing visibility column in a Crud Grid

  • ed692f5: Add new open and close hamburger icons and use them in the AppHeaderMenuButton

  • 7c6eb68: Add new event parameter to FinalForm's onSubmit() method. The navigatingBack field of event simplifies implementing different navigation patterns after saving

  • 4cd3544: Add a FinalFormSaveButton component

  • a711678: Add support for multiple StackSwitch on one StackPage

    Add a SubRoute wrapper for this case that needs to be added in front of the tested StackSwitch and do that for all composite blocks

    You can find an example in our storybook

  • e57c6c6: Move dashboard components from the COMET Starter to the library (DashboardHeader, LatestBuildsDashboardWidget, LatestContentUpdatesDashboardWidget)

Patch Changes

  • 0453c36: Router: Fix Switch inside a SubRouteIndexRoute to allow a Stack inside a Stack's initial page
  • 987f08b: Select: Fix default getOptionValue() implementation for values not being an object
  • 5f0f8e6: Correctly support RouterTabs in SubRoute by including the subRoutePrefix in tab paths
  • d4bcab0: Fix useSubRoutePrefix() if used inside a Route

@comet/admin-icons@5.0.0

Minor Changes

  • ed692f5: Add new open and close hamburger icons and use them in the AppHeaderMenuButton

@comet/blocks-admin@5.0.0

Major Changes

  • 9875e7d: Support automatically importing DAM files into another scope when copying documents from one scope to another

    The copy process was reworked:

    • The DocumentInterface now requires a dependencies() and a replaceDependenciesInOutput() method
    • The BlockInterface now has an optional dependencies() and a required replaceDependenciesInOutput() method
    • rewriteInternalLinks() was removed from @comet/cms-admin. Its functionality is replaced by replaceDependenciesInOutput().

    dependencies() returns information about dependencies of a document or block (e.g. a used DamFile or linked PageTreeNode). replaceDependenciesInOutput() replaces the IDs of all dependencies of a document or block with new IDs (necessary for copying documents or blocks to another scope).

    You can use the new createDocumentRootBlocksMethods() to generate the methods for documents (see section @comet/cms-admin).

  • 4fe0831: Remove BlockPreview component, use higher level BlockPreviewContent instead

    Before:

    const state = linkBlock.input2State(params.value);
    
    return (
        <BlockPreview
            title={linkBlock.dynamicDisplayName?.(state) ?? linkBlock.displayName}
            content={linkBlock.previewContent(state)}
        />
    );

    After:

    return (
        <BlockPreviewContent block={linkBlock} input={params.value} />
    );

Minor Changes

  • a711678: Allow composite blocks with multiple sub blocks that have their own subroutes (e.g. a list)

@comet/cms-admin@5.0.0

Major Changes

  • 9d3e855: Add scoping to the DAM

    The DAM scoping can be enabled optionally. You can still use the DAM without scoping.

    To enable DAM scoping, you must

    In the API:

    • Create a DAM folder entity using createFolderEntity({ Scope: DamScope });
    • Create a DAM file entity using createFileEntity({ Scope: DamScope, Folder: DamFolder });
    • Pass the Scope DTO and the File and Folder entities when intializing the DamModule

    In the Admin:

    • Set scopeParts in the DamConfigProvider (e.g. <DamConfigProvider value={{ scopeParts: ["domain"] }}>)
    • Render the content scope indicator in the DamPage
      <DamPage renderContentScopeIndicator={(scope) => <ContentScopeIndicator scope={scope} />} />

    You can access the current DAM scope in the Admin using the useDamScope() hook.

    See the Demo project for an example on how to enable DAM scoping.

  • 9875e7d: Support automatically importing DAM files into another scope when copying documents from one scope to another

    The copy process was reworked:

    • The DocumentInterface now requires a dependencies() and a replaceDependenciesInOutput() method
    • The BlockInterface now has an optional dependencies() and a required replaceDependenciesInOutput() method
    • rewriteInternalLinks() was removed from @comet/cms-admin. Its functionality is replaced by replaceDependenciesInOutput().

    dependencies() returns information about dependencies of a document or block (e.g. a used DamFile or linked PageTreeNode). replaceDependenciesInOutput() replaces the IDs of all dependencies of a document or block with new IDs (necessary for copying documents or blocks to another scope).

    You can use the new createDocumentRootBlocksMethods() to generate the methods for documents.

  • c3f96d7: Don't remember the last folder or file the user opened in the DAM. The ChooseFileDialog still remembers the last folder opened.

Minor Changes

  • 168380d: Add Admin CRUD Generator that creates a simple CRUD admin view for an entity

    It automatically generates an admin page, grid and form based on the GraphQL schema definition of an object type.
    It's meant to be used together with the existing API CRUD Generator.
    Go through the commits of this PR for a step-by-step example of how to use the API and Admin Generators.

  • 8ed9698: Support copy/pasting DAM files across server instances by downloading the copied file

  • adb5bc3: Add queryUpdatedAt() helper that can be used to check conflicts without having to write an additional query

  • 6b9787e: It's now possible to opt-out of creating a redirect when changing the slug of a page. Previously, a redirect was always created.

  • e6b8ec6: Show a bigger version of an image when hovering over an image thumbnail in the DAM and ChooseFileDialog

  • 5bae9ab: Show LinearProgress instead of CircularProgress when polling after initially loading the PageTree

  • 47a7272: Add requireLicense option to DamConfig to allow making DAM license fields required (when updating a file)

  • e26bd90: Add various UI/UX improvements to the DAM

    • Replace underlying Table with DataGrid
    • Add paging to improve performance
    • Add a dialog to move files to another folder (instead of drag and drop)
    • Highlig...
Read more

4.7.0

14 Nov 10:39
94e11c8
Compare
Choose a tag to compare

Highlights

  • Non-breaking spaces
    The RTE now supports non-breaking spaces.
    Note: This feature may need to be enabled for individual blocks after the update (see section @comet/admin-rte)

  • Mobile compatible tabs
    The tabs and RouterTabs in COMET now support smaller screens out of the box. You can scroll with arrows on the desktop and with swiping on the smartphone.

  • Path search in the PageTree
    Previously, you could only search for page names in the PageTree. Now you can also search by path.

@comet/admin@4.7.0

Minor Changes

  • fde8e42: Add tab scrolling to make tabs responsive

Patch Changes

  • eac9990: Fix the clear-button in FinalFormSelect when using it with the multiple prop.

    • The clear button is now only shown when at least one value is selected.
    • Clearing the value now sets it to an empty array instead of undefined, which would cause an error when trying to render the select.
  • fe310df: Prevent the clear-button and the select-arrow from overlapping when using FinalFormSelect with the clearable prop.

@comet/admin-rte@4.7.0

Minor Changes

  • dbdc0f5: Add support for non-breaking spaces to RTE

    Add "non-breaking-space" to supports when creating an RTE:

    const [useRteApi] = makeRteApi();
    
    export default function MyRte() {
        const { editorState, setEditorState } = useRteApi();
        return (
            <Rte
                value={editorState}
                onChange={setEditorState}
                options={{
                    supports: [
                        // Non-breaking space
                        "non-breaking-space",
                        // Other options you may wish to support
                        "bold",
                        "italic",
                    ],
                }}
            />
        );
    }

@comet/admin-theme@4.7.0

Minor Changes

  • d1c7a1c: Add custom default styling for LinearProgress

    The LinearProgress is intended to be used as a LoadingOverlay in the DataGrid. This styling change adjusts it for this purpose.

Patch Changes

  • fe310df: Prevent the clear-button and the select-arrow from overlapping when using FinalFormSelect with the clearable prop.

@comet/blocks-admin@4.7.0

Patch Changes

  • f48a768: Fix padding behavior of YoutubeVideoBlock and DamVideoBlock when used inside AdminComponentPaper

@comet/cms-admin@4.7.0

Minor Changes

  • dbdc0f5: Add support for non-breaking spaces to RTE
  • 17f977a: Add the possibility to search for a path in the PageTree

4.6.0

31 Oct 14:48
a8c7405
Compare
Choose a tag to compare

@comet/admin-icons@4.6.0

Minor Changes

  • c3b7f99: Add new icons intended to be used in the RTE

@comet/admin-rte@4.6.0

Patch Changes

  • c3b7f99: Replace current icons in the RTE toolbar with new icons from
    @comet/admin-icons

  • c3b7f99: Change how maxVisible in FeaturesButtonGroup works:

    • If maxVisible = 4 and there are four features -> all four features
      (and no dropdown) are shown
    • If maxVisible = 4 and there are five features -> three features and
      the dropdown (containing two features) are shown

@comet/blocks-admin@4.6.0

Patch Changes

  • 031d86e: Fix drag and drop reordering in collection blocks

@comet/cms-admin@4.6.0

Patch Changes

  • c3b7f99: Replace current icons in the RTE toolbar with new icons from
    @comet/admin-icons

@comet/cms-api@4.6.0

Patch Changes

  • f6f7d4a: Prevent slug change of home page in updateNode() and
    updateNodeSlug() of PageTreeService

4.5.0

05 Oct 08:16
b27d329
Compare
Choose a tag to compare

@comet/admin@4.5.0

Minor Changes

  • 6d4ca5b: Deprecate Table component

    The Table component has been deprecated in favor of MUI X Data Grid in combination with useDataGridRemote. See docs for further information.

  • 07d921d: Add a generic Loading component for use in Admin

    Loading handles the positioning of the loading indicator automatically, depending on the set behavior prop.

Patch Changes

  • 46cf5a8: Fix an issue that caused useDataGridRemote() to ignore its URL params when queryParamsPrefix was set
  • 8a2c330: Correctly position loading indicators by centring them using the new Loading component

@comet/admin-theme@4.5.0

Minor Changes

  • 0167707: Fix some DataGrid styling issues and style the DataGrid components to match the Comet CI more closely.

@comet/cms-admin@4.5.0

Patch Changes

  • 8a2c330: Correctly position loading indicators by centring them using the new Loading component

4.4.3

19 Sep 14:34
d1f58ac
Compare
Choose a tag to compare

@comet/cms-admin@4.4.3

Patch Changes

  • 0d2a2b9: Ignore empty labels for publisher

4.4.2

19 Sep 08:35
317c3c8
Compare
Choose a tag to compare

@comet/cms-admin@4.4.2

Patch Changes

  • b299375: Fix the typing of lastUpdatedAt in the createUsePage() factory

@comet/cms-api@4.4.2

Patch Changes

  • 896265c: Fix improper validation of input when creating/updating page tree nodes or redirects
  • cd07c10: Prevent the fileUrl from being exposed in the Site via the PixelImageBlock

3.2.7

19 Sep 08:54
b37cb00
Compare
Choose a tag to compare

@comet/cms-api

Changes

  • Fix improper validation of input when creating/updating page tree nodes or redirects
  • Prevent the fileUrl from being exposed in the Site via the PixelImageBlock

4.4.1

05 Sep 12:17
4312269
Compare
Choose a tag to compare

@comet/admin@4.4.1

Patch Changes

  • 662abcc: Prevent the MainContent component from having an invalid height.

    This bug would cause the PageTree to have no height when navigating into a page and then navigating back again.

4.4.0

04 Sep 11:28
028462c
Compare
Choose a tag to compare

@comet/admin@4.4.0

Minor Changes

  • e824ffa: Add fullHeight & disablePadding props to MainContent

    fullHeight makes MainContent take up the remaining space below to fill the entire page.
    This is helpful for virtualized components that need a fixed height, such as DataGrid or the PageTree.

    disablePadding is helpful if a component requires the fullHeight behaviour but should fill the entire page without the surrounding space.

  • 3e15b81: Add field components to simplify the creation of forms with Final Form.

    • TextField
    • TextAreaField
    • SearchField
    • SelectField
    • CheckboxField
    • SwitchField
    • ColorField
    • DateField
    • DateRangeField
    • TimeField
    • TimeRangeField
    • DateTimeField

    Example with TextField

    // You can now do:
    <TextField name="text" label="Text" />
    // Instead of:
    <Field name="text" label="Text" component={FinalFormInput} />

    Example with SelectField

    // You can now do:
    <SelectField name="select" label="Select">
        {options.map((option) => (
            <MenuItem key={option.value} value={option.value}>
                {option.label}
            </MenuItem>
        ))}
    </SelectField>
    // Instead of:
    <Field name="select" label="Select">
        {(props) => (
            <FinalFormSelect {...props}>
                {options.map((option) => (
                    <MenuItem key={option.value} value={option.value}>
                        {option.label}
                    </MenuItem>
                ))}
            </FinalFormSelect>
        )}
    </Field>
  • a77da84: Add helper for mui grid pagination (muiGridPagingToGql())

    Sample usage:

    const { data, loading, error } = useQuery<GQLProductsListQuery, GQLProductsListQueryVariables>(productsQuery, {
        variables: {
            ...muiGridFilterToGql(columns, dataGridProps.filterModel),
            ...muiGridPagingToGql({ page: dataGridProps.page, pageSize: dataGridProps.pageSize }),
            sort: muiGridSortToGql(sortModel),
        },
    });

@comet/admin-color-picker@4.4.0

Minor Changes

  • 3e15b81: Add field components to simplify the creation of forms with Final Form.

@comet/admin-date-time@4.4.0

Minor Changes

  • 3e15b81: Add field components to simplify the creation of forms with Final Form.

@comet/blocks-admin@4.4.0

Minor Changes

  • d4960b0: Add loop toggle to YouTubeVideoBlock

@comet/cms-admin@4.4.0

Minor Changes

  • 9b1a650: Silence polling errors in PageTree

    Errors during polling (pages query, check for changes query) led to multiple consecutive error dialogs, which were irritating for our users. As these errors occurred randomly and would typically be resolved by the next poll, we decided to silence them altogether.

  • a77da84: Add helper for mui grid pagination (muiGridPagingToGql())

Patch Changes

  • 1158362: Add content validation for SVG files to prevent the upload of SVGs containing JavaScript

@comet/blocks-api@4.4.0

Minor Changes

  • d4960b0: Add loop toggle to YouTubeVideoBlock

@comet/cms-api@4.4.0

Minor Changes

  • d4960b0: Add loop toggle to YouTubeVideoBlock

Patch Changes

  • 53ce068: Get file stats from uploaded file in file storage
  • 1158362: Add content validation for SVG files to prevent the upload of SVGs containing JavaScript