Skip to content

Releases: vivid-planet/comet

7.1.0

20 Aug 12:52
f3d9cec
Compare
Choose a tag to compare

@comet/admin@7.1.0

Minor Changes

  • 04844d3: Adjust the alignment and spacing of the label, the input, and child fields inside FieldContainer and Field

  • c0488eb: Use FeedbackButton in DeleteDialog of CrudContextMenu

    This provides the user with feedback about the current status of the delete action.

  • c1ab2b3: Add CheckboxListField component to make it easier to create checkbox lists in forms

    You can now do:

    <CheckboxListField
        label="Checkbox List"
        name="checkboxList"
        fullWidth
        options={[
            {
                label: "Option One",
                value: "option-one",
            },
            {
                label: "Option Two",
                value: "option-two",
            },
        ]}
    />

    instead of:

    <FieldContainer label="Checkbox List" fullWidth>
        <CheckboxField name="checkboxList" label="Checkbox one" value="checkbox-one" />
        <CheckboxField name="checkboxList" label="Checkbox two" value="checkbox-two" />
    </FieldContainer>
  • 99a1f0a: Add RadioGroupField component to make it easier to create radio group fields in forms

    You can now do:

    <RadioGroupField
        label="Radio"
        name="radio"
        fullWidth
        options={[
            {
                label: "Option One",
                value: "option-one",
            },
            {
                label: "Option Two",
                value: "option-two",
            },
        ]}
    />

    instead of:

    <FieldContainer label="Radio" fullWidth>
        <Field name="radio" type="radio" value="option-one">
            {(props) => <FormControlLabel label="Option One" control={<FinalFormRadio {...props} />} />}
        </Field>
        <Field name="radio" type="radio" value="option-two">
            {(props) => <FormControlLabel label="Option Two" control={<FinalFormRadio {...props} />} />}
        </Field>
    </FieldContainer>
  • edf14d0: Add the disableSlider prop to FinalFormRangeInput to disable the slider and only show the input fields

    <Field name="numberRange" label="Range Input" component={FinalFormRangeInput} min={0} max={100} disableSlider />
  • c050f22: Make the separator of FinalFormRangeInput overridable using the separator prop and change the default to the string "to"

    Example to restore the previous separator:

    <Field name="numberRange" label="Range Input" component={FinalFormRangeInput} min={0} max={100} separator="-" />

Patch Changes

  • dfc4a7f: Adjust the spacing of FinalFormRangeInput to align with other inputs

  • 39ab156: Fix the behavior of FinalFormRangeInput when the min and max values are inverted

    Previously, e.g., when the min value was changed to something greater than the max value, the min value would be set to the same as the max value.
    Now, the min and max values are swapped.

  • 2b68513: Fix the alignment of the input inside FieldContainer and Field when there is no label with variant="horizontal"

  • 374f383: Increase Toolbar padding left and right from 10px to 20px

@comet/admin-icons@7.1.0

Minor Changes

  • b1bbd6a: Export a type for all icon names: IconName

@comet/admin-theme@7.1.0

Minor Changes

  • 04844d3: Adjust the alignment and spacing of the label, the input, and child fields inside FieldContainer and Field

Patch Changes

  • 3adf5fe: Remove unnecessary padding of DataGrid rows
  • c90ae39: Fix spacing between page number and chevron icon in the pagination select of DataGrid

@comet/blocks-admin@7.1.0

Minor Changes

  • 1fe10e8: Add maxVisibleBlocks option to createBlocksBlock

  • e53f4ce: OneOfBlock: Remove label for the type field

    The label was unnecessary and occasionally caused UI problems when having two labels next each other.

Patch Changes

  • 2253a1d: createListBlock: Don't show the minimum visible blocks tooltip when the option isn't used
  • 6be41b6: Fix color for visible icon button in ListBlock and ColumnsBlock

@comet/cms-admin@7.1.0

Minor Changes

  • 7410aae: Add new FileUploadField component for uploading files in forms using the FileUploadsModule

  • 945ba87: Add icon prop to DashboardWidgetRoot

  • 9a80984: Rework EditImageDialog

    Changes

    • Increase image size

    • Add hover effects for focal points

    • Add "Open in DAM" button

      Note: This feature only works if the DependenciesConfig is configured for DamFile:

      // App.tsx
      
      <DependenciesConfigProvider
          entityDependencyMap={{
      +       DamFile: createDamFileDependency(),
              // ...
          }}
      >
  • 91b154b: Make the details and creator/author fields optional when using the DAM license feature

Patch Changes

  • 7dabe8d: Fix the content scope indicator on the EditFile page if DAM scoping is disabled

  • 452a12a: Change text color of FilePreview action buttons to white

    Previously, the text was invisible because it was black on a black background.

  • bbb7536: Fix false positives in resolveHasSaveConflict check

    The check occasionally failed due to rounding errors.
    This is fixed by rounding to full seconds before checking.

@comet/cms-api@7.1.0

Minor Changes

  • 19d53c4: Add Sentry module to simplify integration with Sentry.

    Usage:

    // main.ts
    
    app.use(Sentry.Handlers.requestHandler());
    app.use(Sentry.Handlers.tracingHandler());
    app.use(Sentry.Handlers.errorHandler());
    // app.module.ts
    
    SentryModule.forRootAsync({
        dsn: "sentry_dsn_url",
        environment: "dev",
        shouldReportException: (exception) => {
            // Custom logic to determine if the exception should be reported
            return true;
        },
    }),

Patch Changes

  • 87f74d3: Sort the keys in content scopes returned by UserPermissionsService alphabetically

    This fixes issues when comparing content scopes after converting them to strings via JSON.stringify().

    This specifically fixes a bug on the UserPermissionsPage:
    When the availableContentScopes passed to the UserPermissionsModule weren't sorted alphabetically, the allowed scopes wouldn't be displayed correctly in the UI.

@comet/cms-site@7.1.0

Minor Changes

  • 7ad7a50: PixelImageBlock: Set object-fit to cover per default

    When setting object-fit to cover, the image will fill the container and maintain its aspect ratio.
    This is the most common use case for images in our applications.
    The default behavior for object-fit (which is fill) resulted in distorted images.

    This behavior can be overridden by setting the style prop on the PixelImageBlock component, which is forwarded to the next/image component:

    <PixelImageBlock
      ...
      fill
    + style={{ objectFit: "contain" }}
    />

6.17.2

12 Aug 11:29
7dabe8d
Compare
Choose a tag to compare

@comet/cms-api@6.17.2

Patch Changes

  • d57b488: Sort the keys in content scopes returned by UserPermissionsService alphabetically

    This fixes issues when comparing content scopes after converting them to strings via JSON.stringify().

    This specifically fixes a bug on the UserPermissionsPage:
    When the availableContentScopes passed to the UserPermissionsModule weren't sorted alphabetically, the allowed scopes wouldn't be displayed correctly in the UI.

7.0.0

31 Jul 07:49
89a3e36
Compare
Choose a tag to compare

@comet/admin@7.0.0

Major Changes

  • 949356e: Remove clearable prop from FinalFormSelect and FinalFormAsyncSelect

    FinalFormSelect and FinalFormAsyncSelect are now clearable when required is not set.

  • 51a0861: Create a subroute by default in SaveBoundary

    The default path is ./save, you can change it using the subRoutePath prop.

  • 7314001: Change theming method of Menu

    • Rename permanent class-key to permanentDrawer and temporary class-key to temporaryDrawer
    • Replace the permanentDrawerProps and temporaryDrawerProps props with slotProps
  • 9a4530b: Remove the listItem class key from MenuCollapsibleItemClassKey due to a larger overhaul of the menu components

  • dc8bb6a: Remove the openedIcon and closedIcon props from MenuCollapsibleItem and add iconMapping instead

    The icon shown as the collapse indicator will be chosen from iconMapping, depending on the collapsed states of the Menu and the Item.

  • 8cc51b3: Remove popoverProps from AppHeaderDropdown

    Use slotProps.popover instead.

  • 6054fdc: Remove the requiredSymbol prop from FieldContainer and use MUIs native implementation

    This prop was used to display a custom required symbol next to the label of the field. We now use the native implementation of the required attribute of MUI to ensure better accessibility and compatibility with screen readers.

  • d0869ac: Rework Toolbar

    • The Toolbar is now split into a top and a bottom bar.

      The top bar displays a scope indicator and breadcrumbs. The bottom bar behaves like the old Toolbar.

    • The styling of Toolbar, ToolbarItem, ToolbarActions, ToolbarAutomaticTitleItem and ToolbarBackButton was adjusted

    • The new ToolbarActionButton should be used for buttons inside the ToolbarActions

      It automatically switches from a normal Button to an IconButton for smaller screen sizes.

    • To show a scope indicator, you must pass a <ContentScopeIndicator /> to the Toolbar via the scopeIndicator prop

  • 9a4530b: Remove temporaryDrawerProps, permanentDrawerProps, temporaryDrawerPaperProps and permanentDrawerPaperProps props from Menu component.

    Use slotProps instead.

  • 47ec528: Remove the FieldContainerComponent component

    FieldContainerComponent was never intended to be exported, use FieldContainer instead.

  • 956111a: Rename the FilterBarMoveFilersClassKey type to FilterBarMoreFiltersClassKey

  • 19eaee4: Remove the disabled class-key in TabScrollButton

    Use the :disabled selector instead when styling the disabled state.

  • 9a4530b: Remove the MenuLevel type

    The type can be used from MenuItemProps['level'] instead, if necessary.

  • 04ed68c: Remove the components and componentProps props from CopyToClipboardButton

    Instead, for the icons, use the copyIcon and successIcon props to pass a ReactNode instead of separately passing in values to the components and componentProps objects.
    Use slotPops to pass props to the remaining elements.

  • 61b2acf: Add FeedbackButton component

  • 2a7bc76: Replace the componentsProps prop with slotProps in FieldSet

  • 27efe7b: FinalFormFileSelect is now a simple final form wrapper around FileSelect

    Props now mirror those of FileSelect and are passed through to the FileSelect component.
    Setting defaultProps in the theme must now be done with CometAdminFileSelect instead of CometAdminFinalFormFileSelect.

    Class keys have been removed. Apply custom styling to CometAdminFileSelect instead of FinalFormFileSelect.

    The default value for maxSize has been removed.
    You may want to set the previous default value of 50 MB explicitly.

     <Field
         name="files"
         label="Files"
         component={FinalFormFileSelect}
    +    maxSize={50 * 1024 * 1024} // 50 MB
     />

    The disableDropzone prop has been removed.
    Use slotProps.dropzone.hideDroppableArea instead.

     <Field
         name="files"
         label="Files"
         component={FinalFormFileSelect}
    -    disableDropzone
    +    slotProps={{
    +        dropzone: {
    +            hideDroppableArea: true,
    +        },
    +    }}
     />

    The disableSelectFileButton prop has been removed.
    Use slotProps.dropzone.hideButton instead.

     <Field
         name="files"
         label="Files"
         component={FinalFormFileSelect}
    -    disableSelectFileButton
    +    slotProps={{
    +        dropzone: {
    +            hideButton: true,
    +        },
    +    }}
     />
  • b87c3c2: Replace the componentsProps prop with slotProps in InputWithPopper and remove the InputWithPopperComponentsProps type

  • 2a7bc76: Remove the message class-key from Alert

    Use the .MuiAlert-message selector instead to style the message of the underlying MUI Alert component.

  • d2e64d1: Remove the paper class-key from FilterBarPopoverFilter

    Instead of using styleOverrides for paper in the theme, use the slotProps and sx props.

  • 241249b: Remove the disabled and focusVisible class-keys and rename the inner class-key to content in AppHeaderButton

    Use the :disabled selector instead when styling the disabled state.
    Use the :focus selector instead when styling the focus state.

  • be4e639: Remove endAdornment prop from FinalFormSelect component

    The reason were conflicts with the clearable prop. This decision was based on the fact that MUI doesn't support endAdornment on selects (see: mui/material-ui#17799), and that there are no common use cases where both endAdornment and clearable are needed simultaneously.

  • a535454: Remove the disabled class-key in ClearInputButton

    Use the :disabled selector instead when styling the disabled state.

  • 1a1d831: MenuItem no longer supports props from MUI's ListItem but those from ListItemButton instead

  • a2f278b: Remove the popoverPaper class-key and rename the popoverRoot class-key to popover in AppHeaderDropdown

    Instead of using styleOverrides for popoverPaper in the theme, use the slotProps and sx props.
    Use the popover prop instead of popoverRoot to override styles.

  • 92eae2b: Change the method of overriding the styling of Admin components

     const theme = createCometTheme({
         components: {
             CometAdminMyComponent: {
                 styleOverrides: {
    -                root: {
    -                    "&$hasShadow": {
    -                        boxShadow: "2px 2px 5px 0 rgba(0, 0, 0, 0.25)",
    -                    },
    -                    "& $header": {
    -                        backgroundColor: "lime",
    -                    },
    -                },
    +                hasShadow: {
    +                    boxShadow: "2px 2px 5px 0 rgba(0, 0, 0, 0.25)",
    +                },
    +                header: {
    +                    backgroundColor: "lime",
    +                },
                 },
             },
         },
     });
    • Overriding a component's styles using withStyles is no longer supported. Use the sx and slotProps props instead:
    -import { withStyles } from "@mui/styles";
    -
    -const StyledMyComponent = withStyles({
    -    root: {
    -        backgroundColor: "lime",
    -    },
    -    header: {
    -        backgroundColor: "fuchsia",
    -    },
    -})(MyComponent);
    -
    -// ...
    -
    -<StyledMyComponent title="Hello World" />;
    +<MyComponent
    +    title="Hello World"
    +    sx={{
    +        backgroundColor: "lime",
    +    }}
    +    slotProps={{
    +        header: {
    +            sx: {
    +                backgroundColor: "fuchsia",
    +            },
    +        },
    +    }}
    +/>
    • The module augmentation for the DefaultTheme type from @mui/styles/defaultTheme is no longer needed and needs to be removed from the admins theme file, usually located in admin/src/theme.ts:
    -declare module "@mui/styles/defaultTheme" {
    -    // eslint-disable-next-line @typescript-eslint/no-empty-interface
    -    export interface DefaultTheme extends Theme {}
    -}
    • Class-keys originating from MUI components have been removed from Comet Admin components, causing certain class-names and styleOverrides to no longer be applied.
      The components root class-key is not affected. Other class-keys will retain the class-names and styleOverrides from the underlying MUI component.
      For example, in ClearInputAdornment (when used with position="end") the class-name CometAdminClearInputAdornment-positionEnd and the styleOverrides for CometAdminClearInputAdornment.positionEnd will no longer be applied.
      The component will retain the class-names MuiInputAdornment-positionEnd, MuiInputAdornment-root, an...
Read more

6.17.1

29 Jul 06:10
25f8d8c
Compare
Choose a tag to compare

@comet/cms-api@6.17.1

Patch Changes

  • 76ca3bf: Remove index signature from ContentScope interface

    This allows using scope DTOs without index signature in @ScopedEntity().

6.17.0

23 Jul 14:19
bddd2a8
Compare
Choose a tag to compare

@comet/admin@6.17.0

Minor Changes

  • 7ecc30e: Add color prop to CometLogo

    It now supports a colored and a white version of the logo.

Patch Changes

  • 536e95c: Fix error dialog to show GraphQL errors again

    Previously, GraphQL errors without an http status code didn't trigger an error dialog anymore.

  • ec4685b: Prevent unintended width: 100% on nested InputBase components inside FieldContainer and Field components

    FieldContainer (and therefore Field) needs to set the with of the InputBase it wraps to 100%.
    This also caused deeply nested InputBase components, e.g., inside a Dialog, to get this width and break the styling of these components, as they are not intended to be styled by FieldContainer.

@comet/cms-admin@6.17.0

Minor Changes

  • 9ddf655: Require a file extension when changing the filename in the DAM

    Previously, files in the DAM could be renamed without restrictions.
    Files could have invalid extensions (for their mimetype) or no extension at all.
    This theoretically made the following attack possible:

    1. Creating a dangerous .exe file locally
    2. Renaming it to .jpg locally
    3. Uploading the file as a .jpg
    4. Renaming it to .exe in the DAM
    5. The file is now downloaded as .exe

    Now, filenames must always have an extension that matches their mimetype.
    This is enforced in the admin and API.
    Existing files without an extension are automatically assigned an extension via a DB migration.

Patch Changes

  • 987fe9a: Fix DocumentInterface.updateMutation type

    The type for the input variable needs to be DocumentOutput, not DocumentInput.

@comet/cms-api@6.17.0

Minor Changes

  • 9ddf655: Require a file extension when changing the filename in the DAM

    Previously, files in the DAM could be renamed without restrictions.
    Files could have invalid extensions (for their mimetype) or no extension at all.
    This theoretically made the following attack possible:

    1. Creating a dangerous .exe file locally
    2. Renaming it to .jpg locally
    3. Uploading the file as a .jpg
    4. Renaming it to .exe in the DAM
    5. The file is now downloaded as .exe

    Now, filenames must always have an extension that matches their mimetype.
    This is enforced in the admin and API.
    Existing files without an extension are automatically assigned an extension via a DB migration.

  • 9ddf655: Loosen the filename slugification rules

    When uploading a file to the DAM, the filename is automatically slugified.
    Previously, the slugification used pretty strict rules without a good reason.

    Now, the rules were loosened allowing uppercase characters and most special characters.
    Also, slugify now uses the locale en instead of de for special character replacements.

Patch Changes

  • 5a9c49a: CronJobModule: Fix job creation if resulting name exceeds 63 characters

7.0.0-beta.6

19 Jul 12:11
295bc92
Compare
Choose a tag to compare
7.0.0-beta.6 Pre-release
Pre-release

@comet/admin@7.0.0-beta.6

Minor Changes

  • 1197149: Automatically set fullWidth for FieldContainer with variant="horizontal"

    Horizontal fields are automatically responsive:
    If they are less than 600px wide, the layout automatically changes to vertical.
    For this to work correctly, the fields must be fullWidth.
    Therefore, fullWidth is now true by default for horizontal fields.

@comet/eslint-config@7.0.0-beta.6

Major Changes

  • 2e20a86: nextjs/react: Enable react/jsx-no-useless-fragment rule

7.0.0-beta.5

16 Jul 09:37
9ddf655
Compare
Choose a tag to compare
7.0.0-beta.5 Pre-release
Pre-release

@comet/cms-site@7.0.0-beta.5

Major Changes

  • 7f1e784: Remove next/link legacy behavior as default behavior

    Previously, Next required the Link component to have a child <a> tag. To style this tag correctly in the application, none of the library link blocks (DamFileDownloadLinkBlock, ExternalLinkBlock, EmailLinkBlock, InternalLinkBlock, and PhoneLinkBlock) rendered the tag, but cloned the children with the correct props instead.

    However, since Next v13 the Link component no longer requires a child <a> tag. Consequently, we don't need to render the tag for the InternalLinkBlock (which uses Link internally) anymore. In order to style all link blocks correctly, we now render an <a> tag for all other link blocks.

    Upgrade

    To upgrade, either remove all <a> tags from your link block usages, or add the legacyBehavior prop to all library link blocks.

@comet/admin@7.0.0-beta.5

Minor Changes

  • 569ad04: Deprecate SplitButton, FinalFormSaveSplitButton and SplitButtonContext and remove all uses of these components in our libraries

    The reason is that we decided to retire the SplitButton pattern.

@comet/cms-admin@7.0.0-beta.5

Minor Changes

  • 569ad04: Deprecate SplitButton, FinalFormSaveSplitButton and SplitButtonContext and remove all uses of these components in our libraries

    The reason is that we decided to retire the SplitButton pattern.

6.16.0

15 Jul 07:55
d862d6c
Compare
Choose a tag to compare

@comet/admin@6.16.0

Minor Changes

  • fb0fe25: Add FinalFormNumberInput and NumberField as optimised fields for number inputs in FinalForms

Patch Changes

  • 747fe32: Fix incorrect router prompt in TableLocalChanges when there are no changes

@comet/cms-admin@6.16.0

Minor Changes

  • 5e830f8: Add an Azure AI Translator implementation of the content translation feature

    To use it, do the following:

    API:

    // app.module.ts
    export class AppModule {
        static forRoot(config: Config): DynamicModule {
            return {
                imports: [
                    // ...
    +               AzureAiTranslatorModule.register({
    +                   endpoint: envVars.AZURE_AI_TRANSLATOR_ENDPOINT,
    +                   key: envVars.AZURE_AI_TRANSLATOR_KEY,
    +                   region: envVars.AZURE_AI_TRANSLATOR_REGION,
    +               }),
                ],
            };
        }
    }

    Users need the translation permission to use the translation feature.

    Admin:

    Wrap the section where you want to use the content translation with the AzureAiTranslatorProvider provider:

    <AzureAiTranslatorProvider enabled={true}>{/*  ...  */}</AzureAiTranslatorProvider>

    Note: AzureAiTranslatorProvider automatically checks for the translation permission. The translation button is only shown for users with this permission.

@comet/cms-api@6.16.0

Minor Changes

  • 5e830f8: Add an Azure AI Translator implementation of the content translation feature

    To use it, do the following:

    API:

    // app.module.ts
    export class AppModule {
        static forRoot(config: Config): DynamicModule {
            return {
                imports: [
                    // ...
    +               AzureAiTranslatorModule.register({
    +                   endpoint: envVars.AZURE_AI_TRANSLATOR_ENDPOINT,
    +                   key: envVars.AZURE_AI_TRANSLATOR_KEY,
    +                   region: envVars.AZURE_AI_TRANSLATOR_REGION,
    +               }),
                ],
            };
        }
    }

    Users need the translation permission to use the translation feature.

    Admin:

    Wrap the section where you want to use the content translation with the AzureAiTranslatorProvider provider:

    <AzureAiTranslatorProvider enabled={true}>{/*  ...  */}</AzureAiTranslatorProvider>

    Note: AzureAiTranslatorProvider automatically checks for the translation permission. The translation button is only shown for users with this permission.

Patch Changes

  • f7d405d: Fix the duplicate filename check in FilesService#updateByEntity

    Previously, we checked the existing file name (entity.name) for the check instead of the new name (input.name). This never resulted in an error.

7.0.0-beta.4

10 Jul 08:52
5e830f8
Compare
Choose a tag to compare
7.0.0-beta.4 Pre-release
Pre-release

@comet/blocks-admin@7.0.0-beta.4

Major Changes

  • b7560e3: Move YouTubeVideoBlock to @cms packages

    Migrate

    - import { YouTubeVideoBlock } from "@comet/blocks-admin";
    + import { YouTubeVideoBlock } from "@comet/cms-admin";
    - import { YouTubeVideoBlock } from "@comet/blocks-api";
    + import { YouTubeVideoBlock } from "@comet/cms-api";
  • a589188: Remove aspectRatio from YouTubeBlock

    The block's aspect ratio options (4x3, 16x9) proved too inflexible to be of actual use in an application. Therefore, the aspect ratio field was removed. It should be defined in the application instead.

    Migrate

    The block requires an aspect ratio in the site. It should be set using the aspectRatio prop (default: 16x9):

     <YouTubeVideoBlock
       data={video}
    +  aspectRatio="9x16"
     />

@comet/cms-admin@7.0.0-beta.4

Major Changes

  • b7560e3: Move YouTubeVideoBlock to @cms packages

    Migrate

    - import { YouTubeVideoBlock } from "@comet/blocks-admin";
    + import { YouTubeVideoBlock } from "@comet/cms-admin";
    - import { YouTubeVideoBlock } from "@comet/blocks-api";
    + import { YouTubeVideoBlock } from "@comet/cms-api";

Minor Changes

  • b7560e3: Add preview image to YouTubeVideoBlock and DamVideoBlock

    The YouTubeVideoBlock and the DamVideoBlock now support a preview image out of the box. For customisation the default VideoPreviewImage component can be overridden with the optional renderPreviewImage method.

    It is recommended to replace the custom implemented video blocks in the projects with the updated YouTubeVideoBlock and DamVideoBlock from the library.

@comet/blocks-api@7.0.0-beta.4

Major Changes

  • b7560e3: Move YouTubeVideoBlock to @cms packages

    Migrate

    - import { YouTubeVideoBlock } from "@comet/blocks-admin";
    + import { YouTubeVideoBlock } from "@comet/cms-admin";
    - import { YouTubeVideoBlock } from "@comet/blocks-api";
    + import { YouTubeVideoBlock } from "@comet/cms-api";

@comet/cms-api@7.0.0-beta.4

Major Changes

  • b7560e3: Move YouTubeVideoBlock to @cms packages

    Migrate

    - import { YouTubeVideoBlock } from "@comet/blocks-admin";
    + import { YouTubeVideoBlock } from "@comet/cms-admin";
    - import { YouTubeVideoBlock } from "@comet/blocks-api";
    + import { YouTubeVideoBlock } from "@comet/cms-api";
  • a589188: Remove aspectRatio from YouTubeBlock

    The block's aspect ratio options (4x3, 16x9) proved too inflexible to be of actual use in an application. Therefore, the aspect ratio field was removed. It should be defined in the application instead.

    Migrate

    The block requires an aspect ratio in the site. It should be set using the aspectRatio prop (default: 16x9):

     <YouTubeVideoBlock
       data={video}
    +  aspectRatio="9x16"
     />
  • 3ea123f: Increase minimum supported version of @mikro-orm/core, @mikro-orm/migrations, and @mikro-orm/postgresql to v5.8.4

Minor Changes

  • bfa94b7: API Generator: Generate field resolver for root blocks

    This allows skipping the @Field annotation for root blocks in the entity and it doesn't need the field middleware anymore.

  • b7560e3: Add preview image to YouTubeVideoBlock and DamVideoBlock

    The YouTubeVideoBlock and the DamVideoBlock now support a preview image out of the box. For customisation the default VideoPreviewImage component can be overridden with the optional renderPreviewImage method.

    It is recommended to replace the custom implemented video blocks in the projects with the updated YouTubeVideoBlock and DamVideoBlock from the library.

@comet/cms-site@7.0.0-beta.4

Major Changes

  • 15eb9e1: Revise PixelImageBlock to correctly use the "new" next/image component

    See the docs for a comparison between the new and the legacy component.

    Migrate

    Remove the layout prop from the block as it can lead to errors with the default implementation (layout="responsive" is not compatible with the new fill prop).

    • layout={"responsive" | "inherit"} can safely be removed

      <PixelImageBlock
          data={block.props}
          aspectRatio={aspectRatio}
      -   layout={"responsive"}   // line is marked as deprecated, but "responsive" must be removed
          {...imageProps}
      />
    • layout={"fill"} can be replaced with fill={true}

      <PixelImageBlock
          data={block.props}
          aspectRatio={aspectRatio}
      -   layout={"fill"}
      +   fill
          {...imageProps}
      />

    Notes:

    The PixelImageBlock is usually wrapped in a DamImageBlock in the application. The layout prop should be removed from it as well.

    You can use the newly added fill prop of the next/image component by embedding the PixelImageBlock in a parent element that assigns the position style. See the docs for more information.

  • a589188: Remove aspectRatio from YouTubeBlock

    The block's aspect ratio options (4x3, 16x9) proved too inflexible to be of actual use in an application. Therefore, the aspect ratio field was removed. It should be defined in the application instead.

    Migrate

    The block requires an aspect ratio in the site. It should be set using the aspectRatio prop (default: 16x9):

     <YouTubeVideoBlock
       data={video}
    +  aspectRatio="9x16"
     />

Minor Changes

  • cf9496f: Add legacyPagesRouterSitePreviewApiHandler helper

    Used to enable the site preview (Preview Mode) for projects which use the Pages Router. This helper is added to ease migrating. New projects should use the App Router instead.

  • b7560e3: Add preview image to YouTubeVideoBlock and DamVideoBlock

    The YouTubeVideoBlock and the DamVideoBlock now support a preview image out of the box. For customisation the default VideoPreviewImage component can be overridden with the optional renderPreviewImage method.

    It is recommended to replace the custom implemented video blocks in the projects with the updated YouTubeVideoBlock and DamVideoBlock from the library.

@comet/admin@7.0.0-beta.4

Minor Changes

  • a0bd09a: Add ForcePromptRoute, a Route that triggers a prompt even if it is a subroute

    Used in StackSwitch so that navigating to a nested stack subpage will show a prompt (if dirty)

  • 170720b: Stack: Update parent breadcrumb URL in state to not forget filters and other states when going back

6.15.1

09 Jul 10:34
5be3c60
Compare
Choose a tag to compare

@comet/admin-icons@6.15.1

Minor Changes

@comet/cms-admin@6.15.1

Minor Changes

  • cdc861c: Add buttonChildren and children props to UserHeaderItem

    This increases the flexibility of the UserHeaderItem component by allowing the AppHeaderDropdown label to be passed via buttonChildren. More buttons or other list items in the dropdown can be passed via children.

    Example:

    <UserHeaderItem buttonChildren="Some custom label">
        <Button variant="contained">Some custom button</Button>
        <Button>Some custom button 2</Button>
    </UserHeaderItem>

Patch Changes

  • 0654f7b: Handle unauthorized and unauthenticated correctly in error dialog

    The error dialog now presents screens according to the current state. Required to work in all conditions:

    • CurrentUserProvider must be beneath MuiThemeProvider and IntlProvider and above RouterBrowserRouter
    • ErrorDialogHandler must be parallel to CurrentUserProvider

@comet/admin@6.15.1

Patch Changes

  • 0654f7b: Handle unauthorized and unauthenticated correctly in error dialog

    The error dialog now presents screens according to the current state. Required to work in all conditions:

    • CurrentUserProvider must be beneath MuiThemeProvider and IntlProvider and above RouterBrowserRouter
    • ErrorDialogHandler must be parallel to CurrentUserProvider

@comet/blocks-admin@6.15.1

Patch Changes

  • ec7fb9f: Fix a validation error for default values in YouTubeVideoBlock

@comet/blocks-api@6.15.1

Patch Changes

  • c7f5637: Fix validation of YouTubeVideoBlock

    Previously, the validation of the YouTubeVideoBlock differed between admin and API.
    The admin allowed YouTube URLs and YouTube video IDs.
    The API only allowed URLs but blocked video IDs.

    Now, the API validation also accepts URLs and video IDs.

@comet/cms-api@6.15.1

Patch Changes

  • 9b29afd: Add missing @RequiredPermission to createZip route

  • 0654f7b: Handle unauthorized and unauthenticated correctly in error dialog

    The error dialog now presents screens according to the current state. Required to work in all conditions:

    • CurrentUserProvider must be beneath MuiThemeProvider and IntlProvider and above RouterBrowserRouter
    • ErrorDialogHandler must be parallel to CurrentUserProvider

@comet/eslint-config@6.15.1

Patch Changes

  • 6cb8505: Fix Prettier peer dependency

    The dependency range was incorrectly set to >= 2. Change to ^2.0.0 since Prettier v3 isn't supported at the moment.