News for hackers. Stuff that matters.
Re:Phoenix 1.7.0 Released: Built-In Tailwind, Verified Route... by bryanrasmussen on Monday March 06, 2023 @01:02AM (#35037960)
>you can easily override it

from the article

>First, you can customize your core UI components to suit whatever needs, designs, and tastes that you have. If you want to use Bulma or Bootstrap instead of Tailwind – no problem! Simply replace the function definitions in core_components.ex with your framework/UI specific implementations and the generators continue to provide a great starting point for new features whether you’re a beginner, or seasoned expert building bespoke product features.

I mean I would think easily overriding it would be sending a -notailwind parameter when using a site generator or something. The above is not easily although not hard either. With a small amount of effort that might irritate you if you don't want to use tailwind is what is sounds like.

Re:Phoenix 1.7.0 Released: Built-In Tailwind, Verified Route... by conradfr on Monday March 06, 2023 @01:27AM (#35038090)
I agree.

> If you want to use Bulma or Bootstrap instead of Tailwind – no problem! Simply replace the function definitions in core_components.ex with your framework/UI specific implementations

"Simply" here means rewriting a 661 lines file. Maybe a more modular approach with only Tailwind support at release would have been better.

I know I'm always the "Symfony does it better" guy but in this framework to use Bootstrap (or Foundation etc) for my forms[0] I "simply" have to put:

> form_themes: ['bootstrap_5_horizontal_layout.html.twig']

Well maybe the first person to actually rewrite core_components.ex will share it in a Gist or something ;)

I also find the new collocated views in the controllers folder a bit messy and not really productive in practice IMHO.

[0]https://symfony.com/doc/current/form/form_themes.html

Re:Phoenix 1.7.0 Released: Built-In Tailwind, Verified Route... by sph on Monday March 06, 2023 @01:54AM (#35038205)
It's 661 lines of default styling. Every website will have its own style guide and will have to rewrite those 661 lines anyway.

In fact my Tailwind project has completely replaced those lines anyway, and written three time as much (to have a unified component library)

Re:Phoenix 1.7.0 Released: Built-In Tailwind, Verified Route... by josevalim on Monday March 06, 2023 @05:52AM (#35039538)
> Well maybe the first person to actually rewrite core_components.ex will share it in a Gist or something ;)

Yes, that's pretty much it. And we would also be glad to accept contributions so we can generate different core components out of the box.

Re:Phoenix 1.7.0 Released: Built-In Tailwind, Verified Route... by cultofmetatron on Monday March 06, 2023 @12:06PM (#35043483)
its done in such a way that people will be able to write modules that automate this for you. I can already imagine a boilerplate generator being created for this
Re:Phoenix 1.7.0 Released: Built-In Tailwind, Verified Route... by di4na on Monday March 06, 2023 @05:33AM (#35039439)
You can do `-no-assets` or `-no-html` or even delete that file. All the generated code is here to get you started and generate the default "hello world" page. But none of it is necessary.
Re:Phoenix 1.7.0 Released: Built-In Tailwind, Verified Route... by jeanlucas on Monday March 06, 2023 @09:44AM (#35041582)
People don't read stuff, just wanna post opinions