Skip to content
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

refactor: remove prefersLatestPublished handling #7305

Merged
merged 1 commit into from
Aug 5, 2024

Conversation

stipsan
Copy link
Member

@stipsan stipsan commented Aug 2, 2024

Description

With #7302 @sanity/presentation now takes full ownership of how it opens the "latest published" document when needed, and no longer use or need the prefersLatestPublished parameter and its related handling in the Studio core 😌

What to review

This param was always something that were implement only for usage in @sanity/presentation, with the intention of it to be a temporary escape hatch. Removing it doesn't affect the public API in any way and isn't considering a breaking change.
sanity/presentation has always been using a pinned version of @sanity/presentation to allow us to do these kinds of cleanups and internal changes.

Testing

This can be tested manually in the Presentation Studio,
selecting Published in the Perspectives dropdown should result in opening the last published revision of the document:
image

Notes for release

N/A

Copy link

vercel bot commented Aug 2, 2024

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

Name Status Preview Comments Updated (UTC)
page-building-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 2, 2024 2:36pm
performance-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 2, 2024 2:36pm
test-compiled-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 2, 2024 2:36pm
test-next-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 2, 2024 2:36pm
test-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 2, 2024 2:36pm
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
studio-workshop ⬜️ Ignored (Inspect) Aug 2, 2024 2:36pm

Copy link
Contributor

github-actions bot commented Aug 2, 2024

No changes to documentation

@stipsan stipsan marked this pull request as ready for review August 2, 2024 14:38
@stipsan stipsan requested a review from a team as a code owner August 2, 2024 14:38
@stipsan stipsan requested review from binoy14 and removed request for a team August 2, 2024 14:38
Copy link
Contributor

github-actions bot commented Aug 2, 2024

Component Testing Report Updated Aug 2, 2024 2:50 PM (UTC)

File Status Duration Passed Skipped Failed
comments/CommentInput.spec.tsx ✅ Passed (Inspect) 43s 15 0 0
formBuilder/ArrayInput.spec.tsx ✅ Passed (Inspect) 9s 3 0 0
formBuilder/inputs/PortableText/Annotations.spec.tsx ✅ Passed (Inspect) 31s 6 0 0
formBuilder/inputs/PortableText/copyPaste/CopyPaste.spec.tsx ✅ Passed (Inspect) 37s 11 7 0
formBuilder/inputs/PortableText/copyPaste/CopyPasteFields.spec.tsx ✅ Passed (Inspect) 0s 0 12 0
formBuilder/inputs/PortableText/Decorators.spec.tsx ✅ Passed (Inspect) 17s 6 0 0
formBuilder/inputs/PortableText/DisableFocusAndUnset.spec.tsx ✅ Passed (Inspect) 10s 3 0 0
formBuilder/inputs/PortableText/DragAndDrop.spec.tsx ✅ Passed (Inspect) 3m 0s 0 0 0
formBuilder/inputs/PortableText/FocusTracking.spec.tsx ✅ Passed (Inspect) 44s 15 0 0
formBuilder/inputs/PortableText/Input.spec.tsx ✅ Passed (Inspect) 1m 46s 21 0 0
formBuilder/inputs/PortableText/ObjectBlock.spec.tsx ✅ Passed (Inspect) 1m 16s 18 0 0
formBuilder/inputs/PortableText/PresenceCursors.spec.tsx ✅ Passed (Inspect) 9s 3 9 0
formBuilder/inputs/PortableText/RangeDecoration.spec.tsx ✅ Passed (Inspect) 25s 9 0 0
formBuilder/inputs/PortableText/Styles.spec.tsx ✅ Passed (Inspect) 18s 6 0 0
formBuilder/inputs/PortableText/Toolbar.spec.tsx ❌ Failed (Inspect) 1m 25s 20 0 1
formBuilder/tree-editing/TreeEditing.spec.tsx ✅ Passed (Inspect) 1m 48s 30 0 0
formBuilder/tree-editing/TreeEditingNestedObjects.spec.tsx ✅ Passed (Inspect) 20s 3 0 0

@stipsan stipsan enabled auto-merge August 2, 2024 14:54
@runeb runeb requested review from ricokahler and removed request for binoy14 August 5, 2024 17:53
Copy link
Contributor

@ricokahler ricokahler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for cleaning this up!

@stipsan stipsan added this pull request to the merge queue Aug 5, 2024
Merged via the queue into next with commit 542b07b Aug 5, 2024
42 checks passed
@stipsan stipsan deleted the prefersLatestPublished branch August 5, 2024 21:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants