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

fix(toggle): ensure toggle click target matches visual representation #12212

Merged
merged 4 commits into from
Oct 6, 2022

Conversation

janhassel
Copy link
Member

Closes #12117

Changelog

Changed

  • Changed the toggle's container element to render as inline-block
  • Changed the toggle element to render as inline-grid

Testing / Reviewing

  • Ensure the toggle receives a click event when clicking on either the toggle or the label (both, side and top labels)
  • Ensure the toggle doesn't receive a click event outside of the above mentioned elements

@janhassel janhassel requested a review from a team as a code owner October 1, 2022 08:00
@janhassel janhassel requested review from aledavila and jnm2377 October 1, 2022 08:00
@netlify
Copy link

netlify bot commented Oct 1, 2022

Deploy Preview for carbon-components-react ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit ca54f6f
🔍 Latest deploy log https://app.netlify.com/sites/carbon-components-react/deploys/633f1071dab9bb0008767d4f
😎 Deploy Preview https://deploy-preview-12212--carbon-components-react.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@netlify
Copy link

netlify bot commented Oct 1, 2022

Deploy Preview for carbon-elements ready!

Name Link
🔨 Latest commit ca54f6f
🔍 Latest deploy log https://app.netlify.com/sites/carbon-elements/deploys/633f1071a8a77b00080c70d4
😎 Deploy Preview https://deploy-preview-12212--carbon-elements.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

Copy link
Member

@tay1orjones tay1orjones left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, clever fix! We'll have to see if moving the container to inline-block has any significant downstream impacts, but looks good to me. Thanks!

Copy link
Contributor

@aledavila aledavila left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm thanks for this fix Jan

@kodiakhq kodiakhq bot merged commit b9d7107 into carbon-design-system:main Oct 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

[Bug]: Toggle click behavior
3 participants