Skip to content

Upgrade Tailwind #11846

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

Closed
gtsiolis opened this issue Aug 3, 2022 · 10 comments
Closed

Upgrade Tailwind #11846

gtsiolis opened this issue Aug 3, 2022 · 10 comments
Labels
component: dashboard meta: never-stale This issue can never become stale team: webapp Issue belongs to the WebApp team

Comments

@gtsiolis
Copy link
Contributor

gtsiolis commented Aug 3, 2022

Problem to solve

The dashboard is currently using Tailwind 2.x but Tailwind 3.x is already out there since last year, see relevant release.

We've run into issues or confusion where both team or community contributors have been trying to bypass the limitations of the Tailwind 2.0. For example, see #10004, #10284, #11815 (comment), etc.

Proposal

Upgrade Tailwind from 2.x to 3.x. 🌬️

See also relevant docs.

@gtsiolis gtsiolis added help wanted component: dashboard team: webapp Issue belongs to the WebApp team labels Aug 3, 2022
@Harixomxsingh
Copy link

hey there, Thanks for raising this issue I'm Working on it If I need some time then I will comment.

@Harixomxsingh
Copy link

hey can you help in which folder I need to upgrade the tailwindcss, correct me if I'm wrong, I think in components/dashboard.

@gtsiolis
Copy link
Contributor Author

gtsiolis commented Aug 9, 2022

@Harixomxsingh You're right, this is about the components/dashboard.

@Hardik500
Copy link
Contributor

@gtsiolis @Harixomxsingh I can work on this issue, if no work has been done on this yet.

@gtsiolis
Copy link
Contributor Author

gtsiolis commented Oct 5, 2022

@Hardik500 I couldn't find any open PR linking back to this issue, feel free to pick it up. 🏓

@Hardik500
Copy link
Contributor

Awesome @gtsiolis, I'll be picking it up then

@Hardik500
Copy link
Contributor

Hardik500 commented Oct 13, 2022

@gtsiolis An update on the Tailwind v3 upgrade, it seems that the process is not that straightforward for upgrading to tailwind v3.
Cause tailwindv3 requires PostCSS v8, which in turn requires react-scripts v5.0.
But craco doesn’t support react-scripts v5.0, as per their official docs ( https://github.com/dilanx/craco#support although some are saying that alpha builds do support those, but I found some related issues in those too )

So the solution I found out was using react-app-rewired (https://github.com/timarney/react-app-rewired), which currently doesn't seem to cause any errors except some polyfills issues, for which I found a workaround for.
But 2 issues still remain,

  1. We need to override the config for react-app-rewired the same way we did for craco else we won't be able to connect to backend ( I am still new, so correct me if I'm wrong on this )
  2. react-intl-tel-input seems to be breaking ( seems to be related to this: TypeScript error in Project: 'IntlTelInput' cannot be used as a JSX component. jackocnr/intl-tel-input#1341 )
    Fixed by this: https://stackoverflow.com/a/71828113

This is the one major breakage I found out, I haven't tested the live version right now, cause of Issue 1, as the frontend is unable to connect. And I am getting timeout

For now, I'll try to write a similar config for react-app-rewired that we have for craco
But this is it for now, do let me know your thoughts. Or if you know an easier fix for this whole major dependency issues let me know.

@Hardik500
Copy link
Contributor

@gtsiolis An update on the Tailwind v3 upgrade, it seems that the process is not that straightforward for upgrading to tailwind v3. Cause tailwindv3 requires PostCSS v8, which in turn requires react-scripts v5.0. But craco doesn’t support react-scripts v5.0, as per their official docs ( https://github.com/dilanx/craco#support although some are saying that alpha builds do support those, but I found some related issues in those too )

So the solution I found out was using react-app-rewired (https://github.com/timarney/react-app-rewired), which currently doesn't seem to cause any errors except some polyfills issues, for which I found a workaround for. But 2 issues still remain,

  1. We need to override the config for react-app-rewired the same way we did for craco else we won't be able to connect to backend ( I am still new, so correct me if I'm wrong on this )
  2. react-intl-tel-input seems to be breaking ( seems to be related to this: TypeScript error in Project: 'IntlTelInput' cannot be used as a JSX component. jackocnr/intl-tel-input#1341 )
    Fixed by this: https://stackoverflow.com/a/71828113

This is the one major breakage I found out, I haven't tested the live version right now, cause of Issue 1, as the frontend is unable to connect. And I am getting timeout

For now, I'll try to write a similar config for react-app-rewired that we have for craco But this is it for now, do let me know your thoughts. Or if you know an easier fix for this whole major dependency issues let me know.

@gtsiolis Thoughts?

@stale
Copy link

stale bot commented Jan 16, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the meta: stale This issue/PR is stale and will be closed soon label Jan 16, 2023
@gtsiolis gtsiolis added meta: never-stale This issue can never become stale and removed meta: stale This issue/PR is stale and will be closed soon labels Jan 16, 2023
@gtsiolis gtsiolis mentioned this issue Jun 2, 2023
14 tasks
@gtsiolis
Copy link
Contributor Author

Closing as this was resolved in #18525 — thanks, @AlexTugarev!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: dashboard meta: never-stale This issue can never become stale team: webapp Issue belongs to the WebApp team
Projects
None yet
Development

No branches or pull requests

3 participants