Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable creation plugin, document-internationalization downgrade #113

Merged
merged 1 commit into from
Jan 2, 2025

Conversation

stilyan-tinloof
Copy link
Contributor

Adds the disable creation plugin which disables the creation of documents when the option disableCreation is set to true

Also downgrades @sanity/document-internationalization from 3.2.1. to 3.2.0 in order to fix the following issue. Another issue was open on the @sanity/document-internationalization repo too.

@stilyan-tinloof stilyan-tinloof self-assigned this Jan 2, 2025
Copy link
Contributor

@siffogh siffogh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, the type can be fixed though.

* ```tsx
* import {defineType} from 'sanity'
*
* export default defineType({
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This would lead to a type error. Maybe the best way to handle it is to expose a defineType from the plugin which has an extended version of the param of defineType that accepts disableCreation as an option?

@stilyan-tinloof stilyan-tinloof merged commit efa5486 into main Jan 2, 2025
1 check passed
@stilyan-tinloof stilyan-tinloof deleted the tin-718-disable-creation-plugin branch January 2, 2025 14:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants