Skip to content

feat: adds restore as draft option to versions - #7100

Merged
JessRynkar merged 16 commits into
betafrom
feat/restore-as-draft
Aug 1, 2024
Merged

JessRynkar merged 16 commits into
betafrom
feat/restore-as-draft

Conversation

@JessRynkar

@JessRynkar JessRynkar commented Jul 10, 2024 •

Copy link
Copy Markdown
Member

Description

Adds option to restore a version as a draft.

  1. Run versions test suite
  2. Go to drafts and choose any doc with status: published
  3. Open the version
  4. See new restore as draft option
Screenshot 2024-07-12 at 1 01 17 PM
  • I have read and understand the CONTRIBUTING.md document in this repository.

Type of change

  • Chore (non-breaking change which does not add functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Change to the templates directory (does not affect core functionality)
  • Change to the examples directory (does not affect core functionality)
  • This change requires a documentation update

Checklist:

  • I have added tests that prove my fix is effective or that my feature works
  • Existing test suite passes locally with my changes
  • I have made corresponding changes to the documentation

@JessRynkar
JessRynkar requested a review from JarrodMFlesch July 12, 2024 17:00
@JarrodMFlesch

Copy link
Copy Markdown
Contributor

@JessChowdhury it is missing translations for Restore as draft

@JarrodMFlesch

JarrodMFlesch commented Jul 15, 2024 •

Copy link
Copy Markdown
Contributor

Globals

This should work with Globals too, does it?

Graphql

It looks like it is graphql is missing types and args.

  • draft arg needs to be added for collections here
  • options needs to thread draft from args here

The same two points will apply for global versioning in graphql too when that is implemented

@denolfe denolfe added the v3 label Jul 25, 2024
@JessRynkar
JessRynkar merged commit d307d62 into beta Aug 1, 2024
@JessRynkar
JessRynkar deleted the feat/restore-as-draft branch August 1, 2024 14:33
jacobsfletch added a commit that referenced this pull request Oct 27, 2026
Restoring a version in the admin now always saves a draft for
draft-enabled collections and globals, preserving published content and
statuses. Restoration can no longer publish or unpublish a document,
protecting live content from accidental changes.

Replaces the restore dropdown with a single `Restore as draft` action,
building on #7100. Restores all locales into the latest draft. Editors
review the restored content and explicitly publish from the document
editor.

Before:


https://github.com/user-attachments/assets/258fb8a7-e20e-4f98-a467-aecfea9c804a

After:


https://github.com/user-attachments/assets/87ea51e9-6410-4b54-98ad-c2605becd84d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants