-
Notifications
You must be signed in to change notification settings - Fork 159
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Streamline props and events for all form components #8857
Comments
dschmidt
changed the title
Streamline label and description-message props for all form components
Streamline props and events for all form components
Jun 30, 2021
9 tasks
Added |
Additionally I would argue it would make sense to make the clear action emit The clear button on |
This was referenced Sep 3, 2021
10 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 owncloud/owncloud-design-system#1289 -> owncloud/owncloud-design-system#1301
placeholder
is discouragedOcAutocompletemaybe 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.The text was updated successfully, but these errors were encountered: