Home / Companies / Sanity / Blog / Post Details
Content Deep Dive

Obvious features aren't obviously made

Blog post from Sanity

Post Details
Company
Date Published
Author
Rico Kahler
Word Count
1,868
Language
English
Hacker News Points
-
Summary

References in Place, a feature introduced in Sanity Studio v2.23.0, enables users to create references to new documents inline without needing to leave the current document, significantly enhancing content connectivity. This feature, initially intended for the platform's original release, faced challenges due to Sanity's data integrity model, which previously allowed referencing only published documents. The breakthrough came with the concept of weak references, allowing draft documents to be referenced without breaking the assumption of document validity. Weak references enable referencing by the _id of the prospective published document, which does not yet exist, thus maintaining data integrity. During publication, these references are strengthened, restoring all data integrity safeguards. Although overcoming these technical hurdles took over three years, the implementation of References in Place also demanded updates to interaction design, user interface, and validation processes, ensuring a seamless and intuitive user experience. The development involved meticulous adjustments to handle draft references, update validation frameworks, and refine interaction design, ultimately resulting in a robust feature that preserves Sanity's data integrity principles while offering enhanced flexibility and efficiency.