Skip to content

Releases: vivid-planet/comet

4.3.0

10 Jul 07:13
25680db
Compare
Choose a tag to compare

@comet/[email protected]

Minor Changes

  • 865cc5c: Remove the indenting options on an RTE if listLevelMax = 0

Patch Changes

  • 3dc5f55: Remove unsupported list levels from RTE when using listLevelMax

@comet/[email protected]

Minor Changes

  • afc7a6b: Add human readable label for publisher (cron jobs and jobs)
  • c302bc4: Admin: AboutModal: make logo configurable

@comet/[email protected]

Minor Changes

  • afc7a6b: Add human readable label for publisher (cron jobs and jobs)
  • b4264f1: Make changes checker scope-aware

Patch Changes

  • 44fbe3f: add stream end when create files from buffer in filestorage

  • 92f23a4: Change propagationPolicy for deleting jobs from default to Background

    Currently we use the default propagationPolicy for deleting jobs. This results in pods from jobs being deleted in k8s but not on OpenShift. With the value fixed to "Background", the jobs should get deleted on every system.
    Foreground would be blocking, so we use Background to be non blocking.

4.2.0

22 May 11:21
e1db1f1
Compare
Choose a tag to compare

@comet/[email protected]

Minor Changes

  • 3567533: Add componentsProps to EditDialog
  • d25a7cb: Allow disabling RowActionsItem using a disabled prop.

Patch Changes

  • 67e54a8: Add styling variants to Tooltip
  • 7b614c1: Add styleOverrides to ToolbarAutomaticTitleItem
  • aaf1586: Fix multiple prop in FinalFormAutocomplete

@comet/[email protected]

Patch Changes

  • 67e54a8: Add styling variants to Tooltip

@comet/[email protected]

Patch Changes

  • b4d564b: Add spacing by default between the tabs and the tab content when using AdminTabs or BlockPreviewWithTabs. This may add unwanted additional spacing in cases where the spacing was added manually.
  • 0f4ed6c: Prevent unintentional movement of sticky header when scrolling in Tabs.

@comet/[email protected]

Minor Changes

  • 7b7b786: Add support to search values in content scope controls. Add searchable: true to a control's config to make it searchable. See ContentScopeProvider for an example

Patch Changes

  • b4d564b: Add spacing by default between the tabs and the tab content when using AdminTabs or BlockPreviewWithTabs. This may add unwanted additional spacing in cases where the spacing was added manually.

@comet/[email protected]

Minor Changes

  • 0fdb1b3: Add new extractGraphqlFields helper function that extracts requested fields from GraphQLResolveInfo

    Usage example:

    async products(@Info() info: GraphQLResolveInfo): Promise<PaginatedProducts> {
      const fields = extractGraphqlFields(info, { root: "nodes" });
      const options: FindOptions<Product, any> = {};
    
      if (fields.includes("category")) options.populate = ["category"];
      //alternative if graphql structure completely matches entities: options.populate = fields;
      const [entities, totalCount] = await this.repository.findAndCount({}, options);
    
      ...
    }

@comet/[email protected]

Minor Changes

  • 7a7d6e6: Remove explicit-function-return-type rule for default nestjs eslint config
  • bc82bc3: Enable json-files/sort-package-json rule to sort package.json files automatically

4.1.0

25 Apr 08:55
b07f60a
Compare
Choose a tag to compare

Highlights

  • Add support for enum types to API CRUD Generator

@comet/[email protected]

Minor Changes

  • 51466b1: Add initial sort to useDataGridRemote hook
  • 51466b1: Add optional prop disableCloseAfterSubmit to EditDialog. It prevents the default closing behavior of EditDialog.
  • 51466b1: Add optional prop onAfterSave() to EditDialog. It is called after successfully saving a FinalForm within the EditDialog
  • 51466b1: Added RowActionsMenu and RowActionsItem components for creating IconButtons with nested Menus and Items for actions in table rows and other listed items.
  • c5f2f91: Add Tooltip Component that adds to MUI Tooltip a trigger prop that allows showing the Tooltip on focus/click without the need for ClickAwayListener.

Patch Changes

  • 51466b1: Add compatible x-data-grid-* versions as optional peerDependency

@comet/[email protected]

Minor Changes

  • 51466b1: Add QuestionMark and Block icon

@comet/[email protected]

Patch Changes

@comet/[email protected]

Minor Changes

  • 51466b1: Add support for enum types to API CRUD Generator

Patch Changes

  • 51466b1: Fix page tree node visibility update

@comet/[email protected]

Patch Changes

  • 51466b1: Fix router.push() and router.replace() in site preview

4.0.0

08 Mar 16:05
Compare
Choose a tag to compare

Highlights

  • New strategy for authorization: Comet is now less opinionated on how a user should be authorized. Opinionated parts regarding authorization are removed from the packages. Various helpers to configure authorization in the application are provided.
  • New strategy for project configuration: Configurations that do not change between environments should be stored in a new comet-config.json file that is used in all microservices.
  • New strategy for module configuration: Configuration is only injected into the AppModule instead of injecting it into the separate modules. Doing so removes a significant overhead caused by asynchronous module initialization.
  • Performance improvements for requests accessing the page tree and documents: Page tree nodes may now be preloaded on a request basis. Page tree node documents are only loaded if requested by the query.
  • Add AnchorBlock to support linking to anchors.

@comet/blocks-admin

Changes

  • Add anchors method to BlockInterface for a block to specify its anchors

@comet/cms-admin

Breaking changes

  • Changes related to the new authorization strategy

    • Remove dependency on @comet/react-app-auth package
    • Remove AuthorizationErrorPage component
    • Remove access-token-service-worker.js file. You should remove it from your build setup
    • Remove AccessToken message from IFrameBridge
    • Remove authorizationManager option from createHttpClient
  • Change CmsBlockContext.damConfig.maxFileSize from string to number

  • Change CmsBlockContext.damConfig.maxSrcResolution from string to number

  • Rename Publisher component to PublisherPage

  • Remove the wrapping Chip from infoTag method in DocumentInterface. Applications should add the Chip themselves:

    export const Page: DocumentInterface<Pick<GQLPage, "content" | "seo">, GQLPageInput> = {
        ...
        InfoTag: ({ page }: { page: PageTreePage & GQLPageTreeNodeAdditionalFieldsFragment }) => {
            return <Chip size="small" label={page.userGroup} />;
        },
    };
  • Add anchors method to DocumentInterface for a document to specify its anchors

Changes

  • Add AnchorBlock
  • Add support for anchors to InternalLinkBlock
  • Add support for a custom block name to createTextLinkBlock

@comet/blocks-api

Changes

  • Add support for a custom block name and migrations to createTextLinkBlock

@comet/cms-api

  • Changes related to the new authorization strategy

    • Remove AuthModule. The auth module should be created in the application using the factories provided by the package. See AuthModule for an example
    • Remove BasicAuthStrategy. Use createStaticCredentialsBasicStrategy instead
    • Remove BearerTokenStrategy. Use createAuthProxyJwtStrategy instead
    • Remove GlobalAuthGuard. Use createCometAuthGuard instead
  • Changes related to the new module configuration strategy

    • BlocksModule, BlobStorageModule, DamModule and PublicUploadModule are not initialized asynchronously anymore. See AppModule for an example
  • BlocksTransformerMiddlewareFactory now requires BLOCKS_MODULE_TRANSFORMER_DEPENDENCIES to be injected. See AppModule for an example

  • Restrict access to builds based on ContentScopeModule. Cron jobs and jobs need to be annotated with comet-dxp.com/content-scope

  • Move Kubernetes-specific parts of BuildsModule into a new KubernetesModule

  • Remove the option to configure BuildsModule. Configuration of the Helm release is now done in KubernetesModule

  • Make @kubernetes/client-node a peer dependency

  • Remove BuildObject

  • Change DamModule.damConfig.allowedImageSizes from string[] to number[]

  • Change DamModule.damConfig.allowedAspectRatios from string[] to number[]

  • Remove damPath from PixelImageBlock, SvgImageBlock and DamVideoBlock

Changes

  • Changes related to the new authorization strategy
    • Add createCometAuthGuard to create the global application guard
    • Add createAuthResolver for currentUser query and currentUserSignOut mutation
    • Add createAuthProxyJwtStrategy for a JWT-based auth strategy
    • Add createStaticCredentialsBasicStrategy for a basic auth strategy
    • Add createStaticAuthedUserStrategy for a static user-based strategy. It should be primarily used for local development
  • Add request-scoped PageTreeReadApiService with preloadNodes method to preload pages when reading large parts of the page tree
  • Add request-scoped BlocksTransformerService that can be used in block field resolvers for improved performance (instead of relying on BlocksTransformerMiddlewareFactory). If all block transforms are done using field resolvers, BlocksTransformerMiddlewareFactory and fieldResolverEnhancers can be removed for additional performance improvements
  • Add AnchorBlock
  • Add support for anchors to InternalLinkBlock

@comet/cms-site

Breaking changes

  • Changes related to the new authorization strategy

    • Remove dependency on next-auth package
    • Remove access-token-service-worker.js file. You should remove it from your build setup
    • Remove AccessToken message from IFrameBridge
  • Remove the ceiling of width and height props in Image component

Changes

  • Add AnchorBlock
  • Add support for anchors to InternalLinkBlock
  • Add getAuthedUser and hasAuthedUser to parse the current user from the request

@comet/eslint-config

Breaking changes

3.2.3

07 Feb 13:54
Compare
Choose a tag to compare

@comet/cms-api

Changes

  • Fix createRedirect mutation when no scoping is used

@comet/blocks-admin

Changes

  • Fix createCompositeSetting not working when using an array value

3.2.2

25 Jan 12:40
Compare
Choose a tag to compare

@comet/admin

Changes

  • Fix readClipboardText() not working in Firefox by using local storage as a fallback

3.2.1

06 Dec 14:43
Compare
Choose a tag to compare

@comet/admin

Changes

  • Fix a bug where the slider thumbs are not visible when using FinalFormRangeInput
  • Fix a bug where SaveButton would not clear error and success display states after timeout

3.2.0

29 Nov 09:58
Compare
Choose a tag to compare

Highlights

  • Add support to type root blocks in the GraphQL schema using RootBlockDataScalar and RootBlockInputScalar. See page.entity.ts, schema.gql, and codegen.ts for an example on how to use

@comet/admin-rte

Changes

  • Fix a bug where control buttons in the toolbar would trigger submission when used in a form

@comet/cms-admin

Changes

  • Fix a bug where the pages query would query for a field undefined when no additionalPageTreeNodeFragment is set

@comet/cms-api

Changes

  • Add default value {} for RedirectScopeInput when no explicit scope is set to make redirects scope support backwards compatible
  • Add RootBlockDataScalar and RootBlockInputScalar scalars to type root blocks in the GraphQL schema

3.1.0

15 Nov 08:16
Compare
Choose a tag to compare

Highlights

  • Add scope support for redirects (@comet/cms-api and @comet/cms-admin)

@comet/admin

Changes

  • Add useFocusAwarePolling hook that can be used in combination with useQuery to only fetch when the current browser tab is focused

@comet/cms-admin

Changes

  • useSaveConflict now only checks for conflicts when the current browser tab is focused
  • Add additionalPageTreeNodeFragment prop to CmsBlockContextProvider that can be used to load additional page tree node fields in the page tree

3.0.0

17 Oct 12:46
Compare
Choose a tag to compare

This release marks the first public release of the CMS packages used for Comet DXP applications. See the documentation for more information.

Highlights

  • Add new CMS packages @comet/blocks-api, @comet/cms-api, @comet/blocks-admin, @comet/cms-admin, and @comet/cms-site. Review package overview for usage
  • Add new @comet/cli package to provide commonly used scripts (e.g., generate-block-types) to all applications
  • Add new @comet/eslint-config package to provide ESLint configs used by all packages
  • Add new MUI X DataGrid helper functions
  • Migrate all @comet/admin packages to MUI 5

Migration Guide

  1. Migrate to MUI 5, following the official MUI Migration Guide

  2. Install jscodeshift in your project

    npm install --save-dev jscodeshift
  3. Clone this repository into your project repository. If you have a monorepo, clone it into the correct subfolder

  4. Migrate from styled-components to MUI's style engine

    npx jscodeshift --extensions=ts,tsx --parser=tsx -t comet/codemods/3.0.0/mui-style-engine.ts src/

@comet/cli

This release is the first stable version.

@comet/eslint-config

This release is the first stable version.

@comet/blocks-api

This release is the first stable version.

@comet/cms-api

This release is the first stable version.

@comet/blocks-admin

This release is the first stable version.

@comet/cms-admin

This release is the first stable version.

@comet/admin

Breaking changes

  • Change the minimum supported React version to 17

  • Remove Select component in favor of MUI's Select component

  • StackBreadcrumbs do not support MUI's Breadcrumbs props anymore

  • Remove ErrorDialog dependency from createErrorDialogApolloLink(). Doing so eliminates the need to create the Apollo client in the React component tree, which is preferable:

    Before

    const Providers: React.FunctionComponent = ({ children }) => {
        const errorDialog = useErrorDialog();
    
        const apolloClient = new ApolloClient({
            link: ApolloLink.from([
                createErrorDialogApolloLink({ errorDialog }),
                createHttpLink({
                    uri: `https://anyapi.com/graphql`,
                }),
            ]),
            cache: new InMemoryCache(),
        });
    
        return (
            <OtherProviders>
                <ApolloProvider client={apolloClient}>{children}</ApolloProvider>
            </OtherProviders>
        );
    };

    After

    const apolloClient = new ApolloClient({
        link: ApolloLink.from([
            createErrorDialogApolloLink(),
            createHttpLink({
                uri: `https://anyapi.com/graphql`,
            }),
        ]),
        cache: new InMemoryCache(),
    });
    
    const Providers: React.FunctionComponent = ({ children }) => {
        return (
            <OtherProviders>
                <ApolloProvider client={apolloClient}>{children}</ApolloProvider>
            </OtherProviders>
        );
    };
  • Rename ErrorDialogProvider to ErrorDialogHandler. ErrorDialogHandler does not need to wrap the application anymore

  • The default color of MUI's Button and IconButton has been changed from "default" to "primary". Restore the previous "default" appearance by setting the color prop to "info"

  • Rename StackBreadcrumbProps to StackBreadcrumbsProps

  • Rename FormSectionKey to FormSectionClassKey

  • Remove the default clear button from FinalFormSearchTextField. Re-enable by using the clearable prop

Changes

  • Expose comet.generic.* messages as public API through messages.ts. Doing so prevents the need to translate them for every application:

    Before

    <FormattedMessage id="comet.generic.globalContentScope" defaultMessage="Global Content" />;
    
    intl.formatMessage({
        id: "comet.generic.doYouWantToSaveYourChanges",
        defaultMessage: "Do you want to save your changes?",
    });

    After

    import { value messages } from "@comet/admin";
    
    <FormattedMessage {...messages.globalContentScope} />;
    
    intl.formatMessage(messages.saveUnsavedChanges);
  • StackBreadcrumbs now shows an overflow menu when its items do not fit into a single row

@comet/admin-color-picker

Breaking changes

  • Change the majority of classes used for style overrides. This may break custom styles
  • Remove showPicker prop from ColorPicker and show the picker by default. Hide by using the hidePicker prop
  • Rename the showClearButton prop to clearable in ColorPicker

Changes

  • Add a slider for the alpha channel, which is used when the colorFormat prop is set to "rgba"
  • Add a standalone ColorPicker component for usage outside Final Form
  • Disable the input when the setting the disabled prop
  • Add missing focus styling to the input
  • Open/close the picker when focusing/blurring the input using tab navigation

@comet/admin-date-time (previously @comet/admin-date-picker)

Breaking changes

  • Rename @comet/admin-date-picker to @comet/admin-date-time

  • Change the internally used data picker library from react-dates to react-date-range. Props specific to react-dates will no longer have any effect

  • The date-picker & date-range-picker components require a date-fns locale that can be provided by wrapping the application with the DateFnsLocaleProvider and passing in the desired locale as the value.

    import { value DateFnsLocaleProvider } from "@comet/admin-date-time";
    import { value enUS } from "date-fns/locale";
    
    <DateFnsLocaleProvider value={enUS}>
        <App />
    </DateFnsLocaleProvider>;

Changes

  • Add standalone DatePicker and DateRangePicker components for usage outside Final Form
  • Add new TimePicker, DateTimePicker, and TimeRangePicker components. Each component comes as a standalone version with a separate Final Form wrapper (FinalFormTimePicker etc.)

@comet/admin-theme

Breaking changes

  • Update the theme to reflect the latest adaptations made in our applications
  • Add new default styling for MUI's Chip component

@comet/cms-site

This release is the first stable version.