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

chore(atomic): migrate to Tailwindcss v3 #1718

Merged
merged 5 commits into from
Feb 9, 2022
Merged

chore(atomic): migrate to Tailwindcss v3 #1718

merged 5 commits into from
Feb 9, 2022

Conversation

ThibodeauJF
Copy link
Contributor

@ThibodeauJF ThibodeauJF commented Feb 8, 2022

@github-actions
Copy link

github-actions bot commented Feb 8, 2022

Thanks for your contribution @ThibodeauJF !
When your pull-request is ready to be merged, check the box below to merge it

  • Merge! :shipit:

@github-actions
Copy link

github-actions bot commented Feb 8, 2022

Pull Request Report

PR Title

✅ Title follows the conventional commit spec.

Bundle Size

File Old (kb) New (kb) Change (%)
case-assist 188.2 188.2 0
search 262.8 262.8 0
product-listing 201.6 201.6 0
product-recommendation 185.8 185.8 0
recommendation 184.3 184.3 0

@@ -113,9 +113,9 @@ export const config: Config = {
plugins: [
atImport(),
mixins(),
tailwindNesting(),
Copy link
Contributor Author

@ThibodeauJF ThibodeauJF Feb 8, 2022

Choose a reason for hiding this comment

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

We have to use tailwindcss/nesting & put it before tailwind() for it to work, we get errors in the other case, it's reusing postcss-nested underneath.

Copy link
Contributor Author

@ThibodeauJF ThibodeauJF Feb 8, 2022

Choose a reason for hiding this comment

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

With this, we are getting an issue with mixins & nesting, the following doesn't work (same pattern as used in result templates):

/* Mixin with nesting */
@define-mixin test-mixin {
  input {
    background-color: red;
  }
}

div {
  @mixin test-mixin;
}

The fix is to reuse postcss-nested a second time after tailwind() like we did before. 🍔

"postcss-nested": "5.0.6",
"puppeteer": "9.1.1",
"react": "16.14.0",
"rollup-plugin-html": "0.2.1"
"rollup-plugin-html": "0.2.1",
"tailwindcss": "3.0.19"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

not sure why it was a dependency ?

Copy link
Member

Choose a reason for hiding this comment

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

Well, hum, I think it can indeed be seen as a dev dependency, because it's not actually "shipped" to our clients, like they won't actually download and install tailwind when they npm install @coveo/atomic

@ThibodeauJF ThibodeauJF marked this pull request as ready for review February 8, 2022 21:20
@ThibodeauJF ThibodeauJF requested a review from a team as a code owner February 8, 2022 21:20
Copy link
Member

@olamothe olamothe left a comment

Choose a reason for hiding this comment

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

Really nice !

"postcss-nested": "5.0.6",
"puppeteer": "9.1.1",
"react": "16.14.0",
"rollup-plugin-html": "0.2.1"
"rollup-plugin-html": "0.2.1",
"tailwindcss": "3.0.19"
Copy link
Member

Choose a reason for hiding this comment

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

Well, hum, I think it can indeed be seen as a dev dependency, because it's not actually "shipped" to our clients, like they won't actually download and install tailwind when they npm install @coveo/atomic

@ThibodeauJF ThibodeauJF requested a review from a team as a code owner February 9, 2022 21:18
@ThibodeauJF ThibodeauJF merged commit 226ce20 into master Feb 9, 2022
@ThibodeauJF ThibodeauJF deleted the KIT-1397 branch February 9, 2022 21:52
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.

3 participants