You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* docs: fix schema.md icon examples for @sanity/icons v5 subpath imports
@sanity/icons v5 (pulled in transitively by sanity ^6.7.0) removed named
icon exports from the package root; only the icons map and Icon component
remain there, with named icons moved to per-icon subpaths. The root's
type declarations still declare the old names (as `never`, with a
deprecation note), so the old import style type-checks but crashes
Sanity Studio at runtime.
Update schema.md's icon import example and content-type table to use
the v5 subpath style (e.g. `@sanity/icons/DocumentText`) so agents
following this skill don't ship a working build that crashes in the
browser.
* docs: fix @sanity/icons v5 subpath imports in localization, page-builder, seo refs
Same broken root-import pattern fixed in schema.md: @sanity/icons v5
removed named icon exports from the package root, so the old
`import { XIcon } from '@sanity/icons'` style type-checks but crashes
Sanity Studio at runtime. Update the icon import examples in
localization.md, page-builder.md, and seo.md to the v5 per-icon
subpath style (e.g. `@sanity/icons/Home`).
* docs: trim icon-import explanation to the code examples
The mechanism paragraph explained internals an agent never acts on, and
claimed the bad import "crashes Studio at runtime". It doesn't — Vite
and esbuild both fail the bundle with `"DocumentTextIcon" is not
exported by @sanity/icons`, so `sanity build` errors immediately.
Keep the ✅/❌ pair and the table's Import column (the parts that change
behavior), and correct the failure mode in the ❌ comment.
---------
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Rune Botten <rbotten@gmail.com>
@@ -114,17 +114,26 @@ Every item in a Sanity array automatically gets a `_key` property. This is **cri
114
114
### B. Icons
115
115
Always assign an icon from `@sanity/icons` to documents and objects. This improves the Studio UX significantly. Browse all icons at [icons.sanity.build](https://icons.sanity.build/all).
116
116
117
-
| Content Type | Icon |
118
-
|--------------|------|
119
-
| Article, Post |`DocumentTextIcon`|
120
-
| Author, Person |`UserIcon`|
121
-
| Category, Tag |`TagIcon`|
122
-
| Settings |`CogIcon`|
123
-
| Page |`DocumentIcon`|
124
-
| Image block |`ImageIcon`|
125
-
| Video block |`PlayIcon`|
126
-
| FAQ |`HelpCircleIcon`|
127
-
| Link |`LinkIcon`|
117
+
```typescript
118
+
// ✅ Correct — import each icon from its own subpath
0 commit comments