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

Big changes to MUI Treasury #1220

Open
7 of 16 tasks
siriwatknp opened this issue Jan 6, 2024 · 3 comments
Open
7 of 16 tasks

Big changes to MUI Treasury #1220

siriwatknp opened this issue Jan 6, 2024 · 3 comments

Comments

@siriwatknp
Copy link
Owner

siriwatknp commented Jan 6, 2024

Hello 2024, I'm back! After a long pause, I finally believe that the long-term vision of MUI Treasury is copy-pasting/CLI.

More than a year ago, I posted an RFC of the copy-pasting/CLI approach with some proof-of-concept but never published the work due to my full-time workload. At that time, I really liked how it gave me full control of the code but I'm not really sure if it would work with other people. Luckily, shadcn/ui has proved to be right with this approach so I am really confident that it's the right way to go.

Changes

MUI Treasury will no longer provide components or styles as NPM packages, instead lets you own the source code by copy-pasting or running the CLI to pull the source code to your project. This way is a win-win because I can produce more components faster without thinking too much about the API and you can fully customize them to match your needs!

How it looks like

  • Go to mui-treasury.com and pick a block that you want to use in your project
  • Open a terminal at your root directory, run npx mui-treasury@latest clone $block-name (replace $block-name with the blocks you want)
  • Render the block to your page

It's that simple!

⏳ Work in Progress

closes #1215, closes #1162, closes #1136

@siriwatknp siriwatknp pinned this issue Jan 7, 2024
@mwillbanks
Copy link

@siriwatknp great work, really like the new approach! Looking forward to the layout migration as it's essentially the main component we utilize consistently. As you noted in the storybook there:

I created this because

  • It took me a lot of time to initialize dashboard layout when I have new projects or ideas to prove and I’m sure that a lot of you are the same as me.
  • Because we need to be fast to let others continue our work, we frequently write poor and a lot of code. However, we say we don’t have time to fix them. Eventually, spend all day paying technical debts.

Exactly the reason we've been really enjoying that component!

@siriwatknp
Copy link
Owner Author

@siriwatknp great work, really like the new approach! Looking forward to the layout migration as it's essentially the main component we utilize consistently. As you noted in the storybook there:

I created this because

  • It took me a lot of time to initialize dashboard layout when I have new projects or ideas to prove and I’m sure that a lot of you are the same as me.
  • Because we need to be fast to let others continue our work, we frequently write poor and a lot of code. However, we say we don’t have time to fix them. Eventually, spend all day paying technical debts.

Exactly the reason we've been really enjoying that component!

Awesome! I'm focusing on the layout migration this week.

@oliviertassinari
Copy link

I had forgotten about this MUI Treasury and hence this change opportunity, this sounds like a great idea 👍

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

No branches or pull requests

3 participants