Skip to content

Feature: Creating field – different UI for option<> #704

Open
@FilipJirsak

Description

@FilipJirsak

Is your feature request related to a problem?

When creating a new field (Table designerCreate field), optional fields are specified by selecting the desired type in the Field kind dropdown and then manually wrapping it with option<>, or by selecting option<> first and then manually specifying the desired type inside. The same approach is required for set<> and array<>. However, for record<>, predefined record types for all tables are already available in the dropdown.

Describe the solution

It would be useful if I could simply select the specific type from the dropdown and use checkboxes to apply option<>, set<>, or array<>, similar to how the readonly option is handled.

There would be no issue with the order of elements — array<> and set<> are mutually exclusive, and option<> is always the outermost wrapper. This means that if I check both option<> and array<>, it would always result in option<array<>>.
If nesting structures like arrays within arrays are allowed (e.g., option<array<array<set<string>>>>), users would still need to manually input such exceptional cases, just as they do now. (Provided that SurrealQL even supports such constructs.)

Have you considered contributing this feature yourself?

No response

Contact Details

No response

Is there an existing issue for this?

  • I have searched the existing issues

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureNew feature or requesttriageThis issue is new

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions