-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
feat: readonly checkbox #12398
feat: readonly checkbox #12398
Conversation
✅ Deploy Preview for carbon-components-react ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify site settings. |
✅ Deploy Preview for carbon-elements ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall looks good, just a few comments
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The styles look good but there are some interaction problems.
I'm still able to click on the check-box, has a cursor change to a hand and focus border. My assumption is those things shouldn't be possible because it is giving the illusion that its interactive. (Interactions aren't explicitly stated in the spec though we might need to circle back with Devin and team).
Update: Oh is that the onClick
thing you're talking about with @tay1orjones? At a minimum, can we not have the cursor change, can it just remain an arrow or switch to the not-allowed
cursor?
@aagonzales @tay1orjones was referring to the internals of the component I believe. With regards to typical behaviour With regards to the cursor I'm not sure if https://github.com/quarryboy or Mike Eaker would care to comment? The default behaviour (for input fields) can be seen in the link below. The cursor stays as it would normally. That is to say it displays the As it is focusable and the cursor ordinarily stays the same for input fields, it suggests to me it should do so here. https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/readonly |
@lee-chase I talked with Mike and Devin over Slack. Here are the confirmed expected interactive behaviors. So the changes needed are:
|
@tw15egan merge conflict fixed |
@aagonzales addressed cursor issue |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Visually looks good, matches spec 👍
Contributes to #2177
Closes #12243
Adds the read-only feature to the Checkbox component
Changelog
Added
Testing / Reviewing
Reviewed the result in Storybook and a added read-only test.