-
-
Notifications
You must be signed in to change notification settings - Fork 37
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
Migrate most JavaScript code to Stimulus controllers #340
base: main
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.
Thanks, @elia! That's a great improvement for the experience with solidus starer frontend!
I left a question about the locale controller. Besides, I didn't manually test that all the behaviour remains in place, but I'm sure you did 🙂
Other than that, what do you think about splitting the work into different PRs? That would make reviewing and future references easier.
%> | ||
|
||
<ul class="<%= class_names %>"> | ||
<ul class="products-grid"> |
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.
❤️
@@ -0,0 +1,7 @@ | |||
import { Controller } from "@hotwired/stimulus" | |||
|
|||
export default class extends Controller { |
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.
I think I'm missing something. Where is this controller used? 🤔
Both the "primary" and "disabled" classes are not used anywhere in the CSS.
Allows better control and reuse for the address, and prepares for having the stimulus controller on the fieldset itself.
The CSS wasn't about inputs, but about the address step.
Added missing `const` declarations.
Mimic Stimulus controller and prepare for an easier migration.
Summary
Checklist
Check out our PR guidelines for more details.
The following are mandatory for all PRs:
The following are not always needed: