Releases: vivid-planet/comet
5.1.0
@comet/admin@5.1.0
Minor Changes
-
93b3d97: Extend error details in
ErrorDialog
Previously, uncaught errors in production environments would result in an "An error occurred"
ErrorDialog
, making the error difficult to debug.
To improve the reproducibility of an error, we enrich theErrorDialog
with the followingadditionalInformation
:errorType
: The type of the error, network or server errorhttpStatus
: The HTTP status of the request that failedurl
: The URL where the error occurredtimestamp
: The timestamp when the error occurred
This information will be displayed in the
ErrorDialog
if no customuserMessage
has been provided.
In addition, a button has been added to allow this information to be copied to the clipboard.
Patch Changes
-
21c3093: Fix
saveAction
inRouterPrompt
ofFinalForm
The submit mutation wasn't correctly awaited if a
FinalForm
using an asynchronous validation was saved via thesaveAction
provided in theRouterPrompt
.In practice, this affected
FinalForm
s within anEditDialog
. TheEditDialog
closed before the submission was completed. All changes were omitted. The result of the submission (fail or success) was never shown. -
e33cd65: Fix
EditDialog#onAfterSave
not called on form submissionThe
onAfterSave
callback was only called when submitting a form inside anEditDialog
by clicking the save button, but not when submitting the form by hitting the enter key.
We fix this by adding the callback to theEditDialogFormApi
and calling it after the form has been successfully submitted.
@comet/cms-admin@5.1.0
Patch Changes
-
e1d3f00: Prevent false positive save conflicts while editing documents (e.g.
Page
):- Stop checking for conflicts while saving is in progress
- Ensure that all "CheckForChanges" polls are cleared
-
6d69dfa: Fix issue in
PixelImageBlock
that caused the preview URLs for files without a file extension in their filename to be invalid -
21c3093: Improved the
EditPageNode
dialog ("Page Properties" dialog):- Execute the asynchronous slug validation less often (increased the debounce wait time from 200ms to 500ms)
- Cache the slug validation results. Evict the cache on the initial render of the dialog
@comet/eslint-plugin@5.1.0
Minor Changes
-
ec0582e: Add new ESLint rule to enforce absolute imports when importing from other modules
For instance, an import
import { AThingInModuleA } from "../moduleA/AThingInModuleA"
in moduleB
needs to be imported asimport { AThingInModuleA } from "@src/moduleA/AThingInModuleA"
.
The default source root"./src"
and alias"@src"
can be changed via the rule'ssourceRoot
andsourceRootAlias
options.
This rule will be enforced by@comet/eslint-config
in the next major release.
5.0.0
Highlights
Admin CRUD Generator
The Admin CRUD Generator was added.
It automatically generates an admin page, grid and form based on the GraphQL schema definition of an object type. It's meant to be used together with the existing API Generator.
More information in section @comet/cms-admin.
Support for Relations in the API CRUD Generator
The API CRUD Generator now supports relations.
More information in section @comet/cms-api.
DAM Scoping
The DAM now supports scoping.
Scoping can be enabled optionally. You can still use the DAM without scoping.
More information in sections @comet/cms-api and @comet/cms-admin.
Cross-Scope & Cross-Environment Copying
When copying documents from one scope to another, the used DAM files are automatically imported into the target scope.
When copying documents from one environment to another (e.g. from production to your local dev environment), the used DAM files are imported to your environment via download.
More information in section @comet/cms-admin.
Dependencies
The new DependenciesService
provides methods to create and access an index containing all dependencies from blocks to entities.
Note: Currently, the library doesn't offer a way to display the dependencies in the admin. This will be added in a later minor release of v5.
More information in section @comet/cms-api.
No "Discard unsaved Changes" Dialog in RouterTabs in Forms
Switching tabs in RouterTabs
inside a FinalForm
no longer triggers a "Discard unsaved changes" dialog.
More information in section @comet/admin.
Multi-Select Form Field
FinalFormSelect
now supports multi-select.
More information in section @comet/admin.
DocumentInterface Implementation Helper
The new createDocumentRootBlocksMethods()
helper function can be used to create some of the methods required by the DocumentInterface
(useful for Page
and other document types).
More information in section @comet/cms-admin.
@comet/admin@5.0.0
Major Changes
-
692c855: Replaced the
DirtyHandler
withPrompt
(no change needed ifDirtyHandler
was only used indirectly, e.g. in Form)Using routes (e.g.
Tabs
) in a component with dirty handling (e.g. aFinalForm
) is now supported -
0f2794e: Change the icon used in the
Loading
component from MUI'sCircularProgress
to ourBallTriangle
-
fe5e073: Add support for multi-select to
FinalFormSelect
(via themultiple
prop)Add a new
getOptionValue()
prop that can be used to extract a unique string representation for a given option. The default implementation should work in most cases.
Remove thegetOptionSelected()
prop that is not needed anymore.You can find an example in our storybook
-
d0773a1: Change styling of
FilterBar
components to be more consistent with other form components. The classes ofFilterBarMoreFilters
have changed, which may cause custom styling of this component to break.
Minor Changes
-
2559ff7: Add CrudVisibility component for implementing visibility column in a Crud Grid
-
ed692f5: Add new open and close hamburger icons and use them in the
AppHeaderMenuButton
-
7c6eb68: Add new
event
parameter toFinalForm
'sonSubmit()
method. ThenavigatingBack
field ofevent
simplifies implementing different navigation patterns after saving -
4cd3544: Add a
FinalFormSaveButton
component -
a711678: Add support for multiple
StackSwitch
on oneStackPage
Add a
SubRoute
wrapper for this case that needs to be added in front of the testedStackSwitch
and do that for all composite blocksYou can find an example in our storybook
-
e57c6c6: Move dashboard components from the COMET Starter to the library (
DashboardHeader
,LatestBuildsDashboardWidget
,LatestContentUpdatesDashboardWidget
)
Patch Changes
- 0453c36: Router: Fix
Switch
inside aSubRouteIndexRoute
to allow aStack
inside aStack
's initial page - 987f08b: Select: Fix default
getOptionValue()
implementation for values not being an object - 5f0f8e6: Correctly support
RouterTabs
inSubRoute
by including thesubRoutePrefix
in tab paths - d4bcab0: Fix
useSubRoutePrefix()
if used inside aRoute
@comet/admin-icons@5.0.0
Minor Changes
- ed692f5: Add new open and close hamburger icons and use them in the
AppHeaderMenuButton
@comet/blocks-admin@5.0.0
Major Changes
-
9875e7d: Support automatically importing DAM files into another scope when copying documents from one scope to another
The copy process was reworked:
- The
DocumentInterface
now requires adependencies()
and areplaceDependenciesInOutput()
method - The
BlockInterface
now has an optionaldependencies()
and a requiredreplaceDependenciesInOutput()
method rewriteInternalLinks()
was removed from@comet/cms-admin
. Its functionality is replaced byreplaceDependenciesInOutput()
.
dependencies()
returns information about dependencies of a document or block (e.g. a usedDamFile
or linkedPageTreeNode
).replaceDependenciesInOutput()
replaces the IDs of all dependencies of a document or block with new IDs (necessary for copying documents or blocks to another scope).You can use the new
createDocumentRootBlocksMethods()
to generate the methods for documents (see section @comet/cms-admin). - The
-
4fe0831: Remove
BlockPreview
component, use higher levelBlockPreviewContent
insteadBefore:
const state = linkBlock.input2State(params.value); return ( <BlockPreview title={linkBlock.dynamicDisplayName?.(state) ?? linkBlock.displayName} content={linkBlock.previewContent(state)} /> );
After:
return ( <BlockPreviewContent block={linkBlock} input={params.value} /> );
Minor Changes
- a711678: Allow composite blocks with multiple sub blocks that have their own subroutes (e.g. a list)
@comet/cms-admin@5.0.0
Major Changes
-
9d3e855: Add scoping to the DAM
The DAM scoping can be enabled optionally. You can still use the DAM without scoping.
To enable DAM scoping, you must
In the API:
- Create a DAM folder entity using
createFolderEntity({ Scope: DamScope });
- Create a DAM file entity using
createFileEntity({ Scope: DamScope, Folder: DamFolder });
- Pass the
Scope
DTO and theFile
andFolder
entities when intializing theDamModule
In the Admin:
- Set
scopeParts
in theDamConfigProvider
(e.g.<DamConfigProvider value={{ scopeParts: ["domain"] }}>
) - Render the content scope indicator in the
DamPage
<DamPage renderContentScopeIndicator={(scope) => <ContentScopeIndicator scope={scope} />} />
You can access the current DAM scope in the Admin using the
useDamScope()
hook.See the Demo project for an example on how to enable DAM scoping.
- Create a DAM folder entity using
-
9875e7d: Support automatically importing DAM files into another scope when copying documents from one scope to another
The copy process was reworked:
- The
DocumentInterface
now requires adependencies()
and areplaceDependenciesInOutput()
method - The
BlockInterface
now has an optionaldependencies()
and a requiredreplaceDependenciesInOutput()
method rewriteInternalLinks()
was removed from@comet/cms-admin
. Its functionality is replaced byreplaceDependenciesInOutput()
.
dependencies()
returns information about dependencies of a document or block (e.g. a usedDamFile
or linkedPageTreeNode
).replaceDependenciesInOutput()
replaces the IDs of all dependencies of a document or block with new IDs (necessary for copying documents or blocks to another scope).You can use the new
createDocumentRootBlocksMethods()
to generate the methods for documents. - The
-
c3f96d7: Don't remember the last folder or file the user opened in the DAM. The
ChooseFileDialog
still remembers the last folder opened.
Minor Changes
-
168380d: Add Admin CRUD Generator that creates a simple CRUD admin view for an entity
It automatically generates an admin page, grid and form based on the GraphQL schema definition of an object type.
It's meant to be used together with the existing API CRUD Generator.
Go through the commits of this PR for a step-by-step example of how to use the API and Admin Generators. -
8ed9698: Support copy/pasting DAM files across server instances by downloading the copied file
-
adb5bc3: Add
queryUpdatedAt()
helper that can be used to check conflicts without having to write an additional query -
6b9787e: It's now possible to opt-out of creating a redirect when changing the slug of a page. Previously, a redirect was always created.
-
e6b8ec6: Show a bigger version of an image when hovering over an image thumbnail in the DAM and
ChooseFileDialog
-
5bae9ab: Show
LinearProgress
instead ofCircularProgress
when polling after initially loading the PageTree -
47a7272: Add
requireLicense
option toDamConfig
to allow making DAM license fields required (when updating a file) -
e26bd90: Add various UI/UX improvements to the DAM
- Replace underlying
Table
withDataGrid
- Add paging to improve performance
- Add a dialog to move files to another folder (instead of drag and drop)
- Highlig...
- Replace underlying
4.7.0
Highlights
-
Non-breaking spaces
The RTE now supports non-breaking spaces.
Note: This feature may need to be enabled for individual blocks after the update (see section @comet/admin-rte) -
Mobile compatible tabs
The tabs and RouterTabs in COMET now support smaller screens out of the box. You can scroll with arrows on the desktop and with swiping on the smartphone. -
Path search in the PageTree
Previously, you could only search for page names in the PageTree. Now you can also search by path.
@comet/admin@4.7.0
Minor Changes
- fde8e42: Add tab scrolling to make tabs responsive
Patch Changes
-
eac9990: Fix the clear-button in
FinalFormSelect
when using it with themultiple
prop.- The clear button is now only shown when at least one value is selected.
- Clearing the value now sets it to an empty array instead of
undefined
, which would cause an error when trying to render the select.
-
fe310df: Prevent the clear-button and the select-arrow from overlapping when using
FinalFormSelect
with theclearable
prop.
@comet/admin-rte@4.7.0
Minor Changes
-
dbdc0f5: Add support for non-breaking spaces to RTE
Add
"non-breaking-space"
tosupports
when creating an RTE:const [useRteApi] = makeRteApi(); export default function MyRte() { const { editorState, setEditorState } = useRteApi(); return ( <Rte value={editorState} onChange={setEditorState} options={{ supports: [ // Non-breaking space "non-breaking-space", // Other options you may wish to support "bold", "italic", ], }} /> ); }
@comet/admin-theme@4.7.0
Minor Changes
-
d1c7a1c: Add custom default styling for LinearProgress
The LinearProgress is intended to be used as a LoadingOverlay in the DataGrid. This styling change adjusts it for this purpose.
Patch Changes
- fe310df: Prevent the clear-button and the select-arrow from overlapping when using
FinalFormSelect
with theclearable
prop.
@comet/blocks-admin@4.7.0
Patch Changes
- f48a768: Fix padding behavior of
YoutubeVideoBlock
andDamVideoBlock
when used insideAdminComponentPaper
@comet/cms-admin@4.7.0
Minor Changes
4.6.0
@comet/admin-icons@4.6.0
Minor Changes
- c3b7f99: Add new icons intended to be used in the RTE
@comet/admin-rte@4.6.0
Patch Changes
-
c3b7f99: Replace current icons in the RTE toolbar with new icons from
@comet/admin-icons
-
c3b7f99: Change how
maxVisible
inFeaturesButtonGroup
works:- If maxVisible = 4 and there are four features -> all four features
(and no dropdown) are shown - If maxVisible = 4 and there are five features -> three features and
the dropdown (containing two features) are shown
- If maxVisible = 4 and there are four features -> all four features
@comet/blocks-admin@4.6.0
Patch Changes
- 031d86e: Fix drag and drop reordering in collection blocks
@comet/cms-admin@4.6.0
Patch Changes
- c3b7f99: Replace current icons in the RTE toolbar with new icons from
@comet/admin-icons
@comet/cms-api@4.6.0
Patch Changes
- f6f7d4a: Prevent slug change of home page in
updateNode()
and
updateNodeSlug()
ofPageTreeService
4.5.0
@comet/admin@4.5.0
Minor Changes
-
6d4ca5b: Deprecate
Table
componentThe
Table
component has been deprecated in favor of MUI X Data Grid in combination withuseDataGridRemote
. See docs for further information. -
07d921d: Add a generic
Loading
component for use in AdminLoading
handles the positioning of the loading indicator automatically, depending on the setbehavior
prop.
Patch Changes
- 46cf5a8: Fix an issue that caused
useDataGridRemote()
to ignore its URL params whenqueryParamsPrefix
was set - 8a2c330: Correctly position loading indicators by centring them using the new
Loading
component
@comet/admin-theme@4.5.0
Minor Changes
- 0167707: Fix some
DataGrid
styling issues and style theDataGrid
components to match the Comet CI more closely.
@comet/cms-admin@4.5.0
Patch Changes
- 8a2c330: Correctly position loading indicators by centring them using the new
Loading
component
4.4.3
4.4.2
@comet/cms-admin@4.4.2
Patch Changes
- b299375: Fix the typing of
lastUpdatedAt
in thecreateUsePage()
factory
@comet/cms-api@4.4.2
Patch Changes
3.2.7
@comet/cms-api
Changes
- Fix improper validation of input when creating/updating page tree nodes or redirects
- Prevent the fileUrl from being exposed in the Site via the PixelImageBlock
4.4.1
4.4.0
@comet/admin@4.4.0
Minor Changes
-
e824ffa: Add
fullHeight
&disablePadding
props to MainContentfullHeight
makesMainContent
take up the remaining space below to fill the entire page.
This is helpful for virtualized components that need a fixed height, such asDataGrid
or thePageTree
.disablePadding
is helpful if a component requires thefullHeight
behaviour but should fill the entire page without the surrounding space. -
3e15b81: Add field components to simplify the creation of forms with Final Form.
TextField
TextAreaField
SearchField
SelectField
CheckboxField
SwitchField
ColorField
DateField
DateRangeField
TimeField
TimeRangeField
DateTimeField
Example with TextField
// You can now do: <TextField name="text" label="Text" />
// Instead of: <Field name="text" label="Text" component={FinalFormInput} />
Example with SelectField
// You can now do: <SelectField name="select" label="Select"> {options.map((option) => ( <MenuItem key={option.value} value={option.value}> {option.label} </MenuItem> ))} </SelectField>
// Instead of: <Field name="select" label="Select"> {(props) => ( <FinalFormSelect {...props}> {options.map((option) => ( <MenuItem key={option.value} value={option.value}> {option.label} </MenuItem> ))} </FinalFormSelect> )} </Field>
-
a77da84: Add helper for mui grid pagination (
muiGridPagingToGql()
)Sample usage:
const { data, loading, error } = useQuery<GQLProductsListQuery, GQLProductsListQueryVariables>(productsQuery, { variables: { ...muiGridFilterToGql(columns, dataGridProps.filterModel), ...muiGridPagingToGql({ page: dataGridProps.page, pageSize: dataGridProps.pageSize }), sort: muiGridSortToGql(sortModel), }, });
@comet/admin-color-picker@4.4.0
Minor Changes
- 3e15b81: Add field components to simplify the creation of forms with Final Form.
@comet/admin-date-time@4.4.0
Minor Changes
- 3e15b81: Add field components to simplify the creation of forms with Final Form.
@comet/blocks-admin@4.4.0
Minor Changes
- d4960b0: Add loop toggle to
YouTubeVideoBlock
@comet/cms-admin@4.4.0
Minor Changes
-
9b1a650: Silence polling errors in
PageTree
Errors during polling (pages query, check for changes query) led to multiple consecutive error dialogs, which were irritating for our users. As these errors occurred randomly and would typically be resolved by the next poll, we decided to silence them altogether.
-
a77da84: Add helper for mui grid pagination (
muiGridPagingToGql()
)
Patch Changes
- 1158362: Add content validation for SVG files to prevent the upload of SVGs containing JavaScript
@comet/blocks-api@4.4.0
Minor Changes
- d4960b0: Add loop toggle to
YouTubeVideoBlock
@comet/cms-api@4.4.0
Minor Changes
- d4960b0: Add loop toggle to
YouTubeVideoBlock