[Release] v0.4.0#3
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Pull request overview
Release v0.4.0 primarily expands the sanity-plugin-structure-tool configuration surface (menu actions/groups, visibility gating, parent/child titles) and refactors the internal structure rendering pipeline to support these features, alongside documentation and version bumps across the monorepo.
Changes:
- Add
menuItems/menuItemGroups(withprevsupport),isVisible, and parent/childtitlesupport to list item definitions. - Refactor structure rendering: replace the old workspace-list-item expansion with a centralized
renderListItemspipeline and per-item renderers. - Update docs, changelog, and package versions for the 0.4.0 release (plus workspace/tooling bumps).
Reviewed changes
Copilot reviewed 76 out of 77 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| pnpm-workspace.yaml | Bump catalog dep and adjust pnpm workspace settings. |
| packages/sanity-plugin-structure-tool/src/utils/string/common.ts | Add JSDoc for string utilities. |
| packages/sanity-plugin-structure-tool/src/types/lib.types.ts | Add JSDoc for shared utility types. |
| packages/sanity-plugin-structure-tool/src/types/index.ts | Adjust exported public types. |
| packages/sanity-plugin-structure-tool/src/structure/types/listItemDefinitions.types.ts | New shared list-item definition types (children/id/title/workspaces/roles/etc.). |
| packages/sanity-plugin-structure-tool/src/structure/types/listItemCore.types.ts | Remove old workspaces/roles core type definitions (moved/refactored). |
| packages/sanity-plugin-structure-tool/src/structure/types/listItem.types.ts | Expand list item core config (menu items/groups, isVisible, title object, etc.). |
| packages/sanity-plugin-structure-tool/src/structure/types/common.types.ts | Add shared types (common params, ListItemReturn, helpers for generic params). |
| packages/sanity-plugin-structure-tool/src/structure/templates/templates.types.ts | Refine/export template parameter types and JSDoc. |
| packages/sanity-plugin-structure-tool/src/structure/templates/templates.ts | Refactor templates resolver to use flattened list items. |
| packages/sanity-plugin-structure-tool/src/structure/structureToolPlugin/structureToolPlugin.types.ts | Expand and document plugin parameter/type model. |
| packages/sanity-plugin-structure-tool/src/structure/structureToolPlugin/structureToolPlugin.ts | Add JSDoc and internal generic defaults typing. |
| packages/sanity-plugin-structure-tool/src/structure/structure/structure.types.ts | Simplify structure params typing and integrate plugin params type. |
| packages/sanity-plugin-structure-tool/src/structure/structure/structure.ts | Refactor root structure resolver to use renderListItems. |
| packages/sanity-plugin-structure-tool/src/structure/renderListItems/renderListItems.types.ts | New types for the centralized list-item render pipeline. |
| packages/sanity-plugin-structure-tool/src/structure/renderListItems/renderListItems.ts | New centralized list-item rendering + access checks + renderer dispatch. |
| packages/sanity-plugin-structure-tool/src/structure/renderListItem/renderListItem.types.ts | Remove old single-item renderer types (replaced by new pipeline). |
| packages/sanity-plugin-structure-tool/src/structure/renderListItem/renderListItem.ts | Remove old single-item renderer implementation (replaced by new pipeline). |
| packages/sanity-plugin-structure-tool/src/structure/listItems/listItems.types.ts | New shared “list item key” param typing for renderer functions. |
| packages/sanity-plugin-structure-tool/src/structure/listItems/getSingleton.ts | New renderer for singleton items. |
| packages/sanity-plugin-structure-tool/src/structure/listItems/getRaw.ts | New renderer for raw items. |
| packages/sanity-plugin-structure-tool/src/structure/listItems/getListing.ts | New renderer for schemaType listings (menu items/groups support). |
| packages/sanity-plugin-structure-tool/src/structure/listItems/getFilters.ts | New renderer for GROQ-filtered lists (menu items/groups support). |
| packages/sanity-plugin-structure-tool/src/structure/listItems/getDivider.ts | New renderer for divider items. |
| packages/sanity-plugin-structure-tool/src/structure/listItems/getComponent.ts | New renderer for component items (menu items/groups support). |
| packages/sanity-plugin-structure-tool/src/structure/listItems/getChildren.ts | New renderer for nested children/folder items (recursive). |
| packages/sanity-plugin-structure-tool/src/structure/getWorkspaceListItem/getWorkspaceListItem.types.ts | Remove old workspace list item expansion types (replaced by access helpers + new pipeline). |
| packages/sanity-plugin-structure-tool/src/structure/getWorkspaceListItem/getWorkspaceListItem.ts | Remove old workspace list item expansion logic (replaced by new pipeline). |
| packages/sanity-plugin-structure-tool/src/structure/getComputedListItems/getComputedListItems.types.ts | Remove old computed-list-items typing (replaced/moved). |
| packages/sanity-plugin-structure-tool/src/structure/getComputedListItems/getComputedListItems.ts | Remove old computed-list-items implementation (replaced/moved). |
| packages/sanity-plugin-structure-tool/src/helpers/hasWorkspacesAccess.ts | New workspace-based access evaluation helper. |
| packages/sanity-plugin-structure-tool/src/helpers/hasRolesAccess.ts | New role-based access evaluation helper. |
| packages/sanity-plugin-structure-tool/src/helpers/getWorkspacesWithDefaults.ts | Remove old helper (superseded by new access helper). |
| packages/sanity-plugin-structure-tool/src/helpers/getValidListItem.ts | Add JSDoc for config-value resolution helper. |
| packages/sanity-plugin-structure-tool/src/helpers/getTitle.ts | New helper for resolving parent/child titles. |
| packages/sanity-plugin-structure-tool/src/helpers/getRolesWithDefaults.ts | Remove old helper (superseded by new access helper). |
| packages/sanity-plugin-structure-tool/src/helpers/getFlatListItems.ts | Rename/refactor list-item flattening helper + JSDoc. |
| packages/sanity-plugin-structure-tool/src/helpers/getDisplayTitle.ts | New helper for computed display titles (pluralization + schema fallback). |
| packages/sanity-plugin-structure-tool/src/helpers/getCurrentUserRoles.ts | Tighten types and add JSDoc around current-user role extraction. |
| packages/sanity-plugin-structure-tool/src/helpers/getContextValues.ts | Add JSDoc for context normalization helper. |
| packages/sanity-plugin-structure-tool/src/helpers/getComputedListItems.ts | New computed-value resolver for list item config fields. |
| packages/sanity-plugin-structure-tool/src/helpers/generateId.ts | New helper for consistent list-item ID generation. |
| packages/sanity-plugin-structure-tool/src/factories/helpers/singletonHelper.ts | Update helper typings to new list item core/definitions + add JSDoc. |
| packages/sanity-plugin-structure-tool/src/factories/helpers/rawHelper.ts | Update helper typings to new list item core/definitions + add JSDoc. |
| packages/sanity-plugin-structure-tool/src/factories/helpers/listingHelper.ts | Update helper typings for new list item fields (menu items/groups, isVisible, etc.). |
| packages/sanity-plugin-structure-tool/src/factories/helpers/index.ts | Add JSDoc and reflect expanded helper set. |
| packages/sanity-plugin-structure-tool/src/factories/helpers/filtersHelper.ts | Update helper typings to new list item core/definitions + add JSDoc. |
| packages/sanity-plugin-structure-tool/src/factories/helpers/dividerHelper.ts | Update divider helper typing model + add JSDoc. |
| packages/sanity-plugin-structure-tool/src/factories/helpers/componentHelper.ts | Update component helper typing model (title object, menu items/groups, etc.). |
| packages/sanity-plugin-structure-tool/src/factories/helpers/childrenHelper.ts | Update children helper typing model (nested lists + menu items/groups + isVisible). |
| packages/sanity-plugin-structure-tool/src/factories/defineListItems.ts | Add JSDoc for list-items factory helper. |
| packages/sanity-plugin-structure-tool/src/factories/defineListItem.ts | Add JSDoc for list-item factory helper. |
| packages/sanity-plugin-structure-tool/src/constants/export.ts | Add JSDoc for exported constants. |
| packages/sanity-plugin-structure-tool/src/constants/constants.ts | Expand constants (unique id seed) + add JSDoc. |
| packages/sanity-plugin-structure-tool/src/constants/common.ts | Add JSDoc for action-name constants. |
| packages/sanity-plugin-structure-tool/src/actions/SingletonAction.ts | Add richer JSDoc around singleton document action filtering. |
| packages/sanity-plugin-structure-tool/package.json | Bump to 0.4.0, expand Sanity peer range, adjust inlined deps. |
| package.json | Bump repo version + tooling versions (pnpm, lint-staged). |
| docs/package.json | Bump docs package + dep versions. |
| docs/introduction/upcoming-features.md | Update upcoming-features list for shipped items. |
| docs/guide/list-items.md | Document new list item props (menu items/groups, isVisible). |
| docs/examples/title.md | Document new parent/child title object format. |
| docs/examples/menu-items.md | New docs example for menuItems. |
| docs/examples/menu-item-groups.md | New docs example for menuItemGroups. |
| docs/examples/is-visible.md | New docs example for isVisible. |
| docs/.vitepress/config.ts | Update nav links for new docs pages; adjust plugin usage. |
| configs/typescript-config/package.json | Bump to 0.4.0. |
| configs/tsdown-config/package.json | Bump to 0.4.0. |
| configs/prettier-config/package.json | Bump to 0.4.0. |
| configs/lint-staged-config/package.json | Bump to 0.4.0. |
| configs/eslint-config/package.json | Bump to 0.4.0. |
| CHANGELOG.md | Add 0.4.0 release notes. |
| apps/studio/src/structure/listItems.ts | Update reference studio examples to cover new capabilities. |
| apps/studio/sanity.cli.ts | Adjust Sanity CLI Vite config (tsconfig paths). |
| apps/studio/package.json | Bump studio + deps (Sanity v6, styled-components, etc.). |
| .agents/AGENTS.md | Add guidance to keep docs and types synchronized + JSDoc expectations. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
0.4.0 (2026-06-25)
🚀 Features
menuItemsand collapsible sections viamenuItemGroupsin pane header menus.menuItemsandmenuItemGroupswith access to aprevparameter containing default items from Sanity Studio.isVisibleconfiguration option (boolean or callback) to dynamically hide/show list items.parentandchilddisplay titles in thetitleoption (usingtitle: { parent: ..., child: ... }).menuItems,menuItemGroups,isVisible, and the parent/child pane title configuration format.