Skip to content

feat: fold orderable-document-list into monorepo#908

Open
Copilot wants to merge 136 commits into
mainfrom
copilot/fold-orderable-document-list
Open

feat: fold orderable-document-list into monorepo#908
Copilot wants to merge 136 commits into
mainfrom
copilot/fold-orderable-document-list

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 27, 2026

Folds @sanity/orderable-document-list from its standalone repository into this monorepo.

Changes

  • Subtree-imported the plugin source at ea04e91b
  • Replaced standalone package config with monorepo-compatible package.json, tsconfig.json, tsconfig.build.json, package.config.ts, and vitest.config.ts
  • Fixed lint errors and type issues to conform to monorepo rules
  • Added the plugin to dev/test-studio for local development
  • Added a changeset for the initial monorepo release
  • Updated root README.md and CODEOWNERS to include the plugin
  • Fixed typo: MaifestArgsManifestArgs

SimeonGriggs and others added 30 commits September 28, 2021 14:19
fix scrolling, stacking and disable unordered documents
fix: add `type` to the dependency list of data loading hook
fixes missing 'compose' button in Pane
prevent re-renders on document open + reduce queried data
highlight duplicate orders, change click handling
add key to force a re-render when switching between items
Copilot AI changed the title Remove .github folder fix: restore .github folder incorrectly deleted from monorepo May 27, 2026
@bjoerge bjoerge changed the title fix: restore .github folder incorrectly deleted from monorepo feat: fold orderable-document-list into monorepo May 27, 2026
@bjoerge bjoerge force-pushed the copilot/fold-orderable-document-list branch from 21acc4c to f2e9dfd Compare May 27, 2026 14:58
@bjoerge
Copy link
Copy Markdown
Member

bjoerge commented May 27, 2026

@copilot fix the knip issues

Copy link
Copy Markdown
Contributor Author

Copilot AI commented May 27, 2026

@copilot fix the knip issues

Fixed in 3 places (commit fix(@sanity/orderable-document-list): fix knip issues):

  • Removed export from unused SchemaContext type in orderRankField.ts
  • Removed export from unused ManifestArgs interface in reorderDocuments.ts
  • Removed babel-plugin-styled-components from ignoreDependencies for this workspace in knip.jsonc (it's not a dependency of this plugin)

pnpm knip now exits with code 0.

@bjoerge
Copy link
Copy Markdown
Member

bjoerge commented May 27, 2026

@copilot also fix the lint errors

Copy link
Copy Markdown
Contributor Author

Copilot AI commented May 27, 2026

@copilot also fix the lint errors

Fixed — deleted the unused SchemaContext type (and its ConfigContext import) from orderRankField.ts, and deleted the unused ManifestArgs interface from reorderDocuments.ts. pnpm lint now passes with 0 errors.

Copilot AI and others added 2 commits May 27, 2026 17:56
Adds a dedicated workspace that demonstrates the orderable list UI via
orderableDocumentListDeskItem in a custom structure, alongside a second
orderableProject schema type for a richer demo.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@bjoerge bjoerge force-pushed the copilot/fold-orderable-document-list branch from a7eeaaa to cde3f93 Compare May 27, 2026 15:56
@bjoerge bjoerge marked this pull request as ready for review May 27, 2026 16:03
Copilot AI review requested due to automatic review settings May 27, 2026 16:03
@bjoerge bjoerge requested a review from a team as a code owner May 27, 2026 16:03
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Folds the standalone @sanity/orderable-document-list plugin into this monorepo, replacing standalone tooling with monorepo equivalents and wiring it into dev/test-studio, root README, CODEOWNERS, Changesets, and Knip. Behavior is the migrated upstream code (LexoRank-based drag/drop ordering, perspective-aware dedupe) adjusted to satisfy monorepo lint/type rules.

Changes:

  • Imports plugin source under plugins/@sanity/orderable-document-list/ with monorepo package.json, tsconfig*.json, package.config.ts, and vitest.config.ts.
  • Integrates the plugin into dev/test-studio via a new workspace and a kitchen-sink entry.
  • Adds Changeset (major), root README row, CODEOWNERS rule, and Knip workspace entry.

Reviewed changes

Copilot reviewed 48 out of 49 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
README.md Adds @sanity/orderable-document-list row to Current Plugins.
pnpm-lock.yaml Lockfile updates for new workspace and resolved transitive graphs.
plugins/@sanity/orderable-document-list/vitest.config.ts Inlines vitest-package-exports for export tests.
plugins/@sanity/orderable-document-list/tsconfig.json Extends repo check.json.
plugins/@sanity/orderable-document-list/tsconfig.build.json Extends repo build.json, disables isolated declarations.
plugins/@sanity/orderable-document-list/src/types.ts Shared SanityDocumentWithOrder and NewItemPosition types.
plugins/@sanity/orderable-document-list/src/OrderableDocumentList.tsx Class component exposing resetOrder/showIncrements action handlers.
plugins/@sanity/orderable-document-list/src/OrderableContext.ts Context for showIncrements flag.
plugins/@sanity/orderable-document-list/src/index.ts Public API barrel.
plugins/@sanity/orderable-document-list/src/index.test.ts Snapshot-based package exports test.
plugins/@sanity/orderable-document-list/src/helpers/resetOrder.ts Recomputes LexoRank for every doc and commits async.
plugins/@sanity/orderable-document-list/src/helpers/reorderDocuments.ts Computes new ranks/patches for drag-and-drop.
plugins/@sanity/orderable-document-list/src/helpers/query.ts Perspective-aware GROQ for the listening query.
plugins/@sanity/orderable-document-list/src/helpers/parseOrderRank.ts Safe LexoRank parser with fallback.
plugins/@sanity/orderable-document-list/src/helpers/initialRank.ts Computes initial rank from neighbor.
plugins/@sanity/orderable-document-list/src/helpers/getFilteredDedupedDocs.ts Dedupes drafts/published/version docs by perspective.
plugins/@sanity/orderable-document-list/src/helpers/constants.ts ORDER_FIELD_NAME and API_VERSION.
plugins/@sanity/orderable-document-list/src/helpers/client.ts useSanityClient with current perspective stack.
plugins/@sanity/orderable-document-list/src/helpers/tests/*.test.ts Vitest coverage for helpers and dedupe behavior.
plugins/@sanity/orderable-document-list/src/fields/orderRankOrdering.ts Sort ordering by orderRank.
plugins/@sanity/orderable-document-list/src/fields/orderRankField.ts Hidden/read-only field definition with initial-value GROQ.
plugins/@sanity/orderable-document-list/src/DraggableList.tsx Drag-and-drop list, multi-select, patch transaction (sync).
plugins/@sanity/orderable-document-list/src/DocumentListWrapper.tsx Schema validation + OrderableContext provider.
plugins/@sanity/orderable-document-list/src/DocumentListQuery.tsx Listening query, loading/error/empty states.
plugins/@sanity/orderable-document-list/src/Document.tsx Row preview with status indicator and increment buttons.
plugins/@sanity/orderable-document-list/src/desk-structure/orderableDocumentListDeskItem.ts Structure builder list item rendering OrderableDocumentList.
plugins/@sanity/orderable-document-list/package.json Monorepo-compatible package manifest.
plugins/@sanity/orderable-document-list/package.config.ts pkg-utils config with React Compiler + styled-components.
plugins/@sanity/orderable-document-list/CHANGELOG.md Imported historical changelog.
plugins/@sanity/orderable-document-list/.releaserc.json Leftover semantic-release config from standalone repo.
plugins/@sanity/orderable-document-list/.prettierrc / .prettierignore Leftover Prettier config.
plugins/@sanity/orderable-document-list/.npmignore Leftover npm ignore.
plugins/@sanity/orderable-document-list/.husky/* Leftover husky hooks.
plugins/@sanity/orderable-document-list/.gitignore / .editorconfig Leftover repo-level configs.
plugins/@sanity/orderable-document-list/.github/workflows/main.yml Leftover standalone CI workflow.
plugins/@sanity/orderable-document-list/.eslintrc / .eslintignore Leftover ESLint config (repo uses oxlint).
knip.jsonc Adds Knip workspace entry.
dev/test-studio/src/orderable-document-list/index.tsx Example schemas/structure for test studio.
dev/test-studio/sanity.config.ts Registers new workspace and adds plugin to kitchen-sink.
dev/test-studio/package.json Adds workspace dependency.
.github/CODEOWNERS Assigns plugin path to Studio team.
.changeset/orderable-document-list-monorepo.md Major changeset describing breaking changes.
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +1 to +4
{
"extends": "@sanity/semantic-release-preset",
"branches": ["main", {"name": "studio-v2", "channel": "studio-v2", "range": "0.x.x"}]
}
"sanity",
"sanity-plugin"
],
"homepage": "https://github.com/sanity-io/plugins/tree/main/plugins/@sanity/orderable-document-list#readme",
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.