chore(deps): bump react-rx to v5.1.1 and adopt useObservable - #1820
Draft
stipsan wants to merge 4 commits into
Draft
chore(deps): bump react-rx to v5.1.1 and adopt useObservable#1820stipsan wants to merge 4 commits into
stipsan wants to merge 4 commits into
Conversation
Upgrade the catalog to react-rx ^5.1.1 (identity-coherent deferred useObservable) and migrate clean useEffect+subscribe RxJS bridges in dashboard widgets, listening-query hooks, and the document-list widget to useObservable. Existing preview/chrome call sites stay on deferred useObservable; no controlled-input reads need useSyncObservable.
🦋 Changeset detectedLatest commit: 7e50fd8 The changes in this PR will be included in the next version bump. This PR includes changesets to release 21 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
✅ E2E Tests🟢 24 passed • view full report • view run Studio: https://plugins-e2e-test-studio-g61nolhkj.sanity.dev Datasets: |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
react-rx v5's mount/deferral passes make Strict Mode double-invoke the side-effectful useMemo that creates the secrets observable. Assert on the observed document ID instead of an exact call count.
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
Call sites like DeleteTranslationDialog pass a fresh `[]` each render. Treating that as a useMemo dependency recreated the observable forever and left the delete-translation dialog footer stuck on "Delete document" instead of "Unset translation reference". Also stabilize assist's params/options the same way.
This file contains hidden or 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
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.
Description
Mirrors the Sanity Studio react-rx upgrade stack (#13788 → #13799 → #13814 → #13828) for this plugins monorepo.
react-rxbumped^4.2.5→^5.1.1(deferreduseObservablewith identity-coherent snapshot semantics;useSyncObservableavailable for sync reads)@sanity/embeddings-index-uiswitched tocatalog:useState/useEffect+.subscribe()bridges migrated touseObservable:@sanity/dashboard(SanityTutorials,ProjectInfo,ProjectUserswith retry viaBehaviorSubject)@sanity/assist/sanity-plugin-utils(useListeningQuery)sanity-plugin-dashboard-widget-document-listuseObservable— none are controlled-input reads that needuseSyncObservableuseObservablePromisenot adopted (no shared Suspense/LoadingBlocksetup)Follow-up fix
useListeningQuerywas recreating its observable whenever callers passed a freshinitialValue: [](e.g.DeleteTranslationDialog), leaving the delete-translation e2e stuck on the wrong footer button.initialValueis now stabilized by deep equality; assist params/options are stabilized the same way.Testing
pnpm format/pnpm lint/pnpm knip/pnpm build/pnpm test run