Releases: vivid-planet/comet
7.1.0
@comet/admin@7.1.0
Minor Changes
-
04844d3: Adjust the alignment and spacing of the label, the input, and child fields inside
FieldContainer
andField
-
c0488eb: Use
FeedbackButton
inDeleteDialog
ofCrudContextMenu
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 formsYou 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 formsYou 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 toFinalFormRangeInput
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 theseparator
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 themin
andmax
values are invertedPreviously, e.g., when the
min
value was changed to something greater than themax
value, themin
value would be set to the same as the max value.
Now, themin
andmax
values are swapped. -
2b68513: Fix the alignment of the input inside
FieldContainer
andField
when there is no label withvariant="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
andField
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 tocreateBlocksBlock
-
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
andColumnsBlock
@comet/cms-admin@7.1.0
Minor Changes
-
7410aae: Add new
FileUploadField
component for uploading files in forms using theFileUploadsModule
-
945ba87: Add
icon
prop toDashboardWidgetRoot
-
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 forDamFile
:// 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 whitePreviously, the text was invisible because it was black on a black background.
-
bbb7536: Fix false positives in
resolveHasSaveConflict
checkThe 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
alphabeticallyThis fixes issues when comparing content scopes after converting them to strings via
JSON.stringify()
.This specifically fixes a bug on the UserPermissionsPage:
When theavailableContentScopes
passed to theUserPermissionsModule
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
tocover
per defaultWhen setting
object-fit
tocover
, 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 forobject-fit
(which isfill
) resulted in distorted images.This behavior can be overridden by setting the
style
prop on thePixelImageBlock
component, which is forwarded to thenext/image
component:<PixelImageBlock ... fill + style={{ objectFit: "contain" }} />
6.17.2
@comet/cms-api@6.17.2
Patch Changes
-
d57b488: Sort the keys in content scopes returned by
UserPermissionsService
alphabeticallyThis fixes issues when comparing content scopes after converting them to strings via
JSON.stringify()
.This specifically fixes a bug on the UserPermissionsPage:
When theavailableContentScopes
passed to theUserPermissionsModule
weren't sorted alphabetically, the allowed scopes wouldn't be displayed correctly in the UI.
7.0.0
@comet/admin@7.0.0
Major Changes
-
949356e: Remove
clearable
prop fromFinalFormSelect
andFinalFormAsyncSelect
FinalFormSelect
andFinalFormAsyncSelect
are now clearable whenrequired
is not set. -
51a0861: Create a subroute by default in
SaveBoundary
The default path is
./save
, you can change it using thesubRoutePath
prop. -
7314001: Change theming method of
Menu
- Rename
permanent
class-key topermanentDrawer
andtemporary
class-key totemporaryDrawer
- Replace the
permanentDrawerProps
andtemporaryDrawerProps
props withslotProps
- Rename
-
9a4530b: Remove the
listItem
class key fromMenuCollapsibleItemClassKey
due to a larger overhaul of the menu components -
dc8bb6a: Remove the
openedIcon
andclosedIcon
props fromMenuCollapsibleItem
and addiconMapping
insteadThe 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
fromAppHeaderDropdown
Use
slotProps.popover
instead. -
6054fdc: Remove the
requiredSymbol
prop fromFieldContainer
and use MUIs native implementationThis 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
andToolbarBackButton
was adjusted -
The new
ToolbarActionButton
should be used for buttons inside theToolbarActions
It automatically switches from a normal
Button
to anIconButton
for smaller screen sizes. -
To show a scope indicator, you must pass a
<ContentScopeIndicator />
to theToolbar
via thescopeIndicator
prop
-
-
9a4530b: Remove
temporaryDrawerProps
,permanentDrawerProps
,temporaryDrawerPaperProps
andpermanentDrawerPaperProps
props fromMenu
component.Use
slotProps
instead. -
47ec528: Remove the
FieldContainerComponent
componentFieldContainerComponent
was never intended to be exported, useFieldContainer
instead. -
956111a: Rename the
FilterBarMoveFilersClassKey
type toFilterBarMoreFiltersClassKey
-
19eaee4: Remove the
disabled
class-key inTabScrollButton
Use the
:disabled
selector instead when styling the disabled state. -
9a4530b: Remove the
MenuLevel
typeThe type can be used from
MenuItemProps['level']
instead, if necessary. -
04ed68c: Remove the
components
andcomponentProps
props fromCopyToClipboardButton
Instead, for the icons, use the
copyIcon
andsuccessIcon
props to pass aReactNode
instead of separately passing in values to thecomponents
andcomponentProps
objects.
UseslotPops
to pass props to the remaining elements. -
61b2acf: Add
FeedbackButton
component -
2a7bc76: Replace the
componentsProps
prop withslotProps
inFieldSet
-
27efe7b:
FinalFormFileSelect
is now a simple final form wrapper aroundFileSelect
Props now mirror those of
FileSelect
and are passed through to theFileSelect
component.
SettingdefaultProps
in the theme must now be done withCometAdminFileSelect
instead ofCometAdminFinalFormFileSelect
.Class keys have been removed. Apply custom styling to
CometAdminFileSelect
instead ofFinalFormFileSelect
.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.
UseslotProps.dropzone.hideDroppableArea
instead.<Field name="files" label="Files" component={FinalFormFileSelect} - disableDropzone + slotProps={{ + dropzone: { + hideDroppableArea: true, + }, + }} />
The
disableSelectFileButton
prop has been removed.
UseslotProps.dropzone.hideButton
instead.<Field name="files" label="Files" component={FinalFormFileSelect} - disableSelectFileButton + slotProps={{ + dropzone: { + hideButton: true, + }, + }} />
-
b87c3c2: Replace the
componentsProps
prop withslotProps
inInputWithPopper
and remove theInputWithPopperComponentsProps
type -
2a7bc76: Remove the
message
class-key fromAlert
Use the
.MuiAlert-message
selector instead to style the message of the underlying MUIAlert
component. -
d2e64d1: Remove the
paper
class-key fromFilterBarPopoverFilter
Instead of using
styleOverrides
forpaper
in the theme, use theslotProps
andsx
props. -
241249b: Remove the
disabled
andfocusVisible
class-keys and rename theinner
class-key tocontent
inAppHeaderButton
Use the
:disabled
selector instead when styling the disabled state.
Use the:focus
selector instead when styling the focus state. -
be4e639: Remove
endAdornment
prop fromFinalFormSelect
componentThe 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
andclearable
are needed simultaneously. -
a535454: Remove the
disabled
class-key inClearInputButton
Use the
:disabled
selector instead when styling the disabled state. -
1a1d831:
MenuItem
no longer supports props from MUI'sListItem
but those fromListItemButton
instead -
a2f278b: Remove the
popoverPaper
class-key and rename thepopoverRoot
class-key topopover
inAppHeaderDropdown
Instead of using
styleOverrides
forpopoverPaper
in the theme, use theslotProps
andsx
props.
Use thepopover
prop instead ofpopoverRoot
to override styles. -
92eae2b: Change the method of overriding the styling of Admin components
- Remove dependency on the legacy
@mui/styles
package in favor of@mui/material/styles
. - Add the ability to style components using MUI's
sx
prop. - Add the ability to style individual elements (slots) of a component using the
slotProps
andsx
props. - The
# @comet/admin syntax in the theme's
styleOverrides` is no longer supported, see: https://mui.com/material-ui/migration/v5-style-changes/#migrate-theme-styleoverrides-to-emotion
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 thesx
andslotProps
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 inadmin/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 componentsroot
class-key is not affected. Other class-keys will retain the class-names andstyleOverrides
from the underlying MUI component.
For example, inClearInputAdornment
(when used withposition="end"
) the class-nameCometAdminClearInputAdornment-positionEnd
and thestyleOverrides
forCometAdminClearInputAdornment.positionEnd
will no longer be applied.
The component will retain the class-namesMuiInputAdornment-positionEnd
,MuiInputAdornment-root
, an...
- Remove dependency on the legacy
6.17.1
6.17.0
@comet/admin@6.17.0
Minor Changes
-
7ecc30e: Add
color
prop toCometLogo
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 nestedInputBase
components insideFieldContainer
andField
componentsFieldContainer
(and thereforeField
) needs to set the with of theInputBase
it wraps to 100%.
This also caused deeply nestedInputBase
components, e.g., inside aDialog
, to get thiswidth
and break the styling of these components, as they are not intended to be styled byFieldContainer
.
@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:- Creating a dangerous .exe file locally
- Renaming it to .jpg locally
- Uploading the file as a .jpg
- Renaming it to .exe in the DAM
- 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
typeThe type for the
input
variable needs to beDocumentOutput
, notDocumentInput
.
@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:- Creating a dangerous .exe file locally
- Renaming it to .jpg locally
- Uploading the file as a .jpg
- Renaming it to .exe in the DAM
- 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 localeen
instead ofde
for special character replacements.
Patch Changes
- 5a9c49a: CronJobModule: Fix job creation if resulting name exceeds 63 characters
7.0.0-beta.6
@comet/admin@7.0.0-beta.6
Minor Changes
-
1197149: Automatically set
fullWidth
forFieldContainer
withvariant="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 befullWidth
.
Therefore,fullWidth
is nowtrue
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
@comet/cms-site@7.0.0-beta.5
Major Changes
-
7f1e784: Remove
next/link
legacy behavior as default behaviorPreviously, 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
, andPhoneLinkBlock
) 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 theInternalLinkBlock
(which usesLink
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 thelegacyBehavior
prop to all library link blocks.
@comet/admin@7.0.0-beta.5
Minor Changes
-
569ad04: Deprecate
SplitButton
,FinalFormSaveSplitButton
andSplitButtonContext
and remove all uses of these components in our librariesThe reason is that we decided to retire the SplitButton pattern.
@comet/cms-admin@7.0.0-beta.5
Minor Changes
-
569ad04: Deprecate
SplitButton
,FinalFormSaveSplitButton
andSplitButtonContext
and remove all uses of these components in our librariesThe reason is that we decided to retire the SplitButton pattern.
6.16.0
@comet/admin@6.16.0
Minor Changes
- fb0fe25: Add
FinalFormNumberInput
andNumberField
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 thetranslation
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 thetranslation
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
@comet/blocks-admin@7.0.0-beta.4
Major Changes
-
b7560e3: Move
YouTubeVideoBlock
to@cms
packagesMigrate
- 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
fromYouTubeBlock
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
packagesMigrate
- 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
andDamVideoBlock
The
YouTubeVideoBlock
and theDamVideoBlock
now support a preview image out of the box. For customisation the defaultVideoPreviewImage
component can be overridden with the optionalrenderPreviewImage
method.It is recommended to replace the custom implemented video blocks in the projects with the updated
YouTubeVideoBlock
andDamVideoBlock
from the library.
@comet/blocks-api@7.0.0-beta.4
Major Changes
-
b7560e3: Move
YouTubeVideoBlock
to@cms
packagesMigrate
- 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
packagesMigrate
- 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
fromYouTubeBlock
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
andDamVideoBlock
The
YouTubeVideoBlock
and theDamVideoBlock
now support a preview image out of the box. For customisation the defaultVideoPreviewImage
component can be overridden with the optionalrenderPreviewImage
method.It is recommended to replace the custom implemented video blocks in the projects with the updated
YouTubeVideoBlock
andDamVideoBlock
from the library.
@comet/cms-site@7.0.0-beta.4
Major Changes
-
15eb9e1: Revise
PixelImageBlock
to correctly use the "new"next/image
componentSee 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 newfill
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 withfill={true}
<PixelImageBlock data={block.props} aspectRatio={aspectRatio} - layout={"fill"} + fill {...imageProps} />
Notes:
The
PixelImageBlock
is usually wrapped in aDamImageBlock
in the application. Thelayout
prop should be removed from it as well.You can use the newly added
fill
prop of thenext/image
component by embedding thePixelImageBlock
in a parent element that assigns theposition
style. See the docs for more information. -
-
a589188: Remove
aspectRatio
fromYouTubeBlock
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
helperUsed 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
andDamVideoBlock
The
YouTubeVideoBlock
and theDamVideoBlock
now support a preview image out of the box. For customisation the defaultVideoPreviewImage
component can be overridden with the optionalrenderPreviewImage
method.It is recommended to replace the custom implemented video blocks in the projects with the updated
YouTubeVideoBlock
andDamVideoBlock
from the library.
@comet/admin@7.0.0-beta.4
Minor Changes
6.15.1
@comet/admin-icons@6.15.1
Minor Changes
- 4060278: Add
RteUppercase
icon
@comet/cms-admin@6.15.1
Minor Changes
-
cdc861c: Add
buttonChildren
andchildren
props toUserHeaderItem
This increases the flexibility of the
UserHeaderItem
component by allowing theAppHeaderDropdown
label to be passed viabuttonChildren
. More buttons or other list items in the dropdown can be passed viachildren
.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 beneathMuiThemeProvider
andIntlProvider
and aboveRouterBrowserRouter
ErrorDialogHandler
must be parallel toCurrentUserProvider
@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 beneathMuiThemeProvider
andIntlProvider
and aboveRouterBrowserRouter
ErrorDialogHandler
must be parallel toCurrentUserProvider
@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
tocreateZip
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 beneathMuiThemeProvider
andIntlProvider
and aboveRouterBrowserRouter
ErrorDialogHandler
must be parallel toCurrentUserProvider
@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.