deven-org / boiler

A fully customisable and tokenised design system boilerplate built by Accenture Song
https://boilerds.com/
MIT License
17 stars 7 forks source link

Text Area, Input Field Text, Input Field Number - align behaviour when focusing component in readonly state #1125

Open thrbnhrtmnn opened 4 months ago

thrbnhrtmnn commented 4 months ago

Description / User story

Currently the Text Area, Input Filed Text and Input Field Number components each behave a bit different when they are focused while in readonly state. This task includes the sync on this with design and the alignment of all 3 components.

Requirements / Prerequisites

Acceptance Criteria

Additional information

Code of Conduct

thrbnhrtmnn commented 4 months ago

Hey @larserbach , I think this component fix will need some sparing with design. Just FYI. This task is not planned in yet.

thrbnhrtmnn commented 3 months ago

After discussion with design, we should probably remove the background/default/focus tokens for all the components, as the background color should not be changed in the focus state.

Another idea is to implement a pattern description for the focus states.

We also need to do research, if we should even show a focus ring in readonly state. And also if components should be able to receive focus.

thrbnhrtmnn commented 1 month ago

After todays discussion, we decided to do the following research:

Also it is clear, that in readonly we need the focus state.

larserbach commented 1 month ago

After todays discussion, we decided to do the following research:

  • Does input fields (Text Area, Input Field Text, Input Field Number, Select?) need an active state (which we currently name focus state in design)? Also it is clear, that in readonly we need the focus state.

Outcome of research:

Image Image

I would propose the following:

Input fields have the following states which can evoke a visual change:

Readonly

I looked at adobe spectrum and atlassian

I would propose:

Image

Image

thrbnhrtmnn commented 1 month ago

Hey @larserbach , thanks for the research and the proposals.

I have a follow up question: Should our focus state only provide tokens for the stroke-color and stroke-width or should we also define a background-color? If we would define a background-color, would focusing a readonly input also overwrite the background-color or only the stroke-color and stroke-width?

I will update this ticket to make sure that the readonly state is as intended in all input components (Text Area, Input Field Text, Input Field Number), meaning that all input fields are focusable in readonly state and that the value will be selected when focusing them.

I will also create a new task to remove the pressed state, to update the focus state to only define the stroke-color, stroke-width (and potentially background-color) and to make sure the focus state always dominates the other states.

thrbnhrtmnn commented 1 month ago

As discussed with @larserbach , we decided to use all tokens we provide for the focus-state, thus the background-color would also change when focusing a readonly component.

Interesting ideas we stumbled upon while doing the research: