demo
demo copied to clipboard
Add a basic Symfony Stimulus demo
Cf a Slack of mine in the Symfony Slack, I discussed to add a simple/basic Stimulus example leveraging Symfony UX
As requested; this leverages:
- https://symfony.com/blog/symfony-ux-2-0-and-stimulus-3-support
- https://github.com/symfony/webpack-encore-bundle#stimulus--symfony-ux-helper
https://user-images.githubusercontent.com/1358361/147409321-cbd625c0-362b-401f-9936-a8814a496de2.mov
Feel free to comment, thx
should use Symfony UX 2.0 (and so Stimulus 3)
@stof indeed I've just saw that https://symfony.com/blog/symfony-ux-2-0-and-stimulus-3-support I will try to update underlying packages and finish this accordingly, thanks ! edit: PR updated
should use Stimulus / Symfony UX Helper: https://github.com/symfony/webpack-encore-bundle#stimulus--symfony-ux-helper
@weaverryan yeah I used npm at first, I will redo with yarn
for my knowledge, what is the command to regenerate the desired assets that are versioned here ?
just yarn run build and I commit all?
edit : second commit is made with yarn run build and git add .
status: need review
when this PR is reviewed/approved, I will rebase/recompile assets
friendly ping @weaverryan @GromNaN @yceruto :)
@weaverryan here you are, it should be good
@weaverryan since my latest comment there have been some changes, and now unfortunately I can not build asset locally I am getting lot of errors :
error in ./assets/styles/admin.scss 19:02:13
Module Error (from ./node_modules/sass-loader/dist/cjs.js):
Node Sass does not yet support your current environment: OS X Unsupported architecture (arm64) with Node.js 16.x
For more information on which environments are supported please see:
https://github.com/sass/node-sass/releases/tag/v7.0.0
error in ./assets/styles/app.scss 19:06:06
Module build failed (from ./node_modules/mini-css-extract-plugin/dist/loader.js):
ModuleBuildError: Module build failed (from ./node_modules/sass-loader/dist/cjs.js):
SassError: Invalid CSS after "... floor(math": expected expression (e.g. 1px, bold), was ".div($grid-gutter-w"
on line 369 of node_modules/bootstrap-sass/assets/stylesheets/bootstrap/_variables.scss
from line 8 of node_modules/bootstrap-sass/assets/stylesheets/_bootstrap.scss
from line 11 of assets/styles/app.scss
>> vbar-padding-horizontal: floor(math.div($grid-gutter-width, 2)) !defa
So please feel free to continue this PR or merge it and yarn run build the asset just after :)
thanks
@weaverryan PR rebased accordingly cc @javiereguiluz regarding this
Antoine, we finally merged your contribution. I'm really sorry that it took us so long. Thanks for working on this nice feature! Thanks to our lovely reviewers too.
Please note that while merging I faced multiple merge issues. That's why I push forced to your branch.
@javiereguiluz thx to you for taking time to handle this, I hope this will help make discover symfony ux and stimulus logic as entry point :)
Please note that while merging I faced multiple merge issues. That's why I push forced to your branch.
yes I may think it was due to versioning assets as the code evolves since