Skip to content

Add specific UI elements for some common input variables data types #640

Description

@leogermani

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions