For every input variable you add to a block, you get the same generic text input field in the UI.
In the future, it would be great to make the UI component to match the best UI for the specific data type. Integers, dates, etc. It would be also awesome to have hooks to allow plugin developers to use their own components to handle the fields.
But for starters, it would be great if we could add two basic field types:
- bool - render a checkbox or toggle
- enum - render a select
At Newspack, we have some usecases that could really use these. For example, in a list block, the API allow you to choose how to order the list. We can do this, but the user needs to know what are the supported fields, and type them perfectly. This could be easily acheived with an enum and a selectbox.
For every input variable you add to a block, you get the same generic text input field in the UI.
In the future, it would be great to make the UI component to match the best UI for the specific data type. Integers, dates, etc. It would be also awesome to have hooks to allow plugin developers to use their own components to handle the fields.
But for starters, it would be great if we could add two basic field types:
At Newspack, we have some usecases that could really use these. For example, in a list block, the API allow you to choose how to order the list. We can do this, but the user needs to know what are the supported fields, and type them perfectly. This could be easily acheived with an enum and a selectbox.