npm @sanity/vision 3.26.0
v3.26.0

latest releases: 3.64.0, 2.36.6, 2.36.4...
9 months ago

Installation and upgrading

To initiate a new Studio without installing the CLI globally:

  npm create sanity@latest

To upgrade a v3 Studio, run this command in its folder:

  npm install sanity@latest

✨ Highlights

Deprecation support for Documents and Fields

This release introduces the option to mark document and field types as deprecated. This can be used to gently steer Studio users towards updated schemas or to phase out legacy fields without abrupt changes.

export const deprecatedDocument = defineType({
  name: 'deprecatedDocument',
  title: 'Deprecated Document',
  type: 'document',
  deprecated: {
    reason: 'Use the Author document type instead',
  },
  fields: [
    defineField({
      name: 'title',
      type: 'string',
      deprecated: {
        reason: 'This field was used in a legacy system and is no longer used.',
      },
    }),
  ],
})

Deprecation example

When a field or document is deprecated, an informative message will appear in the Studio, clearly indicating the recommended action to take. This aids in maintaining a clean and up-to-date content structure.

Bonus: Deprecation messages now appear in the GraphQL schema, providing clarity during transitions. Deprecated document types and fields should be appropriately treated in documentation and tooling.

Reactions to Comments

This release also introduces a new layer of interactivity in the Studio with the ability for users to react to comments! 🎉

Far be it from us to speak ill of verbose and precise communication using full sentences, but sometimes you just want to express a sentiment quickly with a 🚀 or a 👍 and Sanity Studio now has you covered for those occasions. Streamline feedback processes and consensus building, and make your Studio a more vibrant collaborative space in one fell swoop with comment reactions. 🎩

Comments Reactions Screenshot

🐛 Notable bugfixes

  • Enhances user experience in the Studio by adding localized browser document titles and correcting unlocalized strings, accommodating users who prefer languages other than English.
  • Fixes an issue where number-like string flags passed to CLI commands were parsed as numbers by the option parser, leading to truncation of large integer-only document IDs and similar.
  • Resolves a restoration issue with the token login method ensuring the active session is retained post webpage reloads when cookieless auth is in effect.
  • Enhances UI components consistency in tooltips and delay groups for better UX.
  • Fixes a performance issue by re-applying useMemo on DocumentPaneContext values, reducing unnecessary re-renders and improving document pane performances.
  • Ensures that errors in the useFeatureEnabled hook result in an empty features list rather than disruptive error toasts; this minimizes user interruption when feature availability checks fail.
  • Fixes multiple bugs in the sanity documents validate CLI command relating to visibility, unnecessary validation reports, reference checks batch processing, and unknown field validation for images and file types.
  • Improves spacing between the published date and the last updated date in the document status bar for better readability.

📓 Full changelog

Author Message Commit
Tommy Petty fix(cli): always treat arguments without options as strings (#5500) 9ca1cd0
Espen Hovlandsdal feat(i18n): add i18n resources for browser document title (#5477) fb4eb68
Herman Wikner refactor(core): grants permission logic (#5299) dfebba6
Espen Hovlandsdal test(structure): fix document title test d9cc636
Binoy Patel test(structure): update StructureTitle tests (#5518) 840ac3e
Ash fix(core): token login method session restoration (#5497) ae44bc7
Pedro Bonamin fix(ui-components): add TooltipDelayGroupProvider to ui-components (#5514) 030780a
Espen Hovlandsdal fix(desk): correct import from @sanity/structure to sanity/structure e644633
Espen Hovlandsdal chore(deps): bump minimum version of @sanity/logos to latest 7c20321
Tommy Petty chore(core): updated pull request template to emphasize testing (#5519) b1c55d8
Herman Wikner feat(comments): implement reactions (#5409) 8c140be
Cody Olsen fix(deps): update dependency @sanity/presentation to v1.6.1 (#5526) 6dbacea
ecospark[bot] chore(deps): dedupe yarn.lock (#5527) 8fab227
Robin Pyon fix(cli): upgrade templates to use @sanity/ui@2 (#5528) 8c3d46a
Binoy Patel chore(deps): remove pretty-quick packages and fix formatting action (#5511) 9b3eae9
Espen Hovlandsdal refactor: colocate duplicate type + value imports (#5515) 9795480
Cody Olsen fix(performance): add back useMemo on DocumentPaneContext value (#5458) bd141cd
Cody Olsen fix(deps): update dependency @sanity/presentation to v1.7.0 (#5537) 88ab3ad
Herman Wikner fix(core): error handling in useFeatureEnabled (#5538) 08eb76c
Rico Kahler fix(cli): misc sanity documents validate fixes (#5521) 475981d
Espen Hovlandsdal fix(i18n): import i18n utils from relative path/sanity module (#5546) e536d23
Espen Hovlandsdal fix(structure): fix unintended import from @sanity/ui-workshop (#5545) 0e18aa9
Tommy Petty fix(i18n): missing translation on document inspector close button (#5520) 39babbf
Bjørge Næss feat(core): add telemetry scaffolding to Studio (#5503) 66b88f7
Bjørge Næss Revert "fix(i18n): import i18n utils from relative path/sanity module (#5546)" bdfb913
Bjørge Næss chore(codeowners): add growth team as owners of telemetry definitions (#5525) aa62661
Robin Pyon chore: add ui component workshop stories, simplify internal tab component (#5549) 657c6e5
Binoy Patel feat(core): schema and field deprecation (#5489) f7c2417
Robin Pyon fix: increase space between published date and last updated date (#5548) 1d0bac9
Pedro Bonamin chore(telemetry): track expand and collapse pte actions (#5523) 0f8e1a2

Don't miss a new vision release

NewReleases is sending notifications on new releases.