Skip to content

Commit

Permalink
Add changesets for Dependencies (#1849) (#1853)
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasdax98 authored Mar 19, 2024
1 parent 54abb71 commit 322da38
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .changeset/cyan-seals-fry.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
"@comet/cms-api": minor
---

Add `@EntityInfo()` decorator

Adding `@EntityInfo()` to an entity is necessary to correctly display dependencies in the admin application.
You can find more information in [the docs](https://docs.comet-dxp.com/docs/dependencies/).
11 changes: 11 additions & 0 deletions .changeset/six-suns-live.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
"@comet/blocks-admin": minor
---

Add `resolveDependencyPath()` to `BlockMethods` interface

Blocks must now offer a `resolveDependencyPath()` method that returns a URL path based on the block's `state` and `jsonPath`.
It can be used to build the URL to a block's edit view.

For most cases, the default implementation of this method should be sufficient, so you don't have to implement it yourself.
You must only override it manually if your block's admin component contains special routing logic (e.g. `RouterTabs`).
15 changes: 15 additions & 0 deletions .changeset/smart-colts-drive.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
"@comet/cms-admin": minor
---

Add `DependencyInterface`

The `DependencyInterface` must be implemented for entities to be displayed correctly in the `DependencyList`.
The implementation must then be passed to the `DependenciesConfigProvider`.

You can use one of the helper methods to implement the `resolvePath()` method required by `DependencyInterface`:

- `createDocumentDependencyMethods()` for documents
- `createDependencyMethods()` for all other entities

You can find more information in [the docs](https://docs.comet-dxp.com/docs/dependencies/).
7 changes: 7 additions & 0 deletions .changeset/tiny-taxis-behave.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"@comet/cms-admin": minor
---

Add `DependencyList` that can be used to display the dependencies of an entity in the admin

The `DependencyList` is intended to be used in `Tabs` (as done in the DAM).

0 comments on commit 322da38

Please sign in to comment.