symfony-docs icon indicating copy to clipboard operation
symfony-docs copied to clipboard

[Frontend] Add documentation about Stimulus and the Symfony UX Helper

Open ker0x opened this issue 3 years ago • 3 comments

Currently, the only documentation available about the Twig functions for Stimulus is located inside the README of the WebpackEncoreBundle.

This does not make it easy to find documentation about Stimulus integration in Twig, especially if the first place to search is the Symfony documentation.

I propose to extract this documentation into a dedicated page under frontend.

WDYT ?

ker0x avatar Jun 24 '21 08:06 ker0x

Thank you for this issue. There has not been a lot of activity here for a while. Has this been resolved?

carsonbot avatar Jul 09 '22 12:07 carsonbot

Friendly ping? Should this still be open? I will close if I don't hear anything.

carsonbot avatar Aug 28 '22 14:08 carsonbot

Meanwhile, there is at least some documentation on https://symfony.com/doc/current/frontend/encore/simple-example.html#stimulus-symfony-ux

However, what I don't quite get (i.e. should be explained): What's the advantage of all those helpers in StimulusTwigExtension at all? Native Stimulus:

<button data-action="say-hello#greet">Greet</button>

Helper:

<button {{ stimulus_action('say-hello', 'greet') }}>Greet</button>

Since the outcome is the same, I don't see the benefit...

ThomasLandauer avatar Sep 16 '22 20:09 ThomasLandauer

Closing as fixed because we now mention Stimulus in the docs, list the different components and provides links to resources at https://ux.symfony.com Thanks!

javiereguiluz avatar Feb 09 '23 16:02 javiereguiluz