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

feat(consent-manager)!: convert to CSS modules #305

Merged
merged 6 commits into from Sep 7, 2021

Conversation

zchsh
Copy link
Contributor

@zchsh zchsh commented Aug 28, 2021

🎟️ Asana Task
πŸ” Preview Link


This PR updates @hashicorp/react-consent-manager to use CSS modules.

PR Checklist πŸš€

Items in this checklist may not may not apply to your PR, but please consider each item carefully.

  • Add Asana and Preview links above.
  • Conduct thorough self-review.
  • Add or update tests as appropriate.
  • Conduct reasonable cross browser testing for both compatibility and responsive behavior (We have a Sauce Labs account for this, if you don't have access, just ask!).
  • Conduct reasonable accessibility review (use the WAS as a guide or an axe browser plugin until we establish more formal checks).
  • Identify (in the description above) and document (add Asana tasks on this board) any technical debt that you're aware of, but are not addressing as part of this PR.

@changeset-bot
Copy link

changeset-bot bot commented Aug 28, 2021

πŸ¦‹ Changeset detected

Latest commit: f7eaa97

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@hashicorp/react-consent-manager Major

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel
Copy link

vercel bot commented Aug 28, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

πŸ” Inspect: https://vercel.com/hashicorp/react-components/Bi2yp5RkqphU5D8maZFEddnCjULt
βœ… Preview: https://react-components-git-zsconsent-manager-css-modules-hashicorp.vercel.app

Base automatically changed from zs.button-css-modules to main August 31, 2021 14:46

- πŸ’₯✨ BREAKING CHANGE: Converts to CSS modules.
- Consumers will need to remove any `@hashicorp/react-consent-manager/style.css` imports.
- We've retained a `id="g-consent-manager` on the root element.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@@ -80,7 +82,7 @@ export default class ConsentManager extends Component {

render() {
return (
<div id="g-consent-manager">
<div className={classNames(s.root, this.props.className)}>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added support for className to ensure consumers can override hiding from Percy if needed.

@@ -12,7 +12,6 @@
@import '../packages/enterprise-alert/style.css';
@import '../packages/featured-slider/style.css';
@import '../packages/content-cta/style.css';
@import '../packages/consent-manager/style.css';
Copy link
Contributor Author

Choose a reason for hiding this comment

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

πŸ”ͺ πŸŽ‰

@@ -0,0 +1,5 @@
.root {
@media only percy {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Closes out this task and does the half the required work for this task.

@zchsh zchsh marked this pull request as ready for review September 3, 2021 17:25
@zchsh zchsh requested a review from a team September 3, 2021 17:25
Copy link
Contributor

@BRKalow BRKalow left a comment

Choose a reason for hiding this comment

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

LGTM!

Comment on lines -35 to -36
{/* TODO: this should most likely be a button (https://app.asana.com/0/1100423001970639/1199667739287943/f) */}
{/* eslint-disable-next-line jsx-a11y/anchor-is-valid */}
Copy link
Contributor

Choose a reason for hiding this comment

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

nice cleanup!

@zchsh zchsh merged commit 740f35b into main Sep 7, 2021
@zchsh zchsh deleted the zs.consent-manager-css-modules branch September 7, 2021 21:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants