stimulus_reflex icon indicating copy to clipboard operation
stimulus_reflex copied to clipboard

2 Issues: Nonexistent Cable Ready operation selectors / data-reflex shorthand

Open pooriajr opened this issue 4 years ago • 1 comments

Bug Report

Describe the bug

Found 2 bugs while pairing with @marcoroth

  1. 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.
  2. The shorthand that lets you omit the click-> in click->Reflex#action on buttons doesn't work. Leaving out the click-> 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

pooriajr avatar Oct 23 '21 05:10 pooriajr

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.

leastbad avatar Oct 23 '21 13:10 leastbad

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.

marcoroth avatar Jan 15 '23 21:01 marcoroth