-
Notifications
You must be signed in to change notification settings - Fork 448
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
feat: content releases #8454
feat: content releases #8454
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
2 Skipped Deployments
|
No changes to documentation |
Component Testing Report Updated Feb 4, 2025 3:40 PM (UTC) ❌ Failed Tests (1) -- expand for details
|
⚡️ Editor Performance ReportUpdated Tue, 04 Feb 2025 15:42:11 GMT
Detailed information🏠 Reference resultThe performance result of
🧪 Experiment resultThe performance result of this branch
📚 Glossary
|
536e5f2
to
93d76ce
Compare
packages/sanity/src/core/form/studio/inputs/client-adapters/reference.ts
Outdated
Show resolved
Hide resolved
packages/sanity/src/core/preview/utils/getPreviewStateObservable.ts
Outdated
Show resolved
Hide resolved
packages/sanity/src/core/preview/utils/getPreviewStateObservable.ts
Outdated
Show resolved
Hide resolved
93d76ce
to
1b4edb7
Compare
Co-authored-by: pedrobonamin <pedrobonamin@gmail.com>
a345b6f
to
606f948
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great team work !!! This is amazing @sanity-io/studio-app !
Description
This PR marks the public beta of the Content Releases feature. The content releases feature itself will be opt-in (for now), but these changes also introduces a few key improvements to the Studio UI, most notably the ability to switch between the published document and the current draft, and the ability to browse the Studio by only seeing what's currently published.
The Studio now supports a
perspective
search param, which is "sticky", meaning that it is preserved when navigating around in the studio. This param can take a comma-separated list of values (referred to as a "perspecive stack", which will then be forwarded to theperspective
param used by list queries made by the Studio)Terminology
With these changes we are introducing three new terms into the codebase, I'll cover them in brief here (there's more details to be found in internal documentation for the curious minded):
Version
- This is comparable to a draft document but with a different prefix: instead ofdrafts.<publishedId>
it will haveversions.<releaseId>.<publishedId>
. Theversions.
prefix is fixed, and no documents can have that as a prefix without following theversions.<string>.<id>
structure.Release
– A release is represented by a system document that has an ID on the form_.release.<releaseId>
. The<releaseId>
-part here is what connects it with version documents. The<releaseId>
part conventionally starts withr
, and is followed by 8 random characters, e.g.rNe6H9RGZ
.Bundle
- This is an internal, technical name used to connect documents in the release together. You can think of thereleaseId
as a type of bundle, but there could also be other types of bundles in the future.There's no change to the semantics around
draft
documents, other than you can now think of them as version documents with special sematics applied to them.What to review
This is a rather chonky one, when reviewing feel free to skp fast through things like tests and fixtures and focus on the more substantial stuff. Things in particular to watch out for are:
Note: we'll be using
vX
for various API calls if the feature is enabled, otherwise we'll stick with stable API versions. While it's not ideal to ship with vX, we have considered it to be an ok tradeoff in this case, given that the feature is opt-in and considered beta. Edit: Seems like this is not the case right now, we will be addressing this before merging, but adding a todo here:Testing
Most new code includes tests, but our coverage of existing code paths is still aspirational at best, so any manual testing is greatly appreciated.
Notes for release
tbd