sanity icon indicating copy to clipboard operation
sanity copied to clipboard

Bug: Creating a new document redirects to structure root.

Open KwehDev opened this issue 3 years ago • 3 comments

Describe the bug

I have the following structure currently;

StructureBuilder.list().title('ContentSanity').items([Goals, ...]);

const Goals = StructureBuilder.listItem()
  .title('Goals')
  .icon(GiCheckboxTree)
  .child(
    StructureBuilder.documentTypeList('audience')
      .title('Audiences')
      .child((audienceId) => {
        return StructureBuilder.documentList()
          .filter("_type == 'goal' && references($audienceId)")
          .params({ audienceId })
          .title('Goals (V3)');
      })
  );

This gives me a Sanity Structure called Goals as a root item, which lists various audiences. Upon clicking any audience, I am given a list of Goals for that audience. In this tab, if I then click on 'Create', the editor interface appears with the correct schema I would expect, however I lose context of which pane I am in. This is identical in appearance to the issue reported in #1693.

Expected behavior

The URL & Pane context to stay consistent.

Screenshots I can't provide screenshots, though they are identical in behavior in the linked issue.

Which versions of Sanity are you using?

❯ sanity versions
@sanity/cli             2.22.0 (latest: 2.24.0)
@sanity/base            2.23.3 (latest: 2.24.0)
@sanity/components      2.14.0 (up to date)
@sanity/core            2.23.2 (latest: 2.24.0)
@sanity/default-layout  2.23.3 (latest: 2.24.0)
@sanity/default-login   2.23.2 (latest: 2.24.0)
@sanity/desk-tool       2.23.4 (latest: 2.24.0)
@sanity/vision          2.23.3 (latest: 2.24.0)

What operating system are you using?

MacOS Monterey

Which versions of Node.js / npm are you running?

❯ npm -v && node -v
8.1.0
v16.13.0

Additional context

Add any other context about the problem here.

Security issue?

Any security issues should be submitted directly to [email protected]. In order to determine whether you are dealing with a security issue, ask yourself these two questions:

  • Can I access something that's not mine, or something I shouldn't have access to?
  • Can I disable something for other people? If the answer to either of those two questions are "yes", then you're probably dealing with a security issue. Note that even if you answer "no" to both questions, you may still be dealing with a security issue, so if you're unsure, just email us at [[email protected]](mailto:[email protected].

KwehDev avatar Jan 14 '22 14:01 KwehDev

I'm having the same issue, did you find a way to prevent this?

josehernandezv avatar Apr 16 '22 01:04 josehernandezv

I'm having the same issue, did you find a way to prevent this?

Not yet, unfortunately. It isn't really a priority for us, so we'll probably live with it until there's an official fix.

KwehDev avatar Apr 27 '22 06:04 KwehDev

Did you find any solution for this? @josehernandezv @KwehDev

froydis98 avatar Sep 08 '22 09:09 froydis98

Hi!

We are currently working on improving our workflows and follow-up on our open GitHub repository. In that work, we have decided to close most issues older than the release of Sanity Studio v3.

We value your feedback, so if this issue is still important to you and relevant for Sanity Studio v3, please search for relevant open issues. If you can’t find any, open a new one and link to relevant comments in this thread. For questions about how to do something, please post them in the slack community.

kmelve avatar Jan 11 '23 20:01 kmelve