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

feat(types): changeFieldControl builtin overload #930

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

AndrewLeedham
Copy link

Summary

Adds overloads for changeFieldControl so widgetId can be auto-completed when using the 'builtin' widgetNamespace.

Description

Adds 2 overloads one for 'builtin' and the other for 'extension' | 'app' which scope the widgetId field to either be one of the built in Contentful widgets from https://www.contentful.com/developers/docs/extensibility/app-framework/editor-interfaces/ or any string.

Motivation and Context

Makes writing migration scripts quicker without needing to lookup the docs for the IDs of builtin widgets. Essentially just a DX improvement.

Screenshots (if appropriate):

image

@ItsDaveB
Copy link

This PR would be extremely useful when using Typescript migrations.

@AndrewLeedham AndrewLeedham requested a review from a team as a code owner August 8, 2023 19:27
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