-
Notifications
You must be signed in to change notification settings - Fork 25
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: releases v0.5 #2072
Closed
Closed
feat: releases v0.5 #2072
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
pedrobonamin
force-pushed
the
releases
branch
from
November 1, 2024 08:45
0c364f5
to
31ebc19
Compare
Closed in favor of #2081 |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Pre read
This branch builds on top of
releases
branch, which includes the necessary packages updates.6.22.2-bundle-perspective
corel
Next steps:
bundlePerspective
data as a query paramapplySourceDocuments
in theclient
to work with perspectives. Investigate what this does.Changes:
With the introduction of
releases
the perspective is now a global studio concern and a new type of perspective has been introducedbundle.{releaseId}
Example of a published release selection
Video 🎥
Video explaining the details https://www.loom.com/share/3894e17c19b247548dccf3976f661a29?sid=59625a39-bdbf-400f-ad9c-d4243acf4018
The issue with the drafts is now fixed.
Perspective selector removed
Given we have this new perspective selector, the
draft | published
selector from Presentation tool was removed<RevisionSwitcher/>
removedThis is not needed anymore, structure now knows about perspectives and it infers them from the global state and the form reacts according to the perspective selected.
Loaders updated.
The loaders
LiveQueries
andLoaderQueries
were updated to use the bundlePerspective param.Perspective type updated to include
bundle.${string}
The global perspective can be any of
published | previewDrafts | bundle.${string}
this has been reflected in the code by updating the types were needed, this could be centralized instead of manually adding it everywhere, but wanted to easily reflect the intention in code for the review.This is relevant at the moment we need to query the data. When receiving a
bundle.${string}
perspective it should not use theperspective
option inclient.fetch
, instead, it should use thebundlePerspective
option, which takes an array of perspectives.How does
bundlePerspective
works:bundles perspective allows the client to fetch data in a similar way as
previewDrafts
, but instead of only stacking changes of published and drafts, it allows us to stack multiple perspectives inside.So given you have the following documents:
versions.summer.foo
andbar
versions.summer.foo
and - -versions.winter.bar
(This supports multiple perspectives in one query)drafts.foo
andbar
This
bundlePerspective
array is exposed by theusePerspective
hook fromsanity
which takes care of applying the perspectives in the correct order, the perspectives will apply on top of each other from right to left.So if the same document is in two perspectives, it will be returned only in the first one found.