mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-25 20:46:48 +00:00
Simple Rails forms prevent double-clicking on submit already. Converting the StimulusReflex interaction to a simple form submit to a controller solves the race condition. The UX is slightly worse because the whole page is reloaded instead rendering only the connected app panel. But we can solve that when we add more apps and want to activate them independently. By then, we may have good patterns for working with Turbo. Technically, the new buttons are a form within a form which is invalid HTML, but it works.
883 B
883 B