sanity-io / sanity

Sanity Studio – Rapidly configure content workspaces powered by structured content
https://www.sanity.io
MIT License
5.32k stars 429 forks source link

Integrating external user feedback as studio comments and/or tasks on documents #7610

Open vildeserina opened 1 month ago

vildeserina commented 1 month ago

Is your feature request related to a problem? Please describe. Currently, there's no straightforward way for external users to add comments or tasks directly to Sanity documents via a webpage, which can then be easily accessed within the Sanity Studio.

This limitation makes it difficult to gather and manage user feedback and suggestions efficiently, forcing users to use less integrated methods like email. It also complicates the content revision process as feedback and task requests aren't directly associated with the relevant content in the Studio.

Describe the solution you'd like I'd like a feature that allows:

  1. External users to submit comments or create tasks on a webpage associated with a specific Sanity document, as an anonymous user.

  2. These comments and tasks to be integrated seamlessly with the existing Tasks and Comments features in Sanity Studio, direclty attached to the relevant Sanity document.

  3. Easy access and management of these comments and tasks within the Sanity Studio, alongside the document they relate to.

Describe alternatives you've considered

  1. Try to achieve this with the existing API, but it doesn't seem like this is possible or intended to be possible? And the documentation for querying comments is confusing to me now.

  2. Adding comments and tasks as fields to the existing documents, which complicates the document structure and version control.

  3. Creating separate comment and task documents and linking them to the main documents, which adds complexity to querying and management, and creates an unecessary amount documents.

  4. Using external commenting and task management systems, which lack integration with Sanity Studio.

Additional context This feature would significantly improve the feedback loop between content creators and users. It would allow for more contextual content revisions and task creation, as feedback and requests would be directly associated with specific documents in the Studio.

This integration would streamline the process of gathering, reviewing, and acting on user feedback and suggestions, enhancing both user engagement and content quality.

It could also be used for user testing! Which would be kinda genius for us.

The ideal implementation would be simple to set up and use, requiring minimal changes to existing workflows while providing powerful new capabilities for user interaction and content management. It would respect the existing permissions structure for tasks and comments, ensuring that external users' input is appropriately managed and visible only to those with the correct permissions.

This feature would be particularly valuable for projects on the Growth plan and up, aligning with the current availability of the Tasks and Comments features. It would extend the collaborative capabilities of Sanity Studio to include external stakeholders, creating a more inclusive and efficient content creation and management process.

runeb commented 1 month ago

Hi @vildeserina, thanks for the detailed feature request!

You are right that your use case is not currently easily implemented by users themselves on top of the current commenting and task feature sets. Sanity would need to create an API and UI components for the writing and viewing of comments and tasks outside of Studios.

I have a few follow up questions, if you don't mind;

vildeserina commented 1 week ago

Thanks for the feedback and sorry for the late reply, I missed this!

When you say external users, do you mean users who do not have a Sanity account, but would like to leave comments in the Sanity platform?

Yes!

So here’s two uses cases I envision:

  1. Adding the possibility for external users without Sanity account to comment on published documents

We use Sanity for publishing proposals or other documents that we share with our customers. Instead of them giving feedback through mail, I would love for them to be able to comment directly.

I did implement a hacky quick fix to this. I have a document consisting of different sections, where I added a feedback field to each section the schema,

image

image

I implemented to option to turn commenting on or off in the document, and then a button in the corner of each section.

image

When the user clicks the button, a pop up opens where they can type in their name and what comment they have.

image

Which is sent to Sanity again.

image

This is obviously a very meh solution that requires alot of hassle to implement.

  1. Sharing a page you are working on (probably a draft) with a colleague for feedback

We make websites, and I know alot of customers have the need for letting a colleague be able to comment on a draft of a page.

But imagine this coworker is old or non-technical, and requiring them to add a Sanity account before being able to comment is a real hassle and annoying.

So it would be great if our customers could turn on commenting, (perhaps only in draft mode of a document), and then they could send a link to their non-technical coworker, so that they could comment on the page they are working on.

Would you be relying on enabling commenting on preview builds that are otherwise protected from open access, or would you want gating of this functionality from Sanity?

Not completely sure if I understand the question correctly, but I would love if I would be able to turn commenting on and off, for example:

If I needed to send out a specific link with a preview secret which both enabled drafts view and commenting, that would be fine as well I guess, but not ideal.

When leaving a comment on a web page that has content from Sanity, what steps do you envision the user taking to making a comment?

You’ve already seen what I made obviously, which I guess is one way to solve it. That I would as a developer just implement this in my own way.

But I imagine it could be awesome to do something similar to presentations preview here.

Idea 1: Turning on and off commenting mode – opens a sidebar like presentation

I imagine you turn on comment mode, with a fixed button in the corner for example.

image

This opens a sidebar menu, like presentations where you can add a comment and maybe see previous comments.

Maybe you will be able to see previous comments and areas where you can comment like droplets, maybe like this:

image

Idea 2: Vercel inspired

Similar, but maybe more inspired by Vercel?

image

So maybe you turn on comment mode, and when the mouse hovers over an area which ids commentable, then then you can comment here.

Not sure.

image

A web page will often contain content from several Sanity documents and multiple fields across those documents. Do you have ideas on what the UX would be to discover what content can be commented, how to view comments already existing on pieces of content?

Look at the previous answer.

Additional thoughts

This seems like some functionality that fits well into the Growth plan.

And I know our customers would love to be able to just get comments directly in the document they are working on, instead of having to onboard a coworker to Sanity first, and make them go through all that hassle.