-
Notifications
You must be signed in to change notification settings - Fork 21
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
2
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
+907
−1,085
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/[email protected] |
chore(release): publish corel [skip ci] fix: fully support perspectives chore: improve typegen, add react compiler chore: start moving to typegen chore: fix weird build issue chore: bump versions, tweak live setup chore(release): publish corel [skip ci] fix: ensure drafts are included in the documents list chore: render array if array chore(release): publish corel [skip ci] fix: apply changes in latest corel tagged release chore: use `@sanity/client` to validate API perspective fix: only refetch if the list of ids have changed chore: sync up remaining changes fix: improve perspectives handling chore: regen lockfile chore: fix linter issues chore(release): publish corel [skip ci] chore: prepare release fix: apply suggestion from pedro fix: restore changes lost in merge conflict handling fix: adjust to changes in bundle perspectives chore: lockfile fix: use publishedId from 'sanity' fix: use publishedId when fetching union types chore(release-overlay-previews): add simple release overlay previews (#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 --------- fix: support bundle perspective (#2083) * chore: fix live-next build * fix: support bundle perspective fix: ensure comlink stays connected if `navigate` changes (#2082) * chore: find cause * fix: handle comlink disconnect * chore: remove debug code fix: remove vite.config temp file chore: revert presentation loader tag name change chore(publish): publish new version fix(loader): load drafts data when using previewDrafts feat(presentation): add releases to presentation - first pass chore(deps): update to 6.22.2-bundle-perspective client chore(deps): update sanity to latest corel chore(deps): remove local sanity icons and ui packages chore(deps): update sanity corel to latest chore(deps): update sanity corel to latest chore(deps): update to 6.22.2-bundle-perspective client fix(deps): add the registry files fix: update types due to client change chore(deps): link with tagged client release Co-Authored-By: pedrobonamin <[email protected]> Co-Authored-By: George Francis <[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.@sanity/client:6.22.2-bundle-perspective
corel
@sanity/ui: local tar file (will be updated soon to a npm version)@sanity/icons: local tar file (will be updated soon to a npm version)Next steps:
think on adding thebundlePerspective
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.