demo icon indicating copy to clipboard operation
demo copied to clipboard

Add a basic Symfony Stimulus demo

Open 94noni opened this issue 3 years ago • 8 comments

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

94noni avatar Dec 14 '21 17:12 94noni

should use Symfony UX 2.0 (and so Stimulus 3)

stof avatar Dec 14 '21 17:12 stof

@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

94noni avatar Dec 14 '21 17:12 94noni

should use Stimulus / Symfony UX Helper: https://github.com/symfony/webpack-encore-bundle#stimulus--symfony-ux-helper

seb-jean avatar Dec 15 '21 14:12 seb-jean

@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 .

94noni avatar Dec 17 '21 10:12 94noni

status: need review

when this PR is reviewed/approved, I will rebase/recompile assets

94noni avatar Dec 27 '21 11:12 94noni

friendly ping @weaverryan @GromNaN @yceruto :)

94noni avatar Feb 21 '22 10:02 94noni

@weaverryan here you are, it should be good

94noni avatar Feb 22 '22 19:02 94noni

@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

94noni avatar Jun 15 '22 17:06 94noni

@weaverryan PR rebased accordingly cc @javiereguiluz regarding this

94noni avatar Sep 12 '22 05:09 94noni

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 avatar Dec 21 '22 16:12 javiereguiluz

@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

94noni avatar Dec 21 '22 16:12 94noni