-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Replace jquery-ujs
with @hotwired/turbo
#2448
Conversation
6b3c858
to
dd95787
Compare
3259381
to
c3074a0
Compare
@seanpdoyle Thank you for doing this. What are your thoughts on replacing this
|
spec/example_app/app/views/admin/customers/_collection_item_actions.html.erb
Show resolved
Hide resolved
a78a5ca
to
ee358f4
Compare
09f2953
to
43da734
Compare
965dc25
to
7a9ec8f
Compare
19a2e6e
to
66497ef
Compare
f667fba
to
bc718a1
Compare
8e8dbb2
to
d38f8fa
Compare
Replace our client-side dependency on `jquery-ujs` with [@hotwired/turbo][]. In addition to adding an entry to the `package.json` file, this commit replaces `[data-confirm]` attributes with `[data-turbo-confirm]`, and `[data-method]` attributes with `[data-turbo-method]`. In an effort to minimize the diff, this commit *does not* replace the `link_to` calls made with `method: :delete` with [button_to][] calls. Ideally, they'd utilize `button_to` to render a `<form>` element for the destructive action. In the future, once that change is complete, the `data: {turbo_method: :delete}` attributes can once again be passed as `method: :delete` options. [@hotwired/turbo]: https://turbo.hotwired.dev [turbo-rails]: https://github.com/hotwired/turbo-rails [link_to]: https://edgeapi.rubyonrails.org/classes/ActionView/Helpers/UrlHelper.html#method-i-link_to [button_to]: https://edgeapi.rubyonrails.org/classes/ActionView/Helpers/UrlHelper.html#method-i-button_to
Thanks again for keeping this up to date, @seanpdoyle! |
Thank you for pushing this forward! Just to highlight some troubles: this PR seems to introduce some test flakiness with regard to the search field. I'm not sure about the cause, since the #2447 PR was the one responsible for modifying how those test drive the search behavior. It's something to monitor in the future. |
Ah, interesting, thanks! I'll keep an eye on it and open an issue if it keeps happening. I know on a certain client project we had some trouble with the way we're using to writing feature/system specs and test flakiness and I might need some help digging into it. |
Replace our client-side dependency on
jquery-ujs
with@hotwired/turbo.
In addition to adding an entry to the
package.json
file, this commitreplaces
[data-confirm]
attributes with[data-turbo-confirm]
, and[data-method]
attributes with[data-turbo-method]
.In an effort to minimize the diff, this commit does not replace the
link_to
calls made withmethod: :delete
with button_to calls.Ideally, they'd utilize
button_to
to render a<form>
element for thedestructive action.
In the future, once that change is complete, the
data: {turbo_method: :delete}
attributes can once again be passed asmethod: :delete
options.