-
-
Notifications
You must be signed in to change notification settings - Fork 356
[StimulusBundle] Docs, replace chart
examples by hello
to avoid confusion with the ChartJS component
#2707
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 2.x
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
As ChartJS component exists, the examples using
chart
as controller identifier are confusing. ChartJS component does not expectname
anddata
as values, butview
.Examples has been updated with a dead simple
hello world
style, which can not be confusing.