-
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 feature/fixtures #1535
Merged
raphaelblum
merged 52 commits into
feature/fixtures
from
merge-main-into-feature-fixtures
Jan 2, 2024
Merged
Merge main into feature/fixtures #1535
raphaelblum
merged 52 commits into
feature/fixtures
from
merge-main-into-feature-fixtures
Jan 2, 2024
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
# Previously: All mutations containing an input or data argument failed because the arguments were deleted For example: https://github.com/vivid-planet/comet/assets/13380047/d295b506-70b0-4e5f-80c6-86bb71788f52 # Now: gqlArgs object is copied before deletion -> mutations work again
Changed to adhere to our best practices; no further changes needed, because crud generator handles visible on its own
…isibility Demo: Remove default SQL value for news visibility
Reason: stick to best practices - category is a required arg - userGroup has GQL default value
example query that caused error: ``` query { products { nodes { id title } } } ```
This would have prevented the bug fixed in #1479.
Co-authored-by: Johannes Obermair <48853629+johnnyomair@users.noreply.github.com>
Co-authored-by: Johannes Obermair <48853629+johnnyomair@users.noreply.github.com>
…-filter API Generator: Add test for string filter
Don't let the Page expose a query, instead expose a loader function.
…bs` are used inside a `Stack` (#1439) Remounting causes local state to be lost, including final-form values. Problem was the missing `StackBreadcrumb` wrapper, as react remounts in that case (https://legacy.reactjs.org/docs/reconciliation.html#elements-of-different-types) --------- Co-authored-by: Johannes Obermair <48853629+johnnyomair@users.noreply.github.com>
…()` validators (#1496)
… files from `.gql.tsx` to `.gql.ts` (#1464)
…xt-type CRUD Generator: Correctly support `type: "text"` fields in input
Replace category-url mapping with a case conversion
Hide select when there's only one layout for a specific number of columns. --------- Co-authored-by: Ricky James Smith <jamesricky@me.com> Co-authored-by: Johannes Obermair <48853629+johnnyomair@users.noreply.github.com>
This PR moves the `YoutubeVideoBlock` from the demo/site directory to the `@comet/cms-site` package.
This PR adds new icons from the Comet UX library. It also replaces existing icons with new versions and deprecates the icons `Pool`, `Pool2`, `Vignette1`, `Vignette2`, `Betrieb` and `LogischeFilter`. --------- Co-authored-by: Thomas Dax <thomas.dax@vivid-planet.com> Co-authored-by: Johannes Obermair <48853629+johnnyomair@users.noreply.github.com>
Additional fields in the `item` prop of `AdditionalItemContextMenuItems` and `AdditionalItemContent` will be typed correctly if the `additionalItemFields` option is strongly typed.
## Changes: - extend the text in the save conflicts dialog to explain - what happened - what the next steps are - what can be done to avoid conflicts - make the button labels more precise - once the save dialog is closed - stop polling - mark the save button red and with an error icon (I will also show the other user (who made the conflicting change) in the dialog. I'll do that in a follow-up PR) ## New dialog: <img width="1075" alt="Bildschirmfoto 2023-11-06 um 09 32 27" src="https://github.com/vivid-planet/comet/assets/13380047/49ee1ea5-e4f5-4ed5-ad91-9c695e5ea975"> ## Screencast: https://github.com/vivid-planet/comet/assets/13380047/51c18896-7e02-4373-a7e1-1fae10faebfc --------- Co-authored-by: Ricky James Smith <jamesricky@me.com>
As it introduces incompatibilities and will be added when usable in the next Comet version
…1508) The prop seems to be a leftover and wasn't used.
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@5.2.0 ### Minor Changes - 0bed4e7: Add optional `hasConflict` prop to `SaveButton`, `FinalFormSaveButton` and `FinalFormSaveSplitButton` If set to `true`, a new "conflict" display state is triggered. You should pass the `hasConflict` prop returned by `useSaveConflict()`, `useSaveConflictQuery()` and `useFormSaveConflict()`. ### Patch Changes - 25daac0: Avoid remount of `RouterTab` with `forceRender={true}` when `RouterTabs` are used inside a `Stack` - Updated dependencies [9fc7d47] - @comet/admin-icons@5.2.0 ## @comet/admin-icons@5.2.0 ### Minor Changes - 9fc7d47: Add new icons from the Comet UX library. Replace existing icons with new versions. Mark icons Pool, Pool2, Vignette1, Vignette2, Betrieb, LogischeFilter as deprecated. ## @comet/blocks-admin@5.2.0 ### Minor Changes - 824ea66: Improve layout selection UX in `createColumnsBlock` Hide select when there's only one layout for a specific number of columns ### Patch Changes - 3702bb2: Infer additional item fields in `BlocksBlock` and `ListBlock` Additional fields in the `item` prop of `AdditionalItemContextMenuItems` and `AdditionalItemContent` will be typed correctly if the `additionalItemFields` option is strongly typed. - Updated dependencies [25daac0] - Updated dependencies [0bed4e7] - Updated dependencies [9fc7d47] - @comet/admin@5.2.0 - @comet/admin-icons@5.2.0 ## @comet/cms-admin@5.2.0 ### Minor Changes - 0bed4e7: Improve the `SaveConflictDialog` - extend the text in the dialog to explain - what happened - what the next steps are - what can be done to avoid conflicts - make the button labels more precise - once the save dialog is closed - stop polling - mark the save button red and with an error icon - 0bed4e7: `useSaveConflict()`, `useSaveConflictQuery()` and `useFormSaveConflict()` now return a `hasConflict` prop If `hasConflict` is true, a save conflict has been detected. You should pass `hasConflict` on to `SaveButton`, `FinalFormSaveButton` or `FinalFormSaveSplitButton`. The button will then display a "conflict" state. - 0bed4e7: Admin Generator: In the generated form, the `hasConflict` prop is passed from the `useFormSaveConflict()` hook to the `FinalFormSaveSplitButton` - 6fda5a5: CRUD Generator: Change the file ending of the private sibling GraphQL files from `.gql.tsx` to `.gql.ts` The GraphQL files do not contain JSX. Regenerate the files to apply this change to a project. ### Patch Changes - Updated dependencies [25daac0] - Updated dependencies [0bed4e7] - Updated dependencies [9fc7d47] - Updated dependencies [3702bb2] - Updated dependencies [824ea66] - @comet/admin@5.2.0 - @comet/admin-icons@5.2.0 - @comet/blocks-admin@5.2.0 - @comet/admin-date-time@5.2.0 - @comet/admin-rte@5.2.0 - @comet/admin-theme@5.2.0 ## @comet/cms-api@5.2.0 ### Minor Changes - bbc0a0a: Add access logging to log information about the request to standard output. The log contains information about the requester and the request itself. This can be useful for fulfilling legal requirements regarding data integrity or for forensics. There are two ways to integrate logging into an application: **First option: Use the default implementation** ```ts imports: [ ... AccessLogModule, ... ] ``` **Second option: Configure logging** Use the `shouldLogRequest` to prevent logging for specific requests. For instance, one may filter requests for system users. ```ts imports: [ ... AccessLogModule.forRoot({ shouldLogRequest: ({user, req}) => { // do something return true; //or false }, }), ... ] ``` More information can be found in the documentation under 'Authentication > Access Logging'. ### Patch Changes - 1a170b9: API Generator: Use correct type for `where` when `getFindCondition` service method is not used - 6b240a0: CRUD Generator: Correctly support `type: "text"` fields in input - @comet/blocks-api@5.2.0 ## @comet/cms-site@5.2.0 ### Minor Changes - 6244d6c: Add the `YouTubeVideoBlock` to the `@comet/cms-site` package. ## @comet/admin-color-picker@5.2.0 ### Patch Changes - Updated dependencies [25daac0] - Updated dependencies [0bed4e7] - Updated dependencies [9fc7d47] - @comet/admin@5.2.0 - @comet/admin-icons@5.2.0 ## @comet/admin-date-time@5.2.0 ### Patch Changes - Updated dependencies [25daac0] - Updated dependencies [0bed4e7] - Updated dependencies [9fc7d47] - @comet/admin@5.2.0 - @comet/admin-icons@5.2.0 ## @comet/admin-react-select@5.2.0 ### Patch Changes - Updated dependencies [25daac0] - Updated dependencies [0bed4e7] - @comet/admin@5.2.0 ## @comet/admin-rte@5.2.0 ### Patch Changes - Updated dependencies [9fc7d47] - @comet/admin-icons@5.2.0 ## @comet/admin-theme@5.2.0 ### Patch Changes - Updated dependencies [9fc7d47] - @comet/admin-icons@5.2.0 ## @comet/eslint-config@5.2.0 ### Patch Changes - @comet/eslint-plugin@5.2.0 ## @comet/admin-babel-preset@5.2.0 ## @comet/blocks-api@5.2.0 ## @comet/cli@5.2.0 ## @comet/eslint-plugin@5.2.0 Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Consider filtered mimetypes when calculating the position of a DAM item in `DamItemsService`'s `getDamItemPosition()` Previously, the mimetypes were ignored, sometimes resulting in an incorrect position.
CRUD Generator: Add support for `ArrayType` fields in generated input
…1511) Removes tight coupling between `PageTreeModule` and `BlocksModule`. Allows projects that use blocks but have no page tree.
Co-authored-by: Johannes Obermair <48853629+johnnyomair@users.noreply.github.com>
…ath with params that is not a sub route (#1443) Co-authored-by: Thomas Dax <thomas.dax@vivid-planet.com> Co-authored-by: Johannes Obermair <48853629+johnnyomair@users.noreply.github.com>
Previously, **all files were downloaded and uploaded again when copying within the same environment**. This bug is caused because our deployed projects use the CDN URL for the fileUrl and the API URL doesn't match the CDN URL
- Fix broken icons - Deprecate colored state icons because we don't support that. They were added accidentally.
Allows specifying custom block categories in application code.
Nullable child blocks are not correctly supported in the Admin, for instance, in `createCompositeBlock`. Save a block's default values instead.
… in `Field` (#1500) Previously, the `meta` argument was passed to these methods incorrectly. Now, the argument is passed as defined by the typing.
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@5.3.0 ### Minor Changes - 60cc1b2: Add `FieldSet` component with accordion behavior for better structuring of big forms. ### Patch Changes - a677a16: Fix `RouterPromptHandler` to not show a prompt when navigating to a path with params that is not a sub route - 5435b27: Fix `shouldScrollTo()`, `shouldShowError()` and `shouldShowWarning()` in `Field` Previously, the `meta` argument was passed to these methods incorrectly. Now, the argument is passed as defined by the typing. - Updated dependencies [0ff9b9b] - Updated dependencies [0ff9b9b] - @comet/admin-icons@5.3.0 ## @comet/admin-icons@5.3.0 ### Minor Changes - 0ff9b9b: Deprecate icons `StateGreen`, `StateGreenRing`, `StateOrange`, `StateOrangeRing`, `StateRed`, and `StateRedRing`, ### Patch Changes - 0ff9b9b: Fix various icons Since version 5.2.0 several icons were not displayed correctly. This problem has been fixed. ## @comet/blocks-admin@5.3.0 ### Minor Changes - a227388: Add support for custom block categories Allows specifying custom block categories in application code. **Example:** In `src/common/blocks/customBlockCategories.tsx`: ```tsx import { BlockCategory, CustomBlockCategory } from "@comet/blocks-admin"; import React from "react"; import { FormattedMessage } from "react-intl"; const productsBlockCategory: CustomBlockCategory = { id: "Products", label: <FormattedMessage id="blocks.category.products" defaultMessage="Products" />, // Specify where category will be shown in drawer insertBefore: BlockCategory.Teaser, }; export { productsBlockCategory }; ``` In `src/documents/pages/blocks/MyBlock.tsx`: ```tsx import { productsBlockCategory } from "@src/common/blocks/customBlockCategories"; const MyBlock: BlockInterface = { category: productsBlockCategory, ... }; ``` ### Patch Changes - Updated dependencies [0ff9b9b] - Updated dependencies [0ff9b9b] - Updated dependencies [a677a16] - Updated dependencies [60cc1b2] - Updated dependencies [5435b27] - @comet/admin-icons@5.3.0 - @comet/admin@5.3.0 ## @comet/blocks-api@5.3.0 ### Minor Changes - 920f2b8: Deprecate `nullable: true` for child blocks Nullable child blocks are not correctly supported in the Admin, for instance, in `createCompositeBlock`. Save a block's default values instead. ## @comet/cms-api@5.3.0 ### Minor Changes - 570fdbc: CRUD Generator: Add support for `ArrayType` fields in generated input - 8d0e3ee: CRUD Generator: Add support for enum arrays in input ### Patch Changes - dfb3c84: CRUD Generator: Correctly support `type: "text"` fields in filter and sort - c883d35: Consider filtered mimetypes when calculating the position of a DAM item in `DamItemsService`'s `getDamItemPosition()` Previously, the mimetypes were ignored, sometimes resulting in an incorrect position. - Updated dependencies [920f2b8] - @comet/blocks-api@5.3.0 ## @comet/admin-color-picker@5.3.0 ### Patch Changes - Updated dependencies [0ff9b9b] - Updated dependencies [0ff9b9b] - Updated dependencies [a677a16] - Updated dependencies [60cc1b2] - Updated dependencies [5435b27] - @comet/admin-icons@5.3.0 - @comet/admin@5.3.0 ## @comet/admin-date-time@5.3.0 ### Patch Changes - Updated dependencies [0ff9b9b] - Updated dependencies [0ff9b9b] - Updated dependencies [a677a16] - Updated dependencies [60cc1b2] - Updated dependencies [5435b27] - @comet/admin-icons@5.3.0 - @comet/admin@5.3.0 ## @comet/admin-react-select@5.3.0 ### Patch Changes - Updated dependencies [a677a16] - Updated dependencies [60cc1b2] - Updated dependencies [5435b27] - @comet/admin@5.3.0 ## @comet/admin-rte@5.3.0 ### Patch Changes - Updated dependencies [0ff9b9b] - Updated dependencies [0ff9b9b] - @comet/admin-icons@5.3.0 ## @comet/admin-theme@5.3.0 ### Patch Changes - Updated dependencies [0ff9b9b] - Updated dependencies [0ff9b9b] - @comet/admin-icons@5.3.0 ## @comet/cms-admin@5.3.0 ### Patch Changes - 0fdf4ea: Always use the `/preview` file URLs in the admin application This is achieved by setting the `x-preview-dam-urls` in the `includeInvisibleContentContext`. This fixes a page copy bug where all files were downloaded and uploaded again, even when copying within the same environment. - Updated dependencies [0ff9b9b] - Updated dependencies [0ff9b9b] - Updated dependencies [a677a16] - Updated dependencies [60cc1b2] - Updated dependencies [5435b27] - Updated dependencies [a227388] - @comet/admin-icons@5.3.0 - @comet/admin@5.3.0 - @comet/blocks-admin@5.3.0 - @comet/admin-date-time@5.3.0 - @comet/admin-rte@5.3.0 - @comet/admin-theme@5.3.0 ## @comet/eslint-config@5.3.0 ### Patch Changes - @comet/eslint-plugin@5.3.0 ## @comet/admin-babel-preset@5.3.0 ## @comet/cli@5.3.0 ## @comet/eslint-plugin@5.3.0 ## @comet/cms-site@5.3.0 Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Showcase how public upload fixtures (e.g., for uploaded profile pictures) could be implemented in an application.
Make all DAM license fields optional if `LicenseType` is `ROYALTY_FREE` even if `requireLicense` is true in `DamConfig`. Closes COM-250
## Problem: Our fixtures are currently broken. You always get this error when executing them: <img width="573" alt="Bildschirmfoto 2023-12-14 um 17 02 52" src="https://github.com/vivid-planet/comet/assets/13380047/ce7eed3c-5834-4618-8ced-ec93875c71ca"> The problem is that a required `userGroup` field is added to `PageTreeNode` in Demo: https://github.com/vivid-planet/comet/blob/99e0c57cc8ef542befd74d5b8ad9cf71058570e1/demo/api/src/page-tree/entities/page-tree-node.entity.ts#L26-L28 https://github.com/vivid-planet/comet/blob/1c098e4d0f23946c0fd543856c8f0aa897b83b82/demo/api/src/page-tree/dto/page-tree-node.input.ts#L7-L12 We don't provide a userGroup in the fixtures and it didn't strike because the typing of `PageTreeService.createNode()` is wrong. The input is typed with `PageTreeNodeBaseCreateInput` https://github.com/vivid-planet/comet/blob/b73eb4c34c70c694fc8b267ce330af5959c50e7b/packages/api/cms-api/src/page-tree/page-tree.service.ts#L33 but the actual input type can be defined in the application and is passed to the resolver via a factory: https://github.com/vivid-planet/comet/blob/46bced34cbb9ec02de6dd462bd9111a6be7898b7/packages/api/cms-api/src/page-tree/createPageTreeResolver.ts#L35 ### -> So actually the typing in the `PageTreeService` is wrong and we need to fix that I now circumvented this by using ts-ignore. But I think we need a solution to get the typing right. I'm however not sure what the best way to do this is.
thomasdax98
approved these changes
Dec 29, 2023
johnnyomair
approved these changes
Jan 2, 2024
johnnyomair
changed the title
Merge main into feature fixtures
Merge main into feature/fixtures
Jan 2, 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.
No description provided.