[StimulusBundle] Docs, replace chart examples by hello to avoid confusion with the ChartJS component - #2707
Conversation
Kocal
left a comment
There was a problem hiding this comment.
That's totally makes sense, thanks
|
Thanks for pointing that! I 100% agree for the confusion, but... we try to make examples that do have some sense and avoid the foo bars when possible. Maybe one of these:
WDYT ? |
|
@smnandre I would agree for advanced or "demo" examples (ones on ux.symfony.com). But on pure text documentation, I personally prefer to have easy to understand and dead simple examples like "Hello World". It's totally personal, if you prefer more advanced and real life example, I'm ok with that. |
|
In fact, with its unusual syntax for some, Stimulus isn’t always easy to grasp. The first examples here should be self-explanatory for most people, and I do believe we need to clearly emphasize what action, target, and controller mean. If I read this, with the value name, I’m pretty sure it could lead to confusion: <div {{ stimulus_controller('hello', { 'name': 'World', 'data': [1, 2, 3, 4] }) }}>That said, your original point is totally valid. I’ll send you another suggestion later today. |
smnandre
left a comment
There was a problem hiding this comment.
Well there is a lot to change on this page...
A few very minor details on your PR and LGTM!
Thx @welcoMattic
5b8eb5d to
77ee62e
Compare
|
Thank you @welcoMattic. |
As ChartJS component exists, the examples using
chartas controller identifier are confusing. ChartJS component does not expectnameanddataas values, butview.Examples has been updated with a dead simple
hello worldstyle, which can not be confusing.