Closed evenwestvang closed 2 years ago
Here's an example. It's from the CMS - Statamic.
Basically, every relationship can open in a drawer. Every relationship will overlap the previous, in case there's nested relationships.
Direct link for screenshot https://statamic.com/img/content/screenshots/cp-stacks.jpg
Expanding upon the workaround suggested by @fvieira another option would be to use the IntentLink part to open the entity creation form in a new window. UX would definitely be better inline but this does the job until Sanity complete the design overhaul mentioned by @pawelngei.
import { IntentLink } from "part:@sanity/base/router";
....
{
title: "Employees",
name: "employees",
type: "array",
description: (
<>
Employees must first be{" "}
<IntentLink
intent="create"
params={{ type: "Person" }}
target="_blank"
>
created and published
</IntentLink>{" "}
before they can be referenced here.
</>
),
options: {
sortable: false,
},
of: [
{
type: "reference",
to: [{ type: "Person" }],
},
],
},
Sanity is the cream of the crop when it comes to CMSs.
I thought surely that I was missing something with my implementation when I couldn't find my referenced documents in the default list, but never imagined that the feature simply didn't exist out of the box. Given that, I too would like to add my fervent support for this feature.
Allowing for automation CRUD of nested reference objects is the ultimate "Don't make me think" approach for devs and users alike. By adding this one (seemingly) obvious and wildly popular feature, you'll make a lot of people happy and encourage even more widespread adoption.
So in summary, +1!
Justin
This feature is one that will elevate the experience significantly for the non-devs who use the Studio to create content.
+1 from me for this feature. PLEASE. :)
Surely there's a proper workaround for this?
Hi all!
Thanks for all your feedback and enthusiasm for this feature. We wholeheartedly agree that it's super useful and will elevate the user experience of working with structured and connected content. It has also been a complex problem to tackle. We know this because we are currently in the last stages of building this very feature for y'all 😄
We're looking forward to releasing it in the near future.
Released in v2.23.0!
🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉
Users need to be able to create the new document being referenced from within the document that is doing the referencing.