-
Notifications
You must be signed in to change notification settings - Fork 20
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 #2081
Open
pedrobonamin
wants to merge
29
commits into
main
Choose a base branch
from
corel
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
feat: releases v0.5 #2081
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 ↗︎
7 Skipped Deployments
|
New and removed dependencies detected. Learn more about Socket for GitHub ↗︎
🚮 Removed packages: npm/@sanity/[email protected], npm/@sanity/[email protected], npm/@sanity/[email protected], npm/@sanity/[email protected], npm/@sanity/[email protected], npm/[email protected] |
* chore: fix live-next build * fix: support bundle perspective
…2084) * chore(release-overlay-previews): add simple release overlay previews wip improve data fetching wip ui tidy up comments tidy up postmessagereleases ensure preview is only shown when data attribute is set * chore(release-overlay-previews): use useReleases hook * chore(release-overlay-previews): add releases.data to comlink useEffect deps * fix: update how the nearestRelease is obtained --------- Co-authored-by: pedrobonamin <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.