-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merge main into next #2098
Merged
Merged
Merge main into next #2098
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Extends the docs about dependencies: - add more background info on what the block index is for - Restructure parts of the docs - Add info on how to - add field resolvers - use the `DependencyList` --- https://deploy-preview-1957--comet-dxp-docs.netlify.app/docs/dependencies/
## Problem: The validation in the ExternalLinkBlock was broken. The `isValid` check uses `isLinkTarget` for validation: https://github.com/vivid-planet/comet/blob/9867242fa6bad4849de58ccce1c28b816cc109a3/packages/admin/cms-admin/src/blocks/ExternalLinkBlock.tsx#L42-L44 The `targetUrl` field uses `validateUrl`: https://github.com/vivid-planet/comet/blob/9867242fa6bad4849de58ccce1c28b816cc109a3/packages/admin/cms-admin/src/blocks/ExternalLinkBlock.tsx#L66-L73 The problem was that `validateUrl` internally used `isUrl` from class validator. `isUrl` is less strict than `isLinkTarget`. This resulted in no validation error in the UI but an error when trying to save the block: https://github.com/vivid-planet/comet/assets/13380047/a6c91ce1-94a5-4aac-a755-ef497a506504 ## Solution: I added `validateLinkTarget` using the stricter `isLinkTarget` check.
8587254
to
24f2f5f
Compare
In #2102 I missed that the url can be undefined because it has an any type and the typing of validateUrl was also incorrect. Now the `ExternalLinkBlock` breaks when the URL is emptied. This PR fixes that by checking if url is defined.
24f2f5f
to
ba3fe4d
Compare
- Use Guard to avoid code duplication - Use prevention everywhere for consistent behavior - Better error message --------- Co-authored-by: Johannes Obermair <48853629+johnnyomair@users.noreply.github.com>
ba3fe4d
to
89d57af
Compare
…sibility (#2108) Change the Behaviour of the Automatic Redirect to default to false if the corresponding Page is unpublished or archived. Co-authored-by: Markus Fichtner <markus.fichtner@vivid-planet.com>
89d57af
to
6f21eb4
Compare
- Fix type of youtubeIdentifier (was required, actually is optional) - Don't show validation error if youtubeIdentifier is empty - Allow emptying youtubeIdentifier --------- Co-authored-by: Johannes Obermair <48853629+johnnyomair@users.noreply.github.com>
6f21eb4
to
3330fb3
Compare
This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated. # Releases ## @comet/admin@6.11.0 ### Minor Changes - 8e3dec5: Change `writeClipboardText`/`readClipboardText` clipboard fallback to in-memory Using the local storage as a fallback caused issues when writing clipboard contents larger than 5MB. Changing the fallback to in-memory resolves the issue. ### Patch Changes - @comet/admin-icons@6.11.0 ## @comet/cms-admin@6.11.0 ### Minor Changes - e10753b: Allow disabling the "Open preview" button in the `PageTree` for certain document types The "Open preview" button is shown for all document types in the `PageTree`. But some document types (e.g., links) don't have a preview. Clicking on the preview button leads to an error page. Now, it's possible to disable the button by setting `hasNoSitePreview` for the document: ```diff export const Link: DocumentInterface<Pick<GQLLink, "content">, GQLLinkInput> = { // ... + hasNoSitePreview: true, }; ``` - fdf9fa7: Automatic Redirects are now set to false if the page is unpublished or archived ### Patch Changes - 815ba51: Fix link target validation in `ExternalLinkBlock` Previously, two different validation checks were used. This resulted in an error when saving an invalid link target but no error message was shown. - Updated dependencies [8e3dec5] - @comet/admin@6.11.0 - @comet/admin-date-time@6.11.0 - @comet/admin-icons@6.11.0 - @comet/admin-rte@6.11.0 - @comet/admin-theme@6.11.0 - @comet/blocks-admin@6.11.0 ## @comet/cms-api@6.11.0 ### Minor Changes - 0db10a5: Add a console script to import redirects from a csv file You can use the script like this: `npm run console import-redirects file-to-import.csv` The CSV file must look like this: ```csv source;target;target_type;comment;scope_domain /test-source;/test-target;internal;Internal Example;main /test-source-external;https://www.comet-dxp.com/;external;External Example;secondary ``` ### Patch Changes - Updated dependencies [93a84b6] - @comet/blocks-api@6.11.0 ## @comet/admin-color-picker@6.11.0 ### Patch Changes - Updated dependencies [8e3dec5] - @comet/admin@6.11.0 - @comet/admin-icons@6.11.0 ## @comet/admin-date-time@6.11.0 ### Patch Changes - Updated dependencies [8e3dec5] - @comet/admin@6.11.0 - @comet/admin-icons@6.11.0 ## @comet/admin-react-select@6.11.0 ### Patch Changes - Updated dependencies [8e3dec5] - @comet/admin@6.11.0 ## @comet/admin-rte@6.11.0 ### Patch Changes - Updated dependencies [8e3dec5] - @comet/admin@6.11.0 - @comet/admin-icons@6.11.0 ## @comet/admin-theme@6.11.0 ### Patch Changes - @comet/admin-icons@6.11.0 ## @comet/blocks-admin@6.11.0 ### Patch Changes - Updated dependencies [8e3dec5] - @comet/admin@6.11.0 - @comet/admin-icons@6.11.0 ## @comet/blocks-api@6.11.0 ### Patch Changes - 93a84b6: Fix type of `youtubeIdentifier` in `YouTubeVideoBlock` Previously, it was incorrectly typed as required. Now it's optional. ## @comet/eslint-config@6.11.0 ### Patch Changes - @comet/eslint-plugin@6.11.0 ## @comet/admin-babel-preset@6.11.0 ## @comet/admin-icons@6.11.0 ## @comet/cli@6.11.0 ## @comet/eslint-plugin@6.11.0 ## @comet/cms-site@6.11.0 Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
3330fb3
to
04377c4
Compare
Co-authored-by: Johannes Obermair <48853629+johnnyomair@users.noreply.github.com>
04377c4
to
64ecbeb
Compare
See #1877 --------- Co-authored-by: Johannes Obermair <48853629+johnnyomair@users.noreply.github.com> Co-authored-by: Thomas Dax <thomas.dax@vivid-planet.com>
64ecbeb
to
a5a12bf
Compare
a5a12bf
to
a2d8df7
Compare
…tocomplete` components (#2069) Thin wrappers to ease using `useAsyncOptionsProps()` with `FinalFormSelect` and `FinalFormAutocomplete`. **Example** Previously: ```tsx const asyncOptionsProps = useAsyncOptionsProps(async () => { // Load options here }); // ... <Field component={FinalFormAsyncAutocomplete} {...asyncOptionsProps} />; ``` Now: ```tsx <Field component={FinalFormAsyncAutocomplete} loadOptions={async () => { // Load options here }} /> ```
a2d8df7
to
f275b7f
Compare
f275b7f
to
d67e5ff
Compare
…tching jobs (#2144) Previously, the first job with a partially matching content scope was started. Doing so could lead to problems when multiple jobs with overlapping content scopes exist. For instance, jobs with the scopes `{ domain: "main", language: "de" }` and `{ domain: "main", language: "en" }` both partially match a change in `{ domain: "main", language: "de" }`. To fix this, we either start a single job if the content scope matches exactly or start all jobs with partially matching content scopes.
d67e5ff
to
d51bf93
Compare
Previously this had to be done manually for e.g. each Grid
d51bf93
to
ef5f593
Compare
This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated. # Releases ## @comet/admin@6.12.0 ### Minor Changes - 16ffa7b: Add `FinalFormAsyncSelect`, `AsyncSelectField`, and `FinalFormAsyncAutocomplete` components Thin wrappers to ease using `useAsyncOptionsProps()` with `FinalFormSelect` and `FinalFormAutocomplete`. **Example** Previously: ```tsx const asyncOptionsProps = useAsyncOptionsProps(async () => { // Load options here }); // ... <Field component={FinalFormAsyncAutocomplete} {...asyncOptionsProps} />; ``` Now: ```tsx <Field component={FinalFormAsyncAutocomplete} loadOptions={async () => { // Load options here }} /> ``` ### Patch Changes - @comet/admin-icons@6.12.0 ## @comet/admin-theme@6.12.0 ### Minor Changes - c06c6f1: Allow to pass args to createCometTheme to support localization via theme See <https://mui.com/material-ui/guides/localization/> ```tsx import { deDE } from "@mui/x-data-grid-pro"; const theme = createCometTheme({}, deDE); <MuiThemeProvider theme={theme} />; ``` ### Patch Changes - @comet/admin-icons@6.12.0 ## @comet/cms-admin@6.12.0 ### Minor Changes - 3ee8c7a: Add a `DamFileDownloadLinkBlock` that can be used to download a file or open it in a new tab Also, add new `/dam/files/download/:hash/:fileId/:filename` endpoint for downloading assets. ### Patch Changes - Updated dependencies [dc7eaec] - Updated dependencies [16ffa7b] - Updated dependencies [c06c6f1] - @comet/admin-rte@6.12.0 - @comet/admin@6.12.0 - @comet/admin-theme@6.12.0 - @comet/admin-date-time@6.12.0 - @comet/admin-icons@6.12.0 - @comet/blocks-admin@6.12.0 ## @comet/cms-api@6.12.0 ### Minor Changes - 3ee8c7a: Add a `DamFileDownloadLinkBlock` that can be used to download a file or open it in a new tab Also, add new `/dam/files/download/:hash/:fileId/:filename` endpoint for downloading assets. - 0597b1e: Add `DisablePermissionCheck` constant for use in `@RequiredPermission` decorator You can disable authorization for a resolver or operation by adding the decorator `@RequiredPermission(DisablePermissionCheck)` ### Patch Changes - 6717682: API CrudSingleGenerator: Run `transformToBlockData()` for block fields on create - b158e6a: ChangesCheckerConsole: Start exactly matching job or all partially matching jobs Previously, the first job with a partially matching content scope was started. Doing so could lead to problems when multiple jobs with overlapping content scopes exist. For instance, jobs with the scopes `{ domain: "main", language: "de" }` and `{ domain: "main", language: "en" }` both partially match a change in `{ domain: "main", language: "de" }`. To fix this, we either start a single job if the content scope matches exactly or start all jobs with partially matching content scopes. - @comet/blocks-api@6.12.0 ## @comet/cms-site@6.12.0 ### Minor Changes - 3ee8c7a: Add a `DamFileDownloadLinkBlock` that can be used to download a file or open it in a new tab Also, add new `/dam/files/download/:hash/:fileId/:filename` endpoint for downloading assets. ## @comet/admin-color-picker@6.12.0 ### Patch Changes - Updated dependencies [16ffa7b] - @comet/admin@6.12.0 - @comet/admin-icons@6.12.0 ## @comet/admin-date-time@6.12.0 ### Patch Changes - Updated dependencies [16ffa7b] - @comet/admin@6.12.0 - @comet/admin-icons@6.12.0 ## @comet/admin-react-select@6.12.0 ### Patch Changes - Updated dependencies [16ffa7b] - @comet/admin@6.12.0 ## @comet/admin-rte@6.12.0 ### Patch Changes - dc7eaec: Hide translation button for `FinalFormSearchTextField` - Updated dependencies [16ffa7b] - @comet/admin@6.12.0 - @comet/admin-icons@6.12.0 ## @comet/blocks-admin@6.12.0 ### Patch Changes - Updated dependencies [16ffa7b] - @comet/admin@6.12.0 - @comet/admin-icons@6.12.0 ## @comet/eslint-config@6.12.0 ### Patch Changes - @comet/eslint-plugin@6.12.0 ## @comet/admin-babel-preset@6.12.0 ## @comet/admin-icons@6.12.0 ## @comet/blocks-api@6.12.0 ## @comet/cli@6.12.0 ## @comet/eslint-plugin@6.12.0 Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
ef5f593
to
c2555c6
Compare
0f50d7b
to
29bf226
Compare
29bf226
to
1ba2c1c
Compare
1ba2c1c
to
46b86ba
Compare
nsams
approved these changes
Jun 6, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is an automated pull request to merge changes from
main
intonext
. It has merge conflicts. To resolve conflicts, check out the branchmerge-main-into-next
locally, make any necessary changes to conflicting files, and commit and publish your changes.