ember-radio-button
ember-radio-button copied to clipboard
groupValue and data down, actions up
In order of the data down, actions up paradigm it would be great to change the behavior of groupValue.
I run into this with a readOnly
or reads
computed property where i lost control over groupValue after the first change.
I would suggest to remove this line and let ppl handle the change of the groupValue
.
that's a breaking change, so we'd either need a version bump or to make it opt-in. I'm inclined to go opt-in. Open to a PR that accomplishes that
@fsmanuel @raycohen, I think it is time to go full ddau.
Anyone can still keep current behavior using:
{{radio-button
value="green"
changed=(action (mut color)) }}
that's a breaking change, so we'd either need a version bump or to make it opt-in. I'm inclined to go opt-in. Open to a PR that accomplishes that
I think a breaking change and major version bump would make sense, in line with Ember guidelines and road ahead. It would be in line with the convention of the ember frameworks to share (major) version numbers, too.
If it were opt-in, where would you expect to see the configuration? How would you name it?
Thank you, @raycohen!
I think bumping the major version to 2 and making DDAU the default behavior is probably the right path at this point. I am wondering if we can also increase the required ember version to take advantage of some of the newer features and perhaps introduce a radio-group
component
+1 to @raycohen's proposal
feedback on this PR to move towards data-down actions-up is welcome https://github.com/yapplabs/ember-radio-button/pull/32
to understand the concerns raised in the PR description, I recommend playing around with the dummy app.
I'm inclined to say that like input helpers the DDAU pattern doesn't fit here because it can result in the DOM being out of sync with what your application logic believes is the current value.
I've added https://github.com/yapplabs/ember-radio-button/pull/66 which solves this issue