mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-22 05:18:51 +00:00
Add TurboPower Rails gem for nice helpers
The helpers are more convenient but also allow us to add options like smooth scrolling. I thought that looked nicer and is less confusing. Please note that the `scroll_into_view` helper uses the `targets` attribute instead of `target`. That attribute needs CSS selectors with a leading `#` for ids.
This commit is contained in:
1
Gemfile
1
Gemfile
@@ -104,6 +104,7 @@ gem 'sidekiq-scheduler'
|
||||
gem "cable_ready"
|
||||
gem "stimulus_reflex"
|
||||
|
||||
gem "turbo_power"
|
||||
gem "turbo-rails"
|
||||
|
||||
gem 'combine_pdf'
|
||||
|
||||
@@ -785,6 +785,8 @@ GEM
|
||||
actionpack (>= 6.0.0)
|
||||
activejob (>= 6.0.0)
|
||||
railties (>= 6.0.0)
|
||||
turbo_power (0.6.2)
|
||||
turbo-rails (>= 1.3.0)
|
||||
tzinfo (2.0.6)
|
||||
concurrent-ruby (~> 1.0)
|
||||
unicode-display_width (2.5.0)
|
||||
@@ -973,6 +975,7 @@ DEPENDENCIES
|
||||
stripe
|
||||
timecop
|
||||
turbo-rails
|
||||
turbo_power
|
||||
valid_email2
|
||||
validates_lengths_from_database
|
||||
vcr
|
||||
|
||||
@@ -2,4 +2,4 @@
|
||||
= button t(:go), "report__submit-btn", "submit", disabled: true
|
||||
= turbo_stream.update "report-table" do
|
||||
= render "admin/reports/loading"
|
||||
= turbo_stream.action(:scroll_into_view, "report-table")
|
||||
= turbo_stream.scroll_into_view("#report-table", behavior: "smooth")
|
||||
|
||||
Reference in New Issue
Block a user