Releases: vivid-planet/comet
7.3.2
@comet/[email protected]
Patch Changes
-
2286234: Update required validator in
Field
to correctly handle falsey valuesPreviously, the validator incorrectly returned errors for all falsey values, e.g. the number
0
.
Now, it only returns an error forundefined
,null
,false
and empty strings.
6.17.5
@comet/[email protected]
Patch Changes
-
9f649e0: Update required validator in
Field
to correctly handle falsey valuesPreviously, the validator incorrectly returned errors for all falsey values, e.g. the number
0
.
Now, it only returns an error forundefined
,null
,false
and empty strings.
7.3.1
@comet/[email protected]
Patch Changes
- 91bfda9: Fix validation for
NumberField
andFinalFormNumberInput
by calling theonBlur
event, passed in by theField
7.3.0
@comet/[email protected]
Minor Changes
Patch Changes
- a1f4c0d: Replace
YouTube
andVimeo
icon with correctly colored versions
@comet/[email protected]
Patch Changes
-
6a1310c: Deprecate FinalForm components where a Field component exists as a simpler alternative
- Use
<AutocompleteField />
instead of<Field component={FinalFormAutocomplete} />
- Use
<CheckboxField />
instead of<Field />
with<FormControlLabel />
and<FinalFormCheckbox />
- Use
<AsyncAutocompleteField />
instead of<Field component={FinalFormAsyncAutocomplete} />
- Use
<AsyncSelectField />
instead of<Field component={FinalFormAsyncSelect} />
- Use
<NumberField />
instead of<Field component={FinalFormNumberInput} />
- Use
<SearchField />
instead of<Field component={FinalFormSearchTextField} />
- Use
<SelectField />
instead of<Field />
with<FinalFormSelect />
- Use
<SwitchField />
instead of<Field />
with<FormControlLabel />
and<FinalFormSwitch />
- Use
<DateField />
instead of<Field component={FinalFormDatePicker} />
- Use
<DateRangeField />
instead of<Field component={FinalFormDateRangePicker} />
- Use
<DateTimeField />
instead of<Field component={FinalFormDateTimePicker} />
- Use
<TimeField />
instead of<Field component={FinalFormTimePicker} />
- Use
<TimeRangeField />
instead of<Field component={FinalFormTimeRangePicker} />
- Use
<ColorField />
instead of<Field component={FinalFormColorPicker} />
- Use
@comet/[email protected]
Patch Changes
-
6a1310c: Deprecate FinalForm components where a Field component exists as a simpler alternative
- Use
<AutocompleteField />
instead of<Field component={FinalFormAutocomplete} />
- Use
<CheckboxField />
instead of<Field />
with<FormControlLabel />
and<FinalFormCheckbox />
- Use
<AsyncAutocompleteField />
instead of<Field component={FinalFormAsyncAutocomplete} />
- Use
<AsyncSelectField />
instead of<Field component={FinalFormAsyncSelect} />
- Use
<NumberField />
instead of<Field component={FinalFormNumberInput} />
- Use
<SearchField />
instead of<Field component={FinalFormSearchTextField} />
- Use
<SelectField />
instead of<Field />
with<FinalFormSelect />
- Use
<SwitchField />
instead of<Field />
with<FormControlLabel />
and<FinalFormSwitch />
- Use
<DateField />
instead of<Field component={FinalFormDatePicker} />
- Use
<DateRangeField />
instead of<Field component={FinalFormDateRangePicker} />
- Use
<DateTimeField />
instead of<Field component={FinalFormDateTimePicker} />
- Use
<TimeField />
instead of<Field component={FinalFormTimePicker} />
- Use
<TimeRangeField />
instead of<Field component={FinalFormTimeRangePicker} />
- Use
<ColorField />
instead of<Field component={FinalFormColorPicker} />
- Use
@comet/[email protected]
Patch Changes
-
6a1310c: Deprecate FinalForm components where a Field component exists as a simpler alternative
- Use
<AutocompleteField />
instead of<Field component={FinalFormAutocomplete} />
- Use
<CheckboxField />
instead of<Field />
with<FormControlLabel />
and<FinalFormCheckbox />
- Use
<AsyncAutocompleteField />
instead of<Field component={FinalFormAsyncAutocomplete} />
- Use
<AsyncSelectField />
instead of<Field component={FinalFormAsyncSelect} />
- Use
<NumberField />
instead of<Field component={FinalFormNumberInput} />
- Use
<SearchField />
instead of<Field component={FinalFormSearchTextField} />
- Use
<SelectField />
instead of<Field />
with<FinalFormSelect />
- Use
<SwitchField />
instead of<Field />
with<FormControlLabel />
and<FinalFormSwitch />
- Use
<DateField />
instead of<Field component={FinalFormDatePicker} />
- Use
<DateRangeField />
instead of<Field component={FinalFormDateRangePicker} />
- Use
<DateTimeField />
instead of<Field component={FinalFormDateTimePicker} />
- Use
<TimeField />
instead of<Field component={FinalFormTimePicker} />
- Use
<TimeRangeField />
instead of<Field component={FinalFormTimeRangePicker} />
- Use
<ColorField />
instead of<Field component={FinalFormColorPicker} />
- Use
@comet/[email protected]
Patch Changes
- 3f1b961: Allow emptying
targetUrl
inExternalLinkBlock
@comet/[email protected]
Patch Changes
-
c130adc:
BuildsService
: Start all jobs that match the scope exactlyPreviously, the first job that matched the scope exactly would be started, and the rest would be ignored. This has been fixed so that all jobs that match the scope exactly are started.
@comet/[email protected]
Patch Changes
- f2e10ec: Fix a bug where a block's hover-overlay element in the admin preview might persist after the underlying element is moved or resized
6.17.4
@comet/[email protected]
Patch Changes
-
9194d9a:
BuildsService
: Start all jobs that match the scope exactlyPreviously, the first job that matched the scope exactly would be started, and the rest would be ignored. This has been fixed so that all jobs that match the scope exactly are started.
7.2.1
@comet/[email protected]
Patch Changes
-
c663369: Fix bug in
DamVideoBlock
that caused the block to crash if no video file was selectedThe block used to crash if no video was selected because the
DamVideoBlockTransformerService
returned an empty object.
This left thepreviewImage
state in the adminundefined
causingstate2Output
to fail.
6.17.3
5.8.7
7.2.0
@comet/[email protected]
Minor Changes
-
0fb8d9a: Allow pinning DataGrid columns using the column config when using
DataGridPro
orDataGridPremium
with theusePersistentColumnState
hookconst columns: GridColDef[] = [ { field: "title", pinned: "left", }, // ... other columns { field: "actions", pinned: "right", }, ];
Patch Changes
- 4b267f9: Fix broken export/import of
commonErrorMessages
from the file form field
@comet/[email protected]
Minor Changes
- 9b800c9: Slightly adjust the styling of pinned columns in DataGrid
@comet/[email protected]
Minor Changes
-
381aa71: Add
ErrorHandlerProvider
Each block in
BlocksBlock
,OneOfBlock
andListBlock
is wrapped with an error boundary to prevent the whole page from crashing when a single block throws an error.
In production, the broken block is hidden. The application should take care of reporting the error to an error tracking service (e.g., Sentry). In local development, the error is re-thrown.Add an
ErrorHandler
to the root layout:// In src/app/layout.tsx <html> <body className={inter.className}> {/* Other Providers */} <ErrorHandler>{children}</ErrorHandler> </body> </html>
The
ErrorHandler
receives the errors in the application and can report them to the error tracking service.Example ErrorHandler
"use client"; import { ErrorHandlerProvider } from "@comet/cms-site"; import { PropsWithChildren } from "react"; export function ErrorHandler({ children }: PropsWithChildren) { function onError(error: Error, errorInfo: ErrorInfo) { console.error("Error caught by error handler", error, errorInfo.componentStack); if (process.env.NODE_ENV === "development") { throw error; } else { // Report the error to the error tracking service } } return <ErrorHandlerProvider onError={onError}>{children}</ErrorHandlerProvider>; }
@comet/[email protected]
Patch Changes
- 4b267f9: Fix broken export/import of
commonErrorMessages
from the file form field
7.1.0
@comet/[email protected]
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/[email protected]
Minor Changes
- b1bbd6a: Export a type for all icon names:
IconName
@comet/[email protected]
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/[email protected]
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/[email protected]
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/[email protected]
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/[email protected]
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" }} />