This PR contains the following updates:
| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| @sanity/vision (source) | ^2.29.8
-> ^3.0.0
| | | | |
| sanity-plugin-asset-source-unsplash | ^0.2.1
-> ^1.0.0
| | | | |
Release Notes
sanity-io/sanity
Compare Source
Installation and upgrading
To initiate a new Studio without installing the CLI globally:
npx create-sanity@latest
To upgrade a v3 Studio:
npm install sanity@latest
🐛 Notable bugfixes
- Fixed an issue introduced in v3.1.3 that caused the CLI to crash (#4035)
Compare Source
Installation and upgrading
To initiate a new Studio without installing the CLI globally:
npx create-sanity@latest
To upgrade a v3 Studio:
npm install sanity@latest
🐛 Notable bugfixes
- Fixes an issue that could give false validation errors for complex documents
- Hides restore action when revision is latest version
- Improves responsiveness of file and image inputs for narrow widths
- Restores transition effect when reordering primitive array values
- Fixes an issue with the vision tool causing the query param errors tooltip disappear behind the above panel
📓 Full changelog
Author | Message | Commit
------------ | ------------- | -------------
Bjørge Næss | fix(base): wait for all chunked requests to arrive before continuing (#4017) | 2134b27
Espen Hovlandsdal | chore(cli): increase chance of running post-test cleanup | f138723
Espen Hovlandsdal | test(cli): fix graphql datasets not being cleaned up | d53a589
Cody Olsen | chore: setup renovate config | ed20a79
Cody Olsen | chore: set renovate commit scope | 8ae06e5
Cody Olsen | chore(renovate): ignore examples folder | 223d31a
renovate[bot] | chore(deps): pin dependencies (#4032) | d714540
Herman Wikner | fix(desk): remove restore action when revision is latest version | 2846eec
Herman Wikner | fix(core): file/image input layout in narrow widths | 125dc41
Herman Wikner | dev(core): add files workshop | c5e8102
Bjørge Næss | chore(sanity): upgrade json5 to latest | 5d7eae6
Bjørge Næss | chore(vision): upgrade json5 to latest | 350f9ef
Bjørge Næss | fix(vision): render error tooltip in a portal | fe96da1
Herman Wikner | fix(core): add transition effect when sorting array of primitives | 71e3212
Compare Source
Installation and upgrading
To initiate a new Studio without installing the CLI globally:
npx create-sanity@latest
To upgrade a v3 Studio:
npm install sanity@latest
🐛 Notable bugfixes
- Fixed a regression with release
3.1.0
where a custom style in the portable text input would not fallback to be rendered as the normal style when a rendering-component for that style was not defined.
📓 Full changelog
Author | Message | Commit
------------ | ------------- | -------------
Per-Kristian Nordnes | fix(core/form): fix forgotten optional extension | 24805ae
Per-Kristian Nordnes | fix(form/inputs): fix component fallback behaviour | e892c62
Per-Kristian Nordnes | fix(schema): fix validator text typo | 5e4c562
Compare Source
Installation and upgrading
To initiate a new Studio without installing the CLI globally:
npx create-sanity@latest
To upgrade a v3 Studio:
npm install sanity@latest
🐛 Notable bugfixes
- Fixes an issue where
createAuthStore
would incorrectly require a client factory to be passed
- Fixes an issue where lodash was not optimized in all released Sanity packages
- Fixes an issue where disabling direct uploads when using multiple asset sources would not work
📓 Full changelog
Author | Message | Commit
------------ | ------------- | -------------
Cody Olsen | fix: ensure lodash is optimized in every monorepo package | 8494ac0
Cody Olsen | fix: apply config.form.image.directUploads
| cf52ee7
Marius Lundgård | fix: clientFactory
should be optional | d894d56
Espen Hovlandsdal | chore: temporarily skip flakey tests | b8534b1
Espen Hovlandsdal | chore: update release notes script with new instructions | afcc2f5
Espen Hovlandsdal | fix(groq): provide tsdoc for groq template literal function | f9520b2
Compare Source
Installation and upgrading
To initiate a new Studio without installing the CLI globally:
npx create-sanity@latest
To upgrade a v3 Studio:
npm install sanity@latest
✨ Highlights
Improved customization and TypeScript support for the Portable Text Input and schemas
Improved support for custom rendering of the content in the Portable Text input via .components.block
, component.inlineBlock
and .components.annotation
render callbacks for object-like schema types, references and type aliases.
While this has been possible previously by modifying the block schema locally, these customizations can now also be put directly on the various content types themselves, to be shared between different Portable Text inputs using them. For example you can now customize how an author reference would appear in various Portable Text contexts on the author schema itself.
Also text specific schema properties like decorators, styles and lists for the block type itself have slighly changed their configuration in order to better align with the rest of the studio. More info: Changes in block schema customization properties.
If you previously did customization of the editor using your own render callbacks or icons through the .blockEditor
property in the block schema, you will get a deprecation warning, but they will still continue to work until further notice.
Please refer to the documentation for how to customize the block type and the Portable Text editor for v3 of the studio.
Besides this, the Portable Text input related code and schema types have been given a TypeScript update for better type safety and developer experience.
Studio appearance
The user menu now has options to select the appearance (color scheme) of the Studio. The selected appearance is stored in local storage and is reused on the next visit.
Logo component updates
The button in the navbar that wraps the custom logo component has no padding anymore. This update is made in order to give the custom logo component full control over how big the button in the navbar should be. Therefore, the custom logo component may need to be updated in order to achieve the previous look. Below is an example of how to recreate the same result as before:
import {defineConfig} from 'sanity'
import {Box} from '@​sanity/ui'
function MyLogo() {
return (
<Box padding={3}> // <-- Wrap your custom logo with a `Box` with `padding={3}`
<CustomLogo />
</Box>
)
}
export default defineConfig({
// ... rest of config
studio: {
components: {
logo: MyLogo,
},
},
})
🐛 Notable bugfixes
- This update fixes so that the component in the root config (ie in
defineConfig
) is the component that receives the result of the props passed on with renderDefault
in previous custom components.
- Fixed an issue with custom sort orders
📓 Full changelog
Author | Message | Commit
------------ | ------------- | -------------
Bjørge Næss | fix(form): fix issue with zero being rendered as empty string in number input | 7be7511
Marius Lundgård | build: add bin
directory to distribution | a1f6e00
Herman Wikner | feat(core): update user menu with color schemes | 788d23b
Herman Wikner | feat(core): store selected color scheme i local storage | 9ce0108
Herman Wikner | fix(core): update workspace preview design | 543a0f3
Marius Lundgård | fix(config): respect unstable_clientFactory
| bcd4854
Cody Olsen | fix: optimize lodash imports (#3974) | 6c7d48d
Marius Lundgård | docs: update readme (#3987) | 88c90eb
Marius Lundgård | docs: remove ToC | 13389f5
Bjørge Næss | chore(form): replace react-sortable-hoc with dndkit (#3961) | 551c4d5
Espen Hovlandsdal | fix(cli): only require workspace name if more than 1 workspace | 743244b
Espen Hovlandsdal | feat(core): add userHasRole
utility method | cd0819f
Snorre Eskeland Brekke | fix(block-tools): ignore blocks inside list items (#3492) | 5e51831
Espen Hovlandsdal | feat(core): add new documentIdEquals
utility method | f7eb4b3
Espen Hovlandsdal | chore(vision): use react 18 compatible dependencies | 401f08a
Espen Hovlandsdal | fix(config): throw error early if tools/template resolution fails | 2f2e467
Herman Wikner | fix(core): components API execution order | 299ac06
vicbergquist | fix(desk): always use default ordering on first rendering if any and update order on sort | 663cc67
Espen Hovlandsdal | refactor(desk): remove unused default ordering option in useDocumentList
| e2209ec
Espen Hovlandsdal | fix(desk): recompute default sort order on desk structure change | 4f9a353
Espen Hovlandsdal | fix(desk): use last updated at as default sort order | d5166e5
Per-Kristian Nordnes | refactor(types): refactor Block schemas for new component extension api | dfd33ce
Per-Kristian Nordnes | refactor(types): refactor portable text types used internally in the studio | 48c03a9
Per-Kristian Nordnes | refactor(types): remove deprecated block validator Rules from v2 | 7aa1404
Per-Kristian Nordnes | refactor(schema): allow for .components in block schema + ensure that the result has a name | 5b5e878
Per-Kristian Nordnes | refactor(validation): remove deprecated block validation rule. Should be using 'Rule.custom' in v3. | 5f92213
Per-Kristian Nordnes | refactor(validation): update pt types | acc0e79
Per-Kristian Nordnes | refactor(core/form): add block and annotation component schema extensions | bbd32ae
Per-Kristian Nordnes | refactor(block-tools): use pt-types from @sanity/types | 27d5133
Per-Kristian Nordnes | refactor(form/inputs): Custom rendering support via schema for PT-input | f1152f7
Per-Kristian Nordnes | refactor(core/fields/diffs): use new types in Portable-text-diffs | b2aa1f2
Per-Kristian Nordnes | refactor(core/preview): use new types in portable-text previews | 3fd22cc
Per-Kristian Nordnes | refactor(core/form/inputs): function can now be moved out of scope | ccdc0fd
Per-Kristian Nordnes | refactor(core/form/inputs): keep using schemaType var name | a65169b
Per-Kristian Nordnes | refactor(core/form/input): use updated types for block schemas and pt render callbacks | aa3ee4e
Per-Kristian Nordnes | refactor(types/schema): support seperate inlineBlock render callback | c21a8f1
Per-Kristian Nordnes | refactor(schema): validate lists and new component for block type | afd01e2
Per-Kristian Nordnes | refactor(types): limit supported types in block types .of to objects and refs | cb867b8
Per-Kristian Nordnes | refactor(core/form): update render callback support for block types | 0902fa5
Per-Kristian Nordnes | chore: mark types required (by schemas) as @beta | edb3bd0
Per-Kristian Nordnes | refactor(portable-text-editor): update types and add render callbacks to the PTE | 6202a8c
Per-Kristian Nordnes | chore: update puppeteer to latest version | a9dc1ea
Per-Kristian Nordnes | test(portable-text-editor): update tests | 05abec0
Per-Kristian Nordnes | chore: update yarn.lock | 0590a81
Per-Kristian Nordnes | chore(portable-text-editor): mark types with availablility status | 3408962
Per-Kristian Nordnes | refactor(portable-text-editor): simplify code | 8c08f85
Per-Kristian Nordnes | refactor(portable-text-editor): rename type > schemaType | d25cbb5
Per-Kristian Nordnes | refactor(portable-text-editor): rename type > schemaType | b18716f
Per-Kristian Nordnes | feature(schema): backward compatibility for breaking changes in block schema | c323b12
Bjørge Næss | fix(schema): add help id to blockeditor schema warnings | 8d74ace
Herman Wikner | feat(core): move padding from LogoButton
to StudioLogo
| d774bc6
Herman Wikner | dev(test-studio): update custom logo component | bb61fa1
Marius Lundgård | fix: pass readOnly
to select element (#3900) | f70736f
Compare Source
Compare Source
Compare Source
Compare Source
Compare Source
Sanity Studio v3
This is the release of the stable, production-ready version the new major version (v3) of Sanity Studio. It deprecates Studio v2 and earlier versions. Studio v3 brings new features for content creators and developers, as well as a completely rewritten studio customization framework.
High-level improvements
- The Parts system is deprecated and replaced with a new studio customization framework
- Custom webpack tooling is replaced with Vite
- Sanity Studio now ships as a single npm dependency (
[sanity](https://www.npmjs.com/package/sanity)
) with JavaScript-based configuration (sanity.config.js|ts
/ sanity.cli.js|ts
)
- The Studio module also has full ECMAScript Modules (ESM) support and CommonJS fallback and can be run in all modern browsers without bundling and embedded in any web project
- Full TypeScript coverage with annotated APIs (
@internal
, @beta
, @public
), new helper functions (defineType,defineField
), and emerging inline documentation with TS Doc
- Better abstractions for wrapping and composing Studio and Form Components with
renderDefault(props)
and other convenience functions.
- New Plugins API with plugin development tooling (
plugin-kit
) that makes it easier to build, maintain, and publish plugins on npm
- New Studio v3 templates that let you get up and running with best practices
Learn more about Studio v3
Compare Source
Compare Source
sanity-io/sanity-plugin-asset-source-unsplash
Compare Source
Bug Fixes
Compare Source
Bug Fixes
- docs: formBuilder.image.assetSource should be form.image.assetSource (36991e6)
- vertically center unsplash logo (dfa2612)
Compare Source
Bug Fixes
- deps: sanity ^3.0.0 (works with rc.3) (2c4b6de)
Compare Source
BREAKING CHANGES
- No longer works in Studio V3
0.2.2 (2022-05-05)
Features
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
👻 Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.
- [ ] If you want to rebase/retry this PR, check this box
This PR has been generated by Mend Renovate. View repository job log here.