sanity-io / sanity

Sanity Studio – Rapidly configure content workspaces powered by structured content
https://www.sanity.io
MIT License
4.96k stars 390 forks source link

feat(sanity): use Actions API when restoring drafts #6671

Closed juice49 closed 1 week ago

juice49 commented 2 weeks ago

Description

This branch adopts the Actions API for restoring revisions. This was made possible by the introduction of the sanity.action.document.replaceDraft action.

What to review

Does everything look correct when restoring a previous revision of a document?

Testing

Added an E2E test for revision restoration in test/e2e/tests/document-actions/restore.spec.ts.

vercel[bot] commented 2 weeks ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
performance-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 22, 2024 9:42am
test-next-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 22, 2024 9:42am
test-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 22, 2024 9:42am
1 Ignored Deployment | Name | Status | Preview | Comments | Updated (UTC) | | :--- | :----- | :------ | :------- | :------ | | **studio-workshop** | ⬜️ Ignored ([Inspect](https://vercel.com/sanity-io/studio-workshop/Hc1c5dSnjuWQNp6fZT7LCLxWGBp1)) | [Visit Preview](https://studio-workshop-git-sdx-1168.sanity.build) | | May 22, 2024 9:42am |
github-actions[bot] commented 2 weeks ago

No changes to documentation

github-actions[bot] commented 2 weeks ago

Component Testing Report Updated May 22, 2024 9:47 AM (UTC)

File Status Duration Passed Skipped Failed
comments/CommentInput.spec.tsx ✅ Passed (Inspect) 36s 15 0 0
formBuilder/ArrayInput.spec.tsx ✅ Passed (Inspect) 7s 3 0 0
formBuilder/inputs/PortableText/Annotations.spec.tsx ✅ Passed (Inspect) 26s 6 0 0
formBuilder/inputs/PortableText/copyPaste/CopyPaste.spec.tsx ✅ Passed (Inspect) 31s 11 7 0
formBuilder/inputs/PortableText/Decorators.spec.tsx ✅ Passed (Inspect) 14s 6 0 0
formBuilder/inputs/PortableText/FocusTracking.spec.tsx ✅ Passed (Inspect) 37s 15 0 0
formBuilder/inputs/PortableText/Input.spec.tsx ✅ Passed (Inspect) 1m 17s 21 0 0
formBuilder/inputs/PortableText/ObjectBlock.spec.tsx ✅ Passed (Inspect) 1m 5s 18 0 0
formBuilder/inputs/PortableText/PresenceCursors.spec.tsx ✅ Passed (Inspect) 7s 3 9 0
formBuilder/inputs/PortableText/RangeDecoration.spec.tsx ✅ Passed (Inspect) 21s 9 0 0
formBuilder/inputs/PortableText/Styles.spec.tsx ✅ Passed (Inspect) 15s 6 0 0
formBuilder/inputs/PortableText/Toolbar.spec.tsx ✅ Passed (Inspect) 30s 12 0 0
socket-security[bot] commented 2 weeks ago

No dependency changes detected. Learn more about Socket for GitHub ↗︎

👍 No dependency changes detected in pull request