chore(deps): test @sanity/ui@4.0.0-next.7 - #1793
Conversation
Bump the pnpm catalog and force a single UI version via override so the monorepo (including sanity's transitive dep) resolves to the v4 next prerelease for compatibility testing.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
✅ E2E Tests🟢 24 passed • view full report • view run Studio: https://plugins-e2e-test-studio-oba7casya.sanity.dev Datasets: |
Keep the catalog on 4.0.0-next.0 for plugin testing; allow sanity to retain its own @sanity/ui@3.5.0 without forcing a tree-wide override.
|
@sanity/ui@4.0.0-next.3 types `space` and `columns` as never and replaces useClickOutside with useClickOutsideEvent. Rename space→gap, columns→gridTemplateColumns, and update the assist click-outside hook so lint passes against the v4 next prerelease.
Bump the catalog from 4.0.0-next.3 and handle the next.4/next.5 breaking changes: - Components with heavy dependencies moved to dedicated subpath entry points, so split imports of Autocomplete, Breadcrumbs, Code, Menu*, Popover, Toast* and Tooltip out of the root entry. - Static CSS now ships as a stylesheet consumers import themselves, so add `import '@sanity/ui/styles.css'` to the root entrypoint of every package that renders Sanity UI, plus an ambient module declaration since the export has no type declarations. - Retarget the `useToast` test mocks at `@sanity/ui/toast`. - Stub ResizeObserver in the media test setup; v4 dropped the @juggle/resize-observer polyfill in favour of the global API.
…ount CI shard 2 failed with unhandled React errors after Browser.test passed: Activity-kept Popover/Tooltip updates raced jsdom teardown. Explicitly unmount and flush a microtask so scheduled work settles first.
Patch release that ships styles.css unminified; no API changes.
Drop ambient declare module for @sanity/ui/styles.css — next.7 ships types on that export. Keep unsplash's react-photo-album CSS decl.
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
Align EditAssetTool tests with Sanity UI v4 where ToastProvider moved to the toast subpath.
Keep catalog @sanity/ui at 4.0.0-next.7 while adopting main's @sanity/types and @sanity/util ^6.8.0 bumps and regenerated lockfile.
Draft PR to exercise plugins against
@sanity/ui@4.0.0-next.7(was catalog^3.5.0/ npmlatest).Changes
pnpm-workspace.yaml: catalog@sanity/ui→4.0.0-next.74.0.0-next.7;sanitykeeps its own@sanity/ui@3.xBreaking changes handled
next.3 — removed props/hooks:
space→gap,columns→gridTemplateColumnsuseClickOutside→useClickOutsideEventnext.4 — dropped the
@juggle/resize-observerpolyfill in favour of the global API. jsdom has noResizeObserver, so the media test setup now stubs it.next.5 — components with heavy dependencies moved to dedicated subpath entry points. Imports of
Autocomplete,Breadcrumbs,Code,Menu*,Popover,Toast*andTooltipwere split out of the root entry across 122 files, and theuseToasttest mocks now target@sanity/ui/toast.next.5 — static CSS now ships as a stylesheet consumers import themselves.
import '@sanity/ui/styles.css'is added to the root entrypoint of all 47 entrypoints that render Sanity UI (43 packages, including the test studio'ssanity.config.ts). The four entrypoints that never reach@sanity/ui(@sanity/form-toolkit'sform-renderer/form-schema/formium, andsanity-plugin-internationalized-array/migrations) are intentionally left alone.next.6 — patch only (ships
styles.cssunminified). No source changes required.next.7 —
./styles.cssnow exports TypeScript types (dist/styles.d.ts). Removed the ambientdeclare module '@sanity/ui/styles.css'files added for next.5/6 (kept unrelated CSS module decls such as unsplashreact-photo-album/rows.cssand latexkatex).Test hygiene
Media
Browser/FormBuilderToolsmoke tests now explicitly unmount and flush a microtask so UI v4 Activity-kept Popover/Tooltip work cannot race jsdom teardown (CI was failing the shard on unhandled errors even though the assertions passed).Follow-ups
@sanity/assistuseClickOutside→useClickOutsideEventchange inInstructionTaskHistoryButton.tsxinto a separate PR (useClickOutsidewas already deprecated on UI v3, so that migration does not belong in this compatibility-test branch).Notes
main.Intent
Compatibility test only — do not merge until v4 is ready.