diff --git a/content/guides/02.content/6.content-versioning.md b/content/guides/02.content/6.content-versioning.md index ad6e0107..c457ca29 100644 --- a/content/guides/02.content/6.content-versioning.md +++ b/content/guides/02.content/6.content-versioning.md @@ -10,11 +10,10 @@ use content versioning, including drafting content without publishing it, and mo ## Concepts -- **Version**: a version of an item is a snapshot that gets copied from the current or `main` version, allowing you to safely make changes and later promote to be the main version. Any changes to the main version made in the meantime are updated automatically. -- **Main**: the main version is the original version of a piece of content that has been created. It is the default version that is displayed to users. The main version is the "source of truth" for all other versions. This is often used for published content. -- **Promote**: promoting a version means to make it the new main version. When a new version is promoted, it becomes the main version that is displayed to users, and it replaces the previous main version. -- **Revision**: revisions are individual changes to items made within a version or the main item. Directus keeps track of all changes made, so you're able to view the history of modifications and revert to a previous state. - +- **Version**: a version of an item is a snapshot that gets copied from the current version or main item, allowing you to safely make changes and later promote to be the main item. +- **Main**: the main item is the default item that is displayed to users. It is the "source of truth" for all versions. +- **Promote**: when a version is promoted, it becomes the main item that is displayed to users. +- **Revision**: revisions are individual changes to items made within a version or main item. Directus keeps track of all changes made, so you're able to view the history of modifications and revert to a previous state. ::callout{icon="material-symbols:info-outline" to="/guides/content/live-preview"} **Using Versions in Live Preview** @@ -29,13 +28,13 @@ Navigate to **Settings** > **Data Model**, select the collection that you want t ## Creating a New Version -![Creating a new version in the content module](/img/versioning_create_new.png) +![Creating a new version in the content module](/img/comparison_create-version.png) Open an item within your versioned collection. At the top of the item view, you will notice a dropdown with the main Content Version displayed as "main". Select "Create Version" and provide a key and a name for the new version. You can then save your new version. ::callout{icon="material-symbols:info-outline"} **Version Source** -All new versions originate from the main version. This implies that the main version acts as the single source of truth +All new versions originate from the main item. This implies that the main item acts as the single source of truth for other versions. :: @@ -45,11 +44,11 @@ for other versions. Open the item in the newly created version, and make the desired edits to the item's content. -Upon saving the changes, you'll notice that the main version remains unaffected, while the changes are reflected only in the modified version. +Upon saving the changes, you'll notice that the main item remains unaffected, while the changes are reflected only in the modified version. ## Comparing and Promoting a Version -![Promoting a version, comparing its changes](/img/versioning_comparison_modal.png) +![Promoting a version, comparing its changes](/img/comparison_promote-version.png) Promoting a version makes it the main (current) version of your content. @@ -59,12 +58,12 @@ Promoting a version makes it the main (current) version of your content. 1. Open the version you want to promote 2. Select the **"Promote Version"** option from the dropdown. 3. In the comparison modal, review the changes: - - Fields with differences from the main version are highlighted with color indicators + - Fields with differences from the main item are highlighted with color indicators - Review each highlighted field to understand what will change 4. Accept or reject individual changes as needed -5. Click **"Promote"** to finalize and make this version the new main version +5. Click **"Promote"** to finalize and make this version the new main item -Once promoted, this version becomes the active content, and the previous main version is preserved in the version history. +Once promoted, this version becomes the active content, and the previous main item is preserved in the version history. After promoting a version, you can choose to keep or delete the version. @@ -90,15 +89,26 @@ When implementing retention policies, consider your team's workflow and how far ### Viewing and Restoring Revisions -You can view revisions for an item within the right sidebar of the Studio. How many fields were updated in each revision is clarified via the label e.g. **"Updated 2 Fields"**. +You can view revisions for an item within the right sidebar of the Studio. How many fields were updated in each revision is clarified via the label e.g. **"Updated 2 Fields"**. Clicking on a revision will launch the Content Comparison Modal. ![Revisions Sidebar](/img/revisions.png) -Upon selecting a revision, you will see the differences between the current main version (indicated on the left) and that revision (indicated on the right). +Note that once the comparison modal is open, you can change the revision you want to compare by using the dropdown menu at the top right of the modal. + +![Revisions Selector](/img/comparison_revision-selector.png) + +Upon selecting a revision, you will see the differences between the current version (indicated on the left) and that revision (indicated on the right). + +![Content Comparison Modal](/img/comparison_revision-diff-indicators.png) + +The 'Updated' label indicators demonstrate which fields were updated in that revision, while the change indicators assist in understanding how the selected revision currently compares to the version it is associated with. If the revision is not associated with a version, the comparison will be against the main item. + +![Diff Indicators](/img/comparison_revision-diff-indicators-2.png) -![Revisions Sidebar](/img/revisions_comparison_modal.png) +When a collapsed group interface contains fields with updates or differences, a diff indicator appears next to the group name. -The 'Updated' label indicators demonstrate which fields were updated in that revision, and the change indicators assist in understanding how that data currently compares to main. +![Diff Indicator on Collapsed Group](/img/comparison_group-indicator.png) -To restore a revision, select **"Apply"** from within the revision comparison modal. +When expanded, diff indicators are displayed next to each field in the group that has updates or differences. +![Diff Indicators on Expanded Group](/img/comparison_group-indicator-expanded.png) diff --git a/content/guides/09.extensions/3.app-extensions/1.interfaces.md b/content/guides/09.extensions/3.app-extensions/1.interfaces.md index 6b76e763..8eee1494 100644 --- a/content/guides/09.extensions/3.app-extensions/1.interfaces.md +++ b/content/guides/09.extensions/3.app-extensions/1.interfaces.md @@ -58,6 +58,7 @@ export default defineInterface({ | `recommendedDisplays` | array | A list of display names which are recommended to be used with this interface. | | `options` | array \| component | | When an array, options contains user-configurable fields that are set when creating or editing the interface. | `preview` | string | Inline SVG to display in interface selection drawer. | +| `indicatorStyle` | string | Controls how comparison indicators are displayed for fields in the comparison modal. Accepts `active`, `muted`, or `hidden`. Defaults to `active` for standard fields and `hidden` for group fields. | :partial{content="extensions-uid"} diff --git a/public/img/comparison_create-version.png b/public/img/comparison_create-version.png new file mode 100644 index 00000000..55ac549e Binary files /dev/null and b/public/img/comparison_create-version.png differ diff --git a/public/img/comparison_group-indicator-expanded.png b/public/img/comparison_group-indicator-expanded.png new file mode 100644 index 00000000..0c1ac950 Binary files /dev/null and b/public/img/comparison_group-indicator-expanded.png differ diff --git a/public/img/comparison_group-indicator.png b/public/img/comparison_group-indicator.png new file mode 100644 index 00000000..d9eebc5a Binary files /dev/null and b/public/img/comparison_group-indicator.png differ diff --git a/public/img/comparison_promote-version.png b/public/img/comparison_promote-version.png new file mode 100644 index 00000000..1e905167 Binary files /dev/null and b/public/img/comparison_promote-version.png differ diff --git a/public/img/comparison_revision-diff-indicators-2.png b/public/img/comparison_revision-diff-indicators-2.png new file mode 100644 index 00000000..c39dc576 Binary files /dev/null and b/public/img/comparison_revision-diff-indicators-2.png differ diff --git a/public/img/comparison_revision-diff-indicators.png b/public/img/comparison_revision-diff-indicators.png new file mode 100644 index 00000000..7c5d61b8 Binary files /dev/null and b/public/img/comparison_revision-diff-indicators.png differ diff --git a/public/img/comparison_revision-selector.png b/public/img/comparison_revision-selector.png new file mode 100644 index 00000000..e0269afa Binary files /dev/null and b/public/img/comparison_revision-selector.png differ diff --git a/public/img/versioning_comparison_modal.png b/public/img/versioning_comparison_modal.png deleted file mode 100644 index 57e05b9d..00000000 Binary files a/public/img/versioning_comparison_modal.png and /dev/null differ diff --git a/public/img/versioning_create_new.png b/public/img/versioning_create_new.png deleted file mode 100644 index c2d6abe6..00000000 Binary files a/public/img/versioning_create_new.png and /dev/null differ diff --git a/public/img/versioning_promote.png b/public/img/versioning_promote.png deleted file mode 100644 index ba3765b1..00000000 Binary files a/public/img/versioning_promote.png and /dev/null differ