TechIsHiring / techishiring-website

A space where great Engineers and great jobs can find each other! We're on Twitter and LinkedIn and have a newsletter on Substack!
https://www.techishiring.com
MIT License
52 stars 34 forks source link

Remove Chakra and replace with custom components or Preline/Daisy/etc #60

Open royanger opened 1 year ago

royanger commented 1 year ago

Feature Request

Is your feature request related to a problem? Please describe. The project currently has both Tailwind and Chakra UI installed. While this isn't a really problem, it is a bit of a mix of systems.

Describe the solution you'd like Rip out Chakra and replace with Preline or custom components built with the Tailwind.

Why Preline (or Daisy UI)? They are built using Tailwind, and where it matters the library adds in a little bit of JS. See the Off Canvas examples. Off Canvas is like Chakra's Drawers. Essentially you install the Preline package, then just Copy & Paste from the Preline docs into the project. The nice thing about this solution is that you can then, quickly or over time, tweak or change it and essentially have a custom component. (Or even write the JS to open/close/show/hide/etc things and turn it fully custom.

Why custom? I'm not a super strong advocate of this, but it is an option if something like Preline or Daisy isn't interesting.

Describe alternatives you've considered None specifically -- past experience plus Tailwind already being present in the project.

Teachability, Documentation, Adoption, Migration Strategy This isn't something that would really affect users (assuming no bugs). This is just an potential evolution of the project.

chadstewart commented 1 year ago

Cool cool. I'll look into this a bit more get back to you.

hokagedemehin commented 1 year ago

I believe i already suggested material ui also for a switch from chakra ui

takanome-dev commented 1 year ago

While this isn't a really problem, it is a bit of a mix of systems.

I agree with this :100: Preline looks pretty good, I think it's the same as radix or headless UI (let me know if I'm wrong here). I believe i already suggested material ui also for a switch from chakra UI

Can you elaborate more on why we should switch to MUI?

royanger commented 1 year ago

I believe i already suggested material ui also for a switch from chakra UI

I can't agree with this. For me MUI would be a step in the wrong direction for two reasons:

  1. Replacing Chakra with MUI would be a bunch of work that would leave the project still using both Tailwind + another system.
  2. I think MUI is probably a step backwards, moving to a system that is even harder to work with.

Even if others are comfortable with MUI and working with it, it would mean a fair bit of work ripping out one opinionated system (Chakra) and installing another (MUI) for no real gains. I don't see the value in it.

On the flip side, moving to Preline would decrease bundle size (see below) while creating a path to even moving away from Preline completely with smaller, incremental changes tot he codebase.

I think it's the same as radix or headless UI (let me know if I'm wrong here).

Realistically it is probably a weaker headless UI combined with pre-styled components. Many of the things in Preline don't exist in Headless or Radix because they don't need to. My preferred path, if the decision is to move to Tailwind and do so slowly, would be to move from Chakra to Preline, and then over time tweak the stuff added via Preline to use just Tailwind and Headless/Radix and longer term even ditch Preline.

chadstewart commented 1 year ago

Alright, so I FINALLY found the time to look into the suggested component libraries that you suggested @royanger. I'm not gonna lie, I'm really liking Preline UI over the other options right now. I haven't made a definite decision yet but more than likely we'll replace Chakra UI with Preline UI. I personally want to spin up a side project and play around with it a bit before being 100% on the decision but I'm honestly really liking it so far.

That said, I think we should complete the current work first before we think about the migration. There are components currently being worked on and I think it'd be a bit much to ask current contributors to start using a new UI library out of the blue. I don't think the migration won't take long either but I just don't want to disrupt people's workflow unnecessarily.

chadstewart commented 1 year ago

Yeeeeeah... So within the last few weeks I learned about shadcn-ui and I think I'm just going to go with that instead. Really like the idea of using Radix UI along with Tailwind and it makes it easy to just add pre-styled Radix components.