stimulus_reflex
stimulus_reflex copied to clipboard
2 Issues: Nonexistent Cable Ready operation selectors / data-reflex shorthand
Bug Report
Describe the bug
Found 2 bugs while pairing with @marcoroth
- If a reflex contains multiple CableReady operations and some of the operations have element selectors that don't exist on the page, then none of the operations in that reflex set will run.
- The shorthand that lets you omit the
click->inclick->Reflex#actionon buttons doesn't work. Leaving out theclick->causes the action to not fire off.
To Reproduce
Clone this repo, start the server, click the buttons on the root url
Expected behavior
All 3 buttons should work based on stimulus reflex expectations
Versions
StimulusReflex
- Gem: 3.5.0.pre6
- Node package: 3.5.0-pre6
External tools
- Ruby: 2.7
- Rails: 6.1.4.1
I have a fix in progress for the first issue.
The second issue is a decision @hopsoft made early in the life of this project to not support Stimulus shorthand.
The first issue was resolved in 3.5.0-pre6 and the Stimulus shorthand for the data-reflex attribute is not going to be implemented. Therefore I'm going to close this issue for now.