Open dschmidt opened 3 years ago
Added defaultValue
to the table.
Additionally I would argue it would make sense to make the clear action emit input
and change
events with null
values.
That way clearing can be differentiated from entering empty values.
The clear button on OcTextInput
currently emits an empty string via input
and doesn't emit change
at all.
It would be nice to have a consistent api for showing label and description-message for all form related components:
placeholder
)clearButtonEnabled
)placeholder
is discouragedpossibly related https://github.com/owncloud/owncloud-design-system/issues/1289 -> https://github.com/owncloud/owncloud-design-system/pull/1301
placeholder
is discouragedmaybe not because OcRadio is only one option and not a whole form element
While at it, it could be nice to have a common css class for all labels/description so it's easier to style all at the same time. Maybe labels could be a component that can be used for attaching them to other form elements, e.g. file input elements that have no component in ODS.
edit: I've added the
change
event andclearable
prop (the latter is only supported by oc-select). It could be nice to have a way to clear values, that way we could even differentiate between empty strings andnull
for strings e.g.When no value is set, displaying a default value (
placeholder
for text-input and text-area) could also be great. It needs to be visually obvious that something is not defined by a user but a not-overridden default value.Personally I would consider
label
,description-message
and@change
to be comparatively high-priority,clearable
andplaceholder
could be nice but certainly have a set of problems with them, so they should be discussed by people with more ux knowledge than me ;-)edit: I've added
defaultValue
now thatplaceholder
usage is apparently discouraged.placeholder
being a bad solution, doesn't invalidate the problem it tries to solve: show a default value. As a consumer of ODS, I should not care about how things are displayed, I just need a consistent API and rely on ODS to display it in a consistent way using up to date usability standards.