Skip to content

feat: update @sanity/icons to v5.0.0 and update icon import paths#241

Open
ahenriksen-inferno wants to merge 15 commits into
sanity-io:mainfrom
ahenriksen-inferno:feat/sanity-icons-compat
Open

feat: update @sanity/icons to v5.0.0 and update icon import paths#241
ahenriksen-inferno wants to merge 15 commits into
sanity-io:mainfrom
ahenriksen-inferno:feat/sanity-icons-compat

Conversation

@ahenriksen-inferno

@ahenriksen-inferno ahenriksen-inferno commented Jul 9, 2026

Copy link
Copy Markdown

Description

This pull request upgrades the @sanity/icons package from version 3 to version 5 and updates all icon imports throughout the codebase to use the new explicit import paths required by the latest version. This change ensures compatibility with the updated icon package and improves tree-shaking and bundle size by importing only the icons in use.

Dependency upgrade and import updates:

  • Upgraded @sanity/icons from version 3.7.4 to 5.0.0 in pnpm-lock.yaml and pnpm-workspace.yaml, and updated dependency snapshots to reflect the new version. [1] [2] [3] [4] [5]

Codebase-wide icon import changes:

  • Updated all icon imports to use the new explicit subpath imports required by @sanity/icons@5 (e.g., import {CopyIcon} from '@sanity/icons/Copy' instead of import {CopyIcon} from '@sanity/icons') in all relevant files within packages/context/src/studio. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13]

What to review

Validate that the imports and dependency range for @sanity/icons in pnpm-workspace.yaml are correct.

Testing

No new testing was added. Build, typecheck, lint, and tests pass.

Related Issues

Closes #240

Copilot AI review requested due to automatic review settings July 9, 2026 16:13
@vercel

vercel Bot commented Jul 9, 2026

Copy link
Copy Markdown

@ahenriksen-inferno is attempting to deploy a commit to the Sanity Sandbox Team on Vercel.

A member of the Team first needs to authorize it.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR upgrades the monorepo’s @sanity/icons dependency to v5 and updates the Studio code in @sanity/context to use the v5-required explicit per-icon import subpaths, aiming to improve compatibility and tree-shaking.

Changes:

  • Bump @sanity/icons in the workspace catalog and lockfile to 5.0.0.
  • Update Studio icon imports across packages/context/src/studio/** from @sanity/icons to @sanity/icons/<IconName>.
  • Split multi-icon imports into per-icon subpath imports where needed.

Reviewed changes

Copilot reviewed 14 out of 15 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
pnpm-workspace.yaml Updates the workspace catalog to use @sanity/icons v5.
pnpm-lock.yaml Locks @sanity/icons to 5.0.0 and updates dependency snapshots.
packages/context/src/studio/plugin.ts Updates ChartUpwardIcon import to the v5 explicit subpath.
packages/context/src/studio/insights/dashboard/TextWithInfo.tsx Updates InfoOutlineIcon import to the v5 explicit subpath.
packages/context/src/studio/insights/dashboard/Table.tsx Updates arrow icon imports to explicit per-icon subpaths.
packages/context/src/studio/insights/dashboard/overview/ContentGapRow.tsx Updates ChevronRightIcon import to the v5 explicit subpath.
packages/context/src/studio/insights/dashboard/InsightsDashboard.tsx Updates multiple dashboard icon imports to explicit per-icon subpaths.
packages/context/src/studio/insights/dashboard/ErrorBlock.tsx Updates RetryIcon import to the v5 explicit subpath.
packages/context/src/studio/insights/dashboard/conversations/FilterMenu.tsx Updates filter menu icon imports to explicit per-icon subpaths.
packages/context/src/studio/insights/dashboard/conversations/ConversationMessage.tsx Updates message icon imports to explicit per-icon subpaths.
packages/context/src/studio/insights/dashboard/conversations/ConversationList.tsx Updates list icon imports (FilterIcon, SearchIcon) to explicit subpaths.
packages/context/src/studio/insights/dashboard/conversations/ConversationDetail.tsx Updates CloseIcon import to the v5 explicit subpath.
packages/context/src/studio/context-document/groq-filter-input/GroqFilterInput.tsx Replaces the grouped icon import with explicit per-icon subpath imports.
packages/context/src/studio/context-document/contextSchema.ts Updates DatabaseIcon import to the v5 explicit subpath.
packages/context/src/studio/context-document/context-document-input/ContextDocumentInput.tsx Updates CopyIcon import to the v5 explicit subpath.
Files not reviewed (1)
  • pnpm-lock.yaml: Generated file

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

Comment thread pnpm-workspace.yaml
Comment thread pnpm-lock.yaml
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.

Update @sanity/context for @sanity/[email protected] compatibility

2 participants