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(button): Fix Component Selector Issue #474

Merged
merged 5 commits into from Feb 19, 2020

Conversation

lychyi
Copy link
Contributor

@lychyi lychyi commented Feb 19, 2020

Summary

Due to some changes in the way we use @emotion/styled, we are no longer able use component selectors in Emotion via Babel. This is because styled functions using Emotion's CreateStyled, like our own Canvas styled component, does not work with the babel plugin for emotion.

This is a known issue and will be fixed in Emotion 11 by emotion-js/emotion#1220 via a mapping configuration so the plugin knows about custom styled functions.

For now the fix is to just remove the usage of component selectors. This PR addresses that by using an identifier class name (similar to how Emotion identifies component selectors) in IconButton and then styling that class name in IconButtonToggleGroup.

Checklist

  • branch has been rebased on the latest master commit
  • tests are changed or added
  • yarn test passes
  • all (dev)dependencies that the module needs is added to its package.json
  • code has been documented and, if applicable, usage described in README.md
  • module has been added to canvas-kit-react and/or canvas-kit-css universal modules, if
    applicable
  • design approved final implementation
  • a11y approved final implementation
  • code adheres to the API & Pattern guidelines

Additional References

@cypress
Copy link

cypress bot commented Feb 19, 2020



Test summary

155 0 0 0


Run details

Project canvas-kit
Status Passed
Commit 8819eef
Started Feb 19, 2020 9:27 PM
Ended Feb 19, 2020 9:31 PM
Duration 03:48 💡
OS Linux Ubuntu Linux - 16.04
Browser Electron 78

View run in Cypress Dashboard ➡️


This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard

modules/button/react/spec/IconButton.spec.tsx Outdated Show resolved Hide resolved
@lychyi lychyi added this to In progress (PRs) in Current Sprint (7/20 - 8/9) via automation Feb 19, 2020
@lychyi lychyi merged commit 590deb0 into Workday:master Feb 19, 2020
Current Sprint (7/20 - 8/9) automation moved this from In progress (PRs) to Done Feb 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

2 participants