Migrate @sanity/dashboard and the dashboard widget plugins to the monorepo#977
Draft
stipsan wants to merge 424 commits into
Draft
Migrate @sanity/dashboard and the dashboard widget plugins to the monorepo#977stipsan wants to merge 424 commits into
stipsan wants to merge 424 commits into
Conversation
BREAKING CHANGE: semantic-release is being difficult
Co-authored-by: Cody Olsen <81981+stipsan@users.noreply.github.com>
…t will be regenerated by scaffold
… be regenerated by scaffold
…ze to plain React
…be regenerated by scaffold
… handler to avoid React Compiler hoisting crash
🦋 Changeset detectedLatest commit: bbb88fd The changes in this PR will be included in the next version bump. This PR includes changesets to release 4 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 |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
Transfers four plugins into the monorepo using the
copy plugingenerator (full git history preserved viagit subtree):@sanity/dashboard(from sanity-io/dashboard)sanity-plugin-dashboard-widget-document-list(from sanity-io/dashboard-widget-document-list)sanity-plugin-dashboard-widget-netlify(from sanity-io/sanity-plugin-dashboard-widget-netlify)sanity-plugin-dashboard-widget-vercel(from sanity-io/sanity-plugin-dashboard-widget-vercel)Notable changes during transfer
@sanity/dashboardas a peer dependency (^5 || ^6.0.0-0) plus aworkspace:^dev dependency.lodash→lodash-es,@sanity/ui/rxjsmoved to catalog versions.rxjs@6,react-props-stream, andabort-controllerdependencies; the stream-based widget wrapper was rewritten as a plain React component with identical behavior (config mapping + fire-and-forget build hook POST).@sanity/uiv2 → v3 (catalog), migrateduseTheme().sanity.color.card.enabledto the v2 theme API (useTheme_v2), replaced the removedtheme.sanity.color.spot.redwith@sanity/color, added@types/object-hash. Also fixed a React Compiler crash:deploymentTarget!._idin the delete handler caused_idto be hoisted into a render-time memo dependency, crashing the "Create deployment target" dialog when no target exists (verified before/after in the test studio).getTheme_v2, replaced deprecatedspace/columnsprops withgap/gridTemplateColumns, replacedcreateElementwith JSX, removed unusedNotFoundWidget, fixed an a11y issue in the Project users retry link.dashboard-exampleworkspace with one dashboard tool tab per plugin (Dashboard, Document List, Netlify, Vercel), and the root README plugins table lists all four plugins..oxlintrc.jsongains a targeted override disablingno-unsafe-type-assertionfor the vercel plugin's XState machines (the canonical XState v5 typing pattern relies on{} as Contextassertions).main(Sanity Studio v6 catalog upgrade + pkg-utils 10.5.4): regeneratedpnpm-lock.yamlagainst the v6 catalog and re-verified all four plugins build, lint, test, and render correctly under Studio v6.Demo
dashboard_plugins_demo_all_four_widgets.mp4
Dashboard tab with Project info and Project users widgets
Document list widgets showing a newly created demo document
Netlify deploys widget with two sites
Vercel create deployment target dialog
Dashboard workspace rendering on Sanity Studio v6 after merging main
Transfer verification
npm trust github @sanity/dashboard --file=release.yml --repository=sanity-io/pluginsnpm trust github sanity-plugin-dashboard-widget-document-list --file=release.yml --repository=sanity-io/pluginsnpm trust github sanity-plugin-dashboard-widget-netlify --file=release.yml --repository=sanity-io/pluginsnpm trust github sanity-plugin-dashboard-widget-vercel --file=release.yml --repository=sanity-io/pluginspackage.jsondependencies/peerDependencies/exports verified against original repospnpm dev, see demo video; re-verified on Studio v6 after merging main)pnpm format,pnpm knip,pnpm lint,pnpm build,pnpm test runall passMaintainer follow-up
# [This plugin has moved](https://github.com/sanity-io/plugins/tree/main/plugins/@sanity/dashboard)# [This plugin has moved](https://github.com/sanity-io/plugins/tree/main/plugins/sanity-plugin-dashboard-widget-document-list)# [This plugin has moved](https://github.com/sanity-io/plugins/tree/main/plugins/sanity-plugin-dashboard-widget-netlify)# [This plugin has moved](https://github.com/sanity-io/plugins/tree/main/plugins/sanity-plugin-dashboard-widget-vercel)dashboard,dashboard-widget-document-list,dashboard-widget-netlify,dashboard-widget-vercel)To show artifacts inline, enable in settings.