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
perf: Add tailwind to editor and design system #9032
base: master
Are you sure you want to change the base?
Conversation
module.exports = { | ||
content: ['./index.html', './src/**/*.{vue,js,ts}'], | ||
darkMode: ['selector', '[data-theme="dark"]'], | ||
theme: { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thank you for adding this. But not sure this is enough.. we need some work here to map our design system to the tailwind tokens..
so that we can have consistency and this could succeed..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That could be the next step. First, we should make sure none of the tailwind tokens collide with ours, and then we can start using them.
If I understood correctly, it would not add anything to the built bundle if you don't use anything from Tailwind.
I want to leverage its layout helpers in the first place because they are missing from our design system.
For typography, colors, and spacing, we can still use ours, and later, we can integrate.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How much more effort would be adding that support here? Because colors and spacing would be the biggest win here and feels incomplete without it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know how many colors we're using and haven't yet gone deep into customizing Tailwind with CSS variables (I know it's also using them)
1 way would be to overwrite existing tokens with our colors, they have quite a thorough palette and I don't think we use more shades than them (we shouldn't at least).
10-11 variants is more than enough for each color
The other way would be to give all of our own design system colors a meaningful CSS class name and just add them the the tailwind config
https://tailwindcss.com/docs/customizing-colors
Quite the same goes for spacing, luckily we don't have much of them
https://tailwindcss.com/docs/customizing-spacing
I'd say 1-3 days would be enough but verifying and testing is another question (especially without visual regression tests)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should not touch our current css variables..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I see. We just add these and start to use them as CSS classes on the elements rather than the CSS variables in the style tags.
I would be much calmer if we had a regression test to see if nothing was changed visually after introducing tailwind
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay. Ya you only need to touch a small component as a POC..
Happy to help with testing in any way. I ran it locally and tested and everything seemed fine.
Do you agree to add colors/spacing tokens within this PR then? Happy to approve if you still think otherwise.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If nothing is broken I suggest add colors and spacing in a separate PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay 👍🏽 Sounds good.
|
1 flaky test on run #4773 ↗︎
Details:
cypress/e2e/5-ndv.cy.ts • 1 flaky test
Review all test suite changes for PR #9032 ↗︎ |
|
✅ All Cypress E2E specs passed |
Context