Skip to content

Releases: vivid-planet/comet

7.3.2

06 Sep 07:15
bc2d0be
Compare
Choose a tag to compare

@comet/[email protected]

Patch Changes

  • 2286234: Update required validator in Field to correctly handle falsey values

    Previously, the validator incorrectly returned errors for all falsey values, e.g. the number 0.
    Now, it only returns an error for undefined, null, false and empty strings.

6.17.5

06 Sep 09:02
3e013b0
Compare
Choose a tag to compare

@comet/[email protected]

Patch Changes

  • 9f649e0: Update required validator in Field to correctly handle falsey values

    Previously, the validator incorrectly returned errors for all falsey values, e.g. the number 0.
    Now, it only returns an error for undefined, null, false and empty strings.

7.3.1

05 Sep 14:42
3129c0b
Compare
Choose a tag to compare

@comet/[email protected]

Patch Changes

  • 91bfda9: Fix validation for NumberField and FinalFormNumberInput by calling the onBlur event, passed in by the Field

7.3.0

04 Sep 10:50
0ffec5a
Compare
Choose a tag to compare

@comet/[email protected]

Minor Changes

Patch Changes

  • a1f4c0d: Replace YouTube and Vimeo 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} />

@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} />

@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} />

@comet/[email protected]

Patch Changes

  • 3f1b961: Allow emptying targetUrl in ExternalLinkBlock

@comet/[email protected]

Patch Changes

  • c130adc: BuildsService: Start all jobs that match the scope exactly

    Previously, 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

31 Aug 11:56
e39dd31
Compare
Choose a tag to compare

@comet/[email protected]

Patch Changes

  • 9194d9a: BuildsService: Start all jobs that match the scope exactly

    Previously, 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

26 Aug 06:06
af59eef
Compare
Choose a tag to compare

@comet/[email protected]

Patch Changes

  • c663369: Fix bug in DamVideoBlock that caused the block to crash if no video file was selected

    The block used to crash if no video was selected because the DamVideoBlockTransformerService returned an empty object.
    This left the previewImage state in the admin undefined causing state2Output to fail.

6.17.3

26 Aug 14:58
3f1b961
Compare
Choose a tag to compare

@comet/[email protected]

Patch Changes

  • 60b06d4: Allow emptying targetUrl in ExternalLinkBlock

5.8.7

27 Aug 06:43
3f1b961
Compare
Choose a tag to compare

@comet/[email protected]

Patch Changes

  • d803276: Allow emptying targetUrl in ExternalLinkBlock

7.2.0

22 Aug 10:58
ac01c5a
Compare
Choose a tag to compare

@comet/[email protected]

Minor Changes

  • 0fb8d9a: Allow pinning DataGrid columns using the column config when using DataGridPro or DataGridPremium with the usePersistentColumnState hook

    const 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 and ListBlock 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

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

@comet/[email protected]

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/[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 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/[email protected]

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/[email protected]

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/[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 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/[email protected]

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" }}
    />