area17 / blast

Storybook for Laravel Blade πŸš€
https://dev.to/area17/getting-started-with-blast-storybook-for-laravel-blade-c5c
Apache License 2.0
262 stars 37 forks source link

Is Blast for Tailwind only? #95

Open wojciechczerniak opened 11 months ago

wojciechczerniak commented 11 months ago

Looks like https://github.com/area17/blast/blob/main/.storybook/preview.js#L1 imports https://github.com/area17/blast/blob/main/resources/frontend/css/main.css and therefore tailwind by default. This makes it very hard to use Blast for anything that does not use it. Tailwind has it's own set of default styles and resets (i.e. sets <svg> to display:block) that changes styling of components we build in storybook. Either requires overriding tailwind styles or produces unexpected results once the component is rendered outside of Blast. Neither is the ideal workflow.

Is that by design to only support tailwind projects or is possible to fix?

DreamShaded commented 5 months ago

same question. Also i see that there is an error "Too few arguments to function A17\Blast\Controllers\StoryController::__invoke() ..." if there is no tailwind config. @ifox anm i right? There is real no way to use Blast without TW?

mrtimbrook commented 5 months ago

It appears that the Tailwind preflight wasn't being disabled correctly. I've pushed an update that fixes that so the CSS included with blast no longer interferes with your app's CSS.

@DreamShaded Are you getting that error when running the launch task? Can you test again with 1.9.2?

DreamShaded commented 5 months ago

@mrtimbrook hi, thx a lot!) i'll be able to check it out this weekend

2rkmen commented 5 months ago

@DreamShaded , hi! is blast work for you? can you tell me version laravel and blast? Π£ вас Π·Π°Ρ€Π°Π±ΠΎΡ‚Π°Π»ΠΎ? Π½Π° ΠΊΠ°ΠΊΠΈΡ… вСрсиях?

DreamShaded commented 4 months ago

@DreamShaded , hi! is blast work for you? can you tell me version laravel and blast? Π£ вас Π·Π°Ρ€Π°Π±ΠΎΡ‚Π°Π»ΠΎ? Π½Π° ΠΊΠ°ΠΊΠΈΡ… вСрсиях?

НСт(( Π‘ΠΎΠ±ΠΈΡ€Π°ΡŽ шаблон, свСТий Π»Π°Ρ€Π°Π²Π΅Π»ΡŒ, свСТий бласт, ошибка Ρ‚Π° ΠΆΠ΅. Пока Π½ΠΈΠΊΠ°ΠΊ Π½Π΅ заводится.

No, i'm trying to set up template for projects and i use latest packages, but it coudn't start. @mrtimbrook thx a lot for your work, but maybe there is something else except Tailwind cause this error?

image

image

mrtimbrook commented 4 months ago

@DreamShaded I think this is because you've gone to the storybook_preview/ route. That route is used by blast to render your stories so you shouldn't need to do that unless you're getting errors within your stories.

Once you've installed blast you run php artisan blast:launch to start blast and then go to http://localhost:6006 to see all of your stories. If you want to create a quick demo story and component to test things you can run php artisan blast:demo which adds a button component and story.

2rkmen commented 4 months ago

yes, it works for me. but i have to edit .env and set:

APP_URL=http://localhost:8000

and it run under wsl2 ubuntu.

But it doesn't work on windows Β―_(ツ)_/Β― maybe it is ok and some day i going to switch from windows 10 to ubuntu