Releases: vivid-planet/comet
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/[email protected]
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/[email protected]
Minor Changes
- ed692f5: Add new open and close hamburger icons and use them in the
AppHeaderMenuButton
@comet/[email protected]
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/[email protected]
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/[email protected]
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/[email protected]
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/[email protected]
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/[email protected]
Patch Changes
- f48a768: Fix padding behavior of
YoutubeVideoBlock
andDamVideoBlock
when used insideAdminComponentPaper
@comet/[email protected]
Minor Changes
4.6.0
@comet/[email protected]
Minor Changes
- c3b7f99: Add new icons intended to be used in the RTE
@comet/[email protected]
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/[email protected]
Patch Changes
- 031d86e: Fix drag and drop reordering in collection blocks
@comet/[email protected]
Patch Changes
- c3b7f99: Replace current icons in the RTE toolbar with new icons from
@comet/admin-icons
@comet/[email protected]
Patch Changes
- f6f7d4a: Prevent slug change of home page in
updateNode()
and
updateNodeSlug()
ofPageTreeService
4.5.0
@comet/[email protected]
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/[email protected]
Minor Changes
- 0167707: Fix some
DataGrid
styling issues and style theDataGrid
components to match the Comet CI more closely.
@comet/[email protected]
Patch Changes
- 8a2c330: Correctly position loading indicators by centring them using the new
Loading
component
4.4.3
4.4.2
@comet/[email protected]
Patch Changes
- b299375: Fix the typing of
lastUpdatedAt
in thecreateUsePage()
factory
@comet/[email protected]
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
@comet/[email protected]
Patch Changes
-
662abcc: Prevent the
MainContent
component from having an invalid height.This bug would cause the
PageTree
to have no height when navigating into a page and then navigating back again.
4.4.0
@comet/[email protected]
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/[email protected]
Minor Changes
- 3e15b81: Add field components to simplify the creation of forms with Final Form.
@comet/[email protected]
Minor Changes
- 3e15b81: Add field components to simplify the creation of forms with Final Form.
@comet/[email protected]
Minor Changes
- d4960b0: Add loop toggle to
YouTubeVideoBlock
@comet/[email protected]
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/[email protected]
Minor Changes
- d4960b0: Add loop toggle to
YouTubeVideoBlock
@comet/[email protected]
Minor Changes
- d4960b0: Add loop toggle to
YouTubeVideoBlock
Patch Changes
3.2.6
@comet/[email protected]
Patch Changes
- 23ef932 Add content validation for SVG files to prevent the upload of SVGs containing JavaScript
@comet/[email protected]
Patch Changes
- 23ef932 Add error message for SVG content validation