Property1: some_type # Should never prefill with a default value when the type is `concrete`, should always display `set to value`
Property2: ?some_type # Should display `set to value` -> dropdown should present a list of options where `None` is the top most option
Property3: ?some_type = false # Should display `None` -> dropdown should present a list of options where `None` is the top most option
Property4: []some_type # Should display `set to value` -> initial interaction should make it EMPTY -> any new elements should provide a list of `some_type` subtype options, any `some_type` properties should never prefill with value just like `Property1` unless they already have a default value in code
Regarding a potential collision with an enum
that has a None
case of its own.
some_enum := enum {
None
Something
}
Just display a dropdown menu which has a clear hairline to partition the two sets of possible values. This should apply to any ?some_type
and ?some_type = false
values.
None <- represents `false` value
--------------- <- hairline
None <- `some_enum.None`
Something <- `some_enum.Something`
In case of ?some_class
:
None
---------------
some_class
some_other_subclasses
In case of ?int
None
---------------
int <- display the type
When int
is picked present an empty textbox, DO NOT prefill with 0
as a default value, keep the value still uninitialized, but the editor already would know that the user wants to set an actual integer here. Keep presenting the red symbol until the value is actually properly set by the user.