mi6 / mi6/ic-ui-kit

[ic-checkbox, ic-radio] validation styling incorrect\inconsistent when disabled

Open
#2,012 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
53
Forks
63
Avg merge
2d 4h
Merged PRs (30d)
15

Description

## Summary of the bug
The styling of radio options and checkboxes has some issues when validation is applied and the `disabled` prop is set to `true`

## 🪜 How to reproduce
With a checkbox (or radio), with `error` validation set and `helperText` set to a value. Note how validation is shown & the label is red (helperText remains grey).

![image](https://github.com/mi6/ic-ui-kit/assets/116102637/00080d9d-50bd-4afa-aea3-dbb7ada42e43)

Now set the `disabled` prop to `true`. The validation is correctly removed, but the label remains red and the helperText becomes red:

![image](https://github.com/mi6/ic-ui-kit/assets/116102637/73d4c5d8-adac-48f7-9a31-032da04b4f2a)

## 🧐 Expected behaviour
To be confirmed as, for other components like textfield and select, when `disabled` is set to `true`, no red validation state is shown:

![image](https://github.com/mi6/ic-ui-kit/assets/116102637/55130a83-20a7-444c-a20a-ca7f1b95bb03)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the ic-checkbox and ic-radio component entry points and reproduce the stated combination of error, helperText, and disabled. Compare their disabled validation styling with textfield and select, then confirm the expected behavior before adding coverage for the corrected label and helperText states.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.