ndimatteo / sanity-plugin-note-field

Custom Note Fields for Sanity
MIT License
43 stars 6 forks source link

Updated to work with Sanity Studio V3 #5

Closed svey-xyz closed 1 year ago

svey-xyz commented 2 years ago

Hey! I used this plugin on my V2 desk and loved it. Decided to update it for V3 since I've been using that recently. Everything's working, but you probably want to preserve the V2 branch for those that still use it. And V3 should be added to npm as a new version.

I'm new to public GitHub pull requests, so if I've done anything wrong or you need more info from me just let me know! I am happy to contribute however I can.

evankford commented 2 years ago

Just want to +1 my want for this to go through!

cavellblood commented 1 year ago

Would be interested in this PR getting merged if possible.

nicktaylor commented 1 year ago

This PR looks good, hopefully it'll get merged.

@svey-xyz One improvement though, within defineType in the schema.tsx and in components: { ... } it'd be good if you could add field: (props) => <div>{props.children}</div> as that'll get rid of the label, as labels for this aren't required as the note is self explanatory.

svey-xyz commented 1 year ago

@nicktaylor Thanks for that piece of advice! I was looking for how to do exactly that and couldn't find it in the documentation.

ndimatteo commented 1 year ago

Thank you @svey-xyz for putting in the work on this, and for everyone else's patience! I just pushed up a new version for V3, with some adjustments from what was proposed here ✨

Enjoy! And feel free to open new issues for any feedback!