ember-radio-button icon indicating copy to clipboard operation
ember-radio-button copied to clipboard

groupValue and data down, actions up

Open fsmanuel opened this issue 9 years ago • 8 comments

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.

fsmanuel avatar Jun 18 '15 13:06 fsmanuel

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

raycohen avatar Jun 18 '15 14:06 raycohen

@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)) }}

miguelcobain avatar Nov 18 '15 10:11 miguelcobain

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!

tute avatar Feb 23 '16 23:02 tute

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

raycohen avatar Feb 24 '16 15:02 raycohen

+1 to @raycohen's proposal

lukemelia avatar Feb 24 '16 15:02 lukemelia

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.

raycohen avatar Feb 25 '16 16:02 raycohen

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.

raycohen avatar Mar 01 '16 15:03 raycohen

I've added https://github.com/yapplabs/ember-radio-button/pull/66 which solves this issue

Artmann avatar Oct 10 '17 16:10 Artmann