Skip to content
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

[Bug]: Inconsistent Checkbox #10668

Closed
2 tasks done
fabpico opened this issue Feb 9, 2022 · 5 comments · Fixed by #13386
Closed
2 tasks done

[Bug]: Inconsistent Checkbox #10668

fabpico opened this issue Feb 9, 2022 · 5 comments · Fixed by #13386
Assignees
Labels
component: checkbox package: @carbon/react @carbon/react package: styles @carbon/styles role: design ✏️ role: dev 🤖 severity: 3 https://ibm.biz/carbon-severity type: bug 🐛 version: 10 Issues pertaining to Carbon v10 version: 11 Issues pertaining to Carbon v11
Milestone

Comments

@fabpico
Copy link
Contributor

fabpico commented Feb 9, 2022

Package

@carbon/elements

Browser

Chrome

Package version

^10.33.0

React version

^16.8.6

Description

According to https://www.carbondesignsystem.com/components/checkbox/usage/ , checkboxes should look like

good

On https://www.carbondesignsystem.com/components/checkbox/code , checkbox is not rounded and the icon is not centered

bad

On https://www.carbondesignsystem.com/components/checkbox/usage#live-demo , checkbox is not rounded

not rounded

When implementing it, its not rounded

impl

The implementation should be the same as on the first screenshot, since the designer expect such implementation.

CodeSandbox example

https://codesandbox.io/s/weathered-cdn-d5nju?file=/src/index.js

Steps to reproduce

Read description.

Code of Conduct

@tw15egan
Copy link
Collaborator

cc @carbon-design-system/design can you take a look at this and see if either the code or documentation needs to be updated?

@laurenmrice
Copy link
Member

@tw15egan There is a visual difference because in code the checkbox is drawn and is not using the icon asset, which has straight corners. In design the Sketch kit and images on the website use the checkbox icon asset, which has rounded corners.

I believe this was originally drawn in code because it is not actually possible to use an icon with the native checkbox component. What we could do to align the drawn checkbox in code is to edit it to round the corners of it. Alison may have some insight on how to do this because she originally worked on it.

@alisonjoseph
Copy link
Member

alisonjoseph commented Feb 14, 2022

I believe this component has been refactored since I last worked on it many years ago. 😅 However I don't see any reason why we couldn't add a border radius to match the icon if that is what is expected? (although maybe not exact since the icon is only rounded on the outside edge not inside, not sure if that's possible with css or not)

@fabpico
Copy link
Contributor Author

fabpico commented May 25, 2022

I want to remind that the issue is not only about the corners, but also the alignment of the check-icon. Now on both mentioned examples, the icon is vertically too much down (previously it was only on the first example).

https://carbondesignsystem.com/components/checkbox/code/
https://carbondesignsystem.com/components/checkbox/usage/#live-demo

check

Chrome Version 101.0.4951.67 (Official Build) (64-bit)
Windows 10

@sstrubberg
Copy link
Member

hey @fabpico, thanks for submitting the issue. This has been triaged and we'll be weighing it's priority against competing work-streams. If you're feeling up to it, and would like to submit a PR based on @alisonjoseph's recommendation with the border-radius, we'd be happy to review it.

@sstrubberg sstrubberg added the package: styles @carbon/styles label Nov 29, 2022
@sstrubberg sstrubberg moved this from 🥶 Ice Box to 🕵️‍♀️ Triage in Design System Nov 30, 2022
@tay1orjones tay1orjones moved this from 🕵️‍♀️ Triage to ⏱ Backlog in Design System Dec 12, 2022
@alisonjoseph alisonjoseph self-assigned this Mar 21, 2023
@alisonjoseph alisonjoseph moved this from ⏱ Backlog to 🚦 In Review in Design System Mar 21, 2023
@tay1orjones tay1orjones added this to the 2023 Q1 milestone Mar 23, 2023
@kodiakhq kodiakhq bot closed this as completed in #13386 Mar 23, 2023
@github-project-automation github-project-automation bot moved this from 🚦 In Review to ✅ Done in Design System Mar 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: checkbox package: @carbon/react @carbon/react package: styles @carbon/styles role: design ✏️ role: dev 🤖 severity: 3 https://ibm.biz/carbon-severity type: bug 🐛 version: 10 Issues pertaining to Carbon v10 version: 11 Issues pertaining to Carbon v11
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

6 participants