New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplified Ember.RadioButtonGroup implementation #1235

Closed
wants to merge 17 commits into
from

Conversation

Projects
None yet
@ghempton
Member

ghempton commented Aug 4, 2012

This PR contains the same API as #755 but has a simper implementation. Ember.RadioButton can also be used independently of Ember.RadioButtonGroup.

Also introduces Ember.Control which is a view that uses itself as its context, necessary for the Ember.RadioButtonGroup implementation.

@travisbot

This comment has been minimized.

Show comment
Hide comment
@travisbot

travisbot Aug 4, 2012

This pull request passes (merged 7bea55f2 into d8f76a7).

This pull request passes (merged 7bea55f2 into d8f76a7).

@travisbot

This comment has been minimized.

Show comment
Hide comment
@travisbot

travisbot Aug 4, 2012

This pull request passes (merged 657da83 into d8f76a7).

This pull request passes (merged 657da83 into d8f76a7).

@caligo-mentis

This comment has been minimized.

Show comment
Hide comment
@caligo-mentis

caligo-mentis Aug 11, 2012

Contributor

Nice implementation! But last selected button doesn't uncheck when value becomes null.

Contributor

caligo-mentis commented Aug 11, 2012

Nice implementation! But last selected button doesn't uncheck when value becomes null.

@ghempton

This comment has been minimized.

Show comment
Hide comment
@ghempton

ghempton Aug 11, 2012

Member

Could you write a failing test case?

Member

ghempton commented Aug 11, 2012

Could you write a failing test case?

@caligo-mentis

This comment has been minimized.

Show comment
Hide comment
@caligo-mentis

caligo-mentis Aug 11, 2012

Contributor

Shure.

test("should uncheck previous selection when new value is null", function() {
  view = Ember.RadioButtonGroup.create({
    value: 'option1',
    name: 'testName',
    template: Ember.Handlebars.compile(
      '{{ view RadioButton value="option1" }}' +
      '{{ view RadioButton value="option2" }}'
    )
  });

  appendView();

  Ember.run(function() {
    set(view, 'value', null);
  });

  equal(get(view, 'value'), null, 'value should be set');
  equal(view.$("[value='option1']").attr('checked'), null, 'checkbox should not be checked');
  equal(view.$("[value='option2']").attr('checked'), null, 'checkbox should not be checked');
});
Contributor

caligo-mentis commented Aug 11, 2012

Shure.

test("should uncheck previous selection when new value is null", function() {
  view = Ember.RadioButtonGroup.create({
    value: 'option1',
    name: 'testName',
    template: Ember.Handlebars.compile(
      '{{ view RadioButton value="option1" }}' +
      '{{ view RadioButton value="option2" }}'
    )
  });

  appendView();

  Ember.run(function() {
    set(view, 'value', null);
  });

  equal(get(view, 'value'), null, 'value should be set');
  equal(view.$("[value='option1']").attr('checked'), null, 'checkbox should not be checked');
  equal(view.$("[value='option2']").attr('checked'), null, 'checkbox should not be checked');
});
@ghempton

This comment has been minimized.

Show comment
Hide comment
@ghempton

ghempton Aug 12, 2012

Member

Thanks! Should be fixed now.

Member

ghempton commented Aug 12, 2012

Thanks! Should be fixed now.

@travisbot

This comment has been minimized.

Show comment
Hide comment
@travisbot

travisbot Aug 12, 2012

This pull request passes (merged a8be921 into d8f76a7).

This pull request passes (merged a8be921 into d8f76a7).

@caligo-mentis

This comment has been minimized.

Show comment
Hide comment
@caligo-mentis

caligo-mentis Aug 12, 2012

Contributor

Ok, much better. But now it's stop working in the browser at all :) I've send PR to your repo.

Contributor

caligo-mentis commented Aug 12, 2012

Ok, much better. But now it's stop working in the browser at all :) I've send PR to your repo.

@caligo-mentis

This comment has been minimized.

Show comment
Hide comment
@caligo-mentis

caligo-mentis Aug 13, 2012

Contributor

I also realized that there is problem with 'isChecked:checked' attribute binding. At least on Chrome. I wrote the working version today, but using custom observers on isChecked property.

Contributor

caligo-mentis commented Aug 13, 2012

I also realized that there is problem with 'isChecked:checked' attribute binding. At least on Chrome. I wrote the working version today, but using custom observers on isChecked property.

@travisbot

This comment has been minimized.

Show comment
Hide comment
@travisbot

travisbot Aug 13, 2012

This pull request passes (merged 9f9f58f into d8f76a7).

This pull request passes (merged 9f9f58f into d8f76a7).

@ghempton

This comment has been minimized.

Show comment
Hide comment
@ghempton

ghempton Aug 13, 2012

Member

@caligo-mentis The test you added seems to be passing :/. I think what this really needs is a fiddle. I might have time to put one together later today.

Member

ghempton commented Aug 13, 2012

@caligo-mentis The test you added seems to be passing :/. I think what this really needs is a fiddle. I might have time to put one together later today.

@caligo-mentis

This comment has been minimized.

Show comment
Hide comment
@caligo-mentis

caligo-mentis Aug 13, 2012

Contributor

What browser you are using?
On 13.08.2012, at 20:59, Gordon L. Hempton wrote:

@caligo-mentis The test you added seems to be passing :/. I think what this really needs is a fiddle. I might have time to put one together later today.


Reply to this email directly or view it on GitHub.

Contributor

caligo-mentis commented Aug 13, 2012

What browser you are using?
On 13.08.2012, at 20:59, Gordon L. Hempton wrote:

@caligo-mentis The test you added seems to be passing :/. I think what this really needs is a fiddle. I might have time to put one together later today.


Reply to this email directly or view it on GitHub.

@ghempton

This comment has been minimized.

Show comment
Hide comment
@ghempton

ghempton Aug 13, 2012

Member

I am using chrome beta. It also passed in travis (although not sure if that is working correctly)

Member

ghempton commented Aug 13, 2012

I am using chrome beta. It also passed in travis (although not sure if that is working correctly)

@caligo-mentis

This comment has been minimized.

Show comment
Hide comment
@caligo-mentis

caligo-mentis Aug 14, 2012

Contributor

Please check this fiddle http://jsfiddle.net/ZPzU2/

The problem is what checked attribute binding does not affect on DOM element. After few changes with mouse it is not possible to update selection through bindings.

Contributor

caligo-mentis commented Aug 14, 2012

Please check this fiddle http://jsfiddle.net/ZPzU2/

The problem is what checked attribute binding does not affect on DOM element. After few changes with mouse it is not possible to update selection through bindings.

@ghempton

This comment has been minimized.

Show comment
Hide comment
@ghempton

ghempton Aug 14, 2012

Member

I see. I will take a pass on this today.

On Tue, Aug 14, 2012 at 12:44 PM, Andrey notifications@github.com wrote:

Please check this fiddle http://jsfiddle.net/ZPzU2/

The problem is what checked attribute binding does not affect on DOM
element. After few changes with mouse it is not possible to update
selection through bindings.


Reply to this email directly or view it on GitHubhttps://github.com/emberjs/ember.js/pull/1235#issuecomment-7737794.

Gordon L. Hempton
http://codebrief.com
360.460.8098

Member

ghempton commented Aug 14, 2012

I see. I will take a pass on this today.

On Tue, Aug 14, 2012 at 12:44 PM, Andrey notifications@github.com wrote:

Please check this fiddle http://jsfiddle.net/ZPzU2/

The problem is what checked attribute binding does not affect on DOM
element. After few changes with mouse it is not possible to update
selection through bindings.


Reply to this email directly or view it on GitHubhttps://github.com/emberjs/ember.js/pull/1235#issuecomment-7737794.

Gordon L. Hempton
http://codebrief.com
360.460.8098

@caligo-mentis

This comment has been minimized.

Show comment
Hide comment
@caligo-mentis

caligo-mentis Aug 14, 2012

Contributor

Ok. And check my implementation http://jsfiddle.net/66QJm/

Contributor

caligo-mentis commented Aug 14, 2012

Ok. And check my implementation http://jsfiddle.net/66QJm/

@ghempton

This comment has been minimized.

Show comment
Hide comment
@ghempton

ghempton Aug 14, 2012

Member

If your implementation passes all the tests and fixes the issue above, I say we just go with that :). Want to PR my repo?

Member

ghempton commented Aug 14, 2012

If your implementation passes all the tests and fixes the issue above, I say we just go with that :). Want to PR my repo?

@caligo-mentis

This comment has been minimized.

Show comment
Hide comment
@caligo-mentis

caligo-mentis Aug 14, 2012

Contributor

The issue is fixed, but I think the problem seems to be in attributeBindings.

I can write more tests for RadioButtonGroup, and create PR, but if problem is in ember.js we should fix it before.

On 14.08.2012, at 23:59, Gordon L. Hempton wrote:

If your implementation passes all the tests and fixes the issue above, I say we just go with that :). Want to PR my repo?


Reply to this email directly or view it on GitHub.

Contributor

caligo-mentis commented Aug 14, 2012

The issue is fixed, but I think the problem seems to be in attributeBindings.

I can write more tests for RadioButtonGroup, and create PR, but if problem is in ember.js we should fix it before.

On 14.08.2012, at 23:59, Gordon L. Hempton wrote:

If your implementation passes all the tests and fixes the issue above, I say we just go with that :). Want to PR my repo?


Reply to this email directly or view it on GitHub.

@wagenet

This comment has been minimized.

Show comment
Hide comment
@wagenet

wagenet Oct 8, 2012

Member

@ghempton What's the status of this?

Member

wagenet commented Oct 8, 2012

@ghempton What's the status of this?

@ahawkins

This comment has been minimized.

Show comment
Hide comment
@ahawkins

ahawkins Nov 14, 2012

Contributor

@ghempton can you add an example of a static radio group? I mean an example where you want to display N options to the user but they don't change.

EDIT: I just noticed this. I have my RadioButtonGroup bound to a controller:

{{#view Inbox.FilterRadioButtonGroup valueBinding="selectedFilter"}}

Should setting selectedFilter change the selected radio button? If so, this does not work ATM.

EDIT2: seems it's the same thing that @caligo-mentis mentioned. The checked property is not removed properly and the UI cannot be updated via bindings.

Contributor

ahawkins commented Nov 14, 2012

@ghempton can you add an example of a static radio group? I mean an example where you want to display N options to the user but they don't change.

EDIT: I just noticed this. I have my RadioButtonGroup bound to a controller:

{{#view Inbox.FilterRadioButtonGroup valueBinding="selectedFilter"}}

Should setting selectedFilter change the selected radio button? If so, this does not work ATM.

EDIT2: seems it's the same thing that @caligo-mentis mentioned. The checked property is not removed properly and the UI cannot be updated via bindings.

@ahawkins

This comment has been minimized.

Show comment
Hide comment
@ahawkins

ahawkins Nov 15, 2012

Contributor

@wagenet Status update: I've sent a PR to @ghempton repo to fix bugs. You can find it here: ghempton#2. If he does not respond in a timely fashion then I will take over this PR.

Contributor

ahawkins commented Nov 15, 2012

@wagenet Status update: I've sent a PR to @ghempton repo to fix bugs. You can find it here: ghempton#2. If he does not respond in a timely fashion then I will take over this PR.

@ahawkins

This comment has been minimized.

Show comment
Hide comment
@ahawkins

ahawkins Nov 25, 2012

Contributor

@wagenet @tomdale @wycats @kselden If there is interest in this then I can take charge and do what it takes to get this in. Otherwise close this PR if we don't want to support radio buttons in the framework.

Contributor

ahawkins commented Nov 25, 2012

@wagenet @tomdale @wycats @kselden If there is interest in this then I can take charge and do what it takes to get this in. Otherwise close this PR if we don't want to support radio buttons in the framework.

@ghempton

This comment has been minimized.

Show comment
Hide comment
@ghempton

ghempton Nov 25, 2012

Member

Hey guys, sorry about not noticing this. My inbox has been swamped in github notifications. I will take a look at this today.

Member

ghempton commented Nov 25, 2012

Hey guys, sorry about not noticing this. My inbox has been swamped in github notifications. I will take a look at this today.

@ghempton

This comment has been minimized.

Show comment
Hide comment
@ghempton

ghempton Nov 25, 2012

Member

@twinturbo I have merged in your PR and rebased against master. Are there any other outstanding issues with this PR? @caligo-mentis?

Member

ghempton commented Nov 25, 2012

@twinturbo I have merged in your PR and rebased against master. Are there any other outstanding issues with this PR? @caligo-mentis?

@caligo-mentis

This comment has been minimized.

Show comment
Hide comment
@caligo-mentis

caligo-mentis Nov 25, 2012

Contributor

@ghempton everything should be ok now.

Contributor

caligo-mentis commented Nov 25, 2012

@ghempton everything should be ok now.

@wagenet

This comment has been minimized.

Show comment
Hide comment
@wagenet

wagenet Nov 25, 2012

Member

@ghempton Any idea why it doesn't merge cleanly?

Member

wagenet commented Nov 25, 2012

@ghempton Any idea why it doesn't merge cleanly?

@ghempton

This comment has been minimized.

Show comment
Hide comment
@ghempton

ghempton Nov 25, 2012

Member

@wagenet not sure... it was failing before due to a deprecated jQuery feature but I fixed the tests. Looks like Travis hasn't re-run them. Any ideas?

Member

ghempton commented Nov 25, 2012

@wagenet not sure... it was failing before due to a deprecated jQuery feature but I fixed the tests. Looks like Travis hasn't re-run them. Any ideas?

@wagenet

This comment has been minimized.

Show comment
Hide comment
@wagenet

wagenet Nov 26, 2012

Member

@ghempton It's not a test failure, it's that it can't merge automatically which means there's a merge conflict.

Member

wagenet commented Nov 26, 2012

@ghempton It's not a test failure, it's that it can't merge automatically which means there's a merge conflict.

@ghempton

This comment has been minimized.

Show comment
Hide comment
@ghempton

ghempton Nov 26, 2012

Member

@wagenet gotcha. Just rebased again, should merge cleanly now.

Member

ghempton commented Nov 26, 2012

@wagenet gotcha. Just rebased again, should merge cleanly now.

@ahawkins

This comment has been minimized.

Show comment
Hide comment
@ahawkins

ahawkins Nov 26, 2012

Contributor

@ghempton you should update the CHANGELOG

Contributor

ahawkins commented Nov 26, 2012

@ghempton you should update the CHANGELOG

@workmanw

This comment has been minimized.

Show comment
Hide comment
@workmanw

workmanw Apr 29, 2013

Contributor

As would I. We're already using it in our code base, it'd be nice to have it in master.

Contributor

workmanw commented Apr 29, 2013

As would I. We're already using it in our code base, it'd be nice to have it in master.

@ahawkins

This comment has been minimized.

Show comment
Hide comment
@ahawkins

ahawkins Apr 29, 2013

Contributor

We are using it as well. I think many people are.

On Mon, Apr 29, 2013 at 4:59 PM, Wesley Workman notifications@github.comwrote:

As would I. We're already using it in our code base, it'd be nice to have
it in master.


Reply to this email directly or view it on GitHubhttps://github.com/emberjs/ember.js/pull/1235#issuecomment-17171696
.

Contributor

ahawkins commented Apr 29, 2013

We are using it as well. I think many people are.

On Mon, Apr 29, 2013 at 4:59 PM, Wesley Workman notifications@github.comwrote:

As would I. We're already using it in our code base, it'd be nice to have
it in master.


Reply to this email directly or view it on GitHubhttps://github.com/emberjs/ember.js/pull/1235#issuecomment-17171696
.

ZogStriP added a commit to ZogStriP/discourse that referenced this pull request May 27, 2013

FIX: You can't change a subject whilst Flagging
Meta: [You can't change a subject whilst Flagging](http://meta.discourse.org/t/you-can-t-change-a-subject-whilst-flagging/6887)

This revert a change made by @eviltrout in b794830 in the `flag_view.js`.
The `Em.run.schedule('afterRender', function() {...})` is apparently not enough. Had to schedule the event on the next run loop.

Hopefully, the PR emberjs/ember.js#1235 will soon be merged in and we'll have a proper radio button control in Ember.js.
@npalrecha

This comment has been minimized.

Show comment
Hide comment

+1

@stefanpenner

This comment has been minimized.

Show comment
Hide comment
@stefanpenner

stefanpenner Jun 6, 2013

Member

thoughts on this becoming ember/ember-radio-controls addon?

Member

stefanpenner commented Jun 6, 2013

thoughts on this becoming ember/ember-radio-controls addon?

@ahawkins

This comment has been minimized.

Show comment
Hide comment
@ahawkins

ahawkins Jun 6, 2013

Contributor

+1

On Thu, Jun 6, 2013 at 5:14 AM, Stefan Penner notifications@github.comwrote:

thoughts on this becoming ember/ember-radio-controls addon?


Reply to this email directly or view it on GitHubhttps://github.com/emberjs/ember.js/pull/1235#issuecomment-19022664
.

Contributor

ahawkins commented Jun 6, 2013

+1

On Thu, Jun 6, 2013 at 5:14 AM, Stefan Penner notifications@github.comwrote:

thoughts on this becoming ember/ember-radio-controls addon?


Reply to this email directly or view it on GitHubhttps://github.com/emberjs/ember.js/pull/1235#issuecomment-19022664
.

@workmanw

This comment has been minimized.

Show comment
Hide comment
@workmanw

workmanw Jun 6, 2013

Contributor

I would personally like to see it in Ember Core. Ember.Select is in the core and it's pretty similar in principle. I'd be interested to hear what makes Ember.RadioButtonGroup different?

That said, ember/ember-radio-controls is better than this staying open for another 6 months.

Contributor

workmanw commented Jun 6, 2013

I would personally like to see it in Ember Core. Ember.Select is in the core and it's pretty similar in principle. I'd be interested to hear what makes Ember.RadioButtonGroup different?

That said, ember/ember-radio-controls is better than this staying open for another 6 months.

@tchak

This comment has been minimized.

Show comment
Hide comment
@tchak

tchak Jun 6, 2013

Member

@stefanpenner at some point we need to have Ember.Radio in code or ditch all of the controles. I don't think ditching controles is a good idea. So we need to add radio. People a laughing at us because of radio not being supported out of the box :/

Member

tchak commented Jun 6, 2013

@stefanpenner at some point we need to have Ember.Radio in code or ditch all of the controles. I don't think ditching controles is a good idea. So we need to add radio. People a laughing at us because of radio not being supported out of the box :/

@ahawkins

This comment has been minimized.

Show comment
Hide comment
@ahawkins

ahawkins Jun 6, 2013

Contributor

@tchalk confirm. I laughed when I found out Radio wasn't there. What's so
bad about having radios in 1.0?

On Thu, Jun 6, 2013 at 2:17 PM, Paul Chavard notifications@github.comwrote:

@stefanpenner https://github.com/stefanpenner at some point we need to
have Ember.Radio in code or ditch all of the controles. I don't think
ditching controles is a good idea. So we need to add radio. People a
laughing at us because of radio not being supported out of the box :/


Reply to this email directly or view it on GitHubhttps://github.com/emberjs/ember.js/pull/1235#issuecomment-19041181
.

Contributor

ahawkins commented Jun 6, 2013

@tchalk confirm. I laughed when I found out Radio wasn't there. What's so
bad about having radios in 1.0?

On Thu, Jun 6, 2013 at 2:17 PM, Paul Chavard notifications@github.comwrote:

@stefanpenner https://github.com/stefanpenner at some point we need to
have Ember.Radio in code or ditch all of the controles. I don't think
ditching controles is a good idea. So we need to add radio. People a
laughing at us because of radio not being supported out of the box :/


Reply to this email directly or view it on GitHubhttps://github.com/emberjs/ember.js/pull/1235#issuecomment-19041181
.

@tchak

This comment has been minimized.

Show comment
Hide comment
@tchak

tchak Jun 6, 2013

Member

@ahawkins the problem is radio button semantics are quite complex. We need to expose the right primitives.

Member

tchak commented Jun 6, 2013

@ahawkins the problem is radio button semantics are quite complex. We need to expose the right primitives.

@tchak

This comment has been minimized.

Show comment
Hide comment
@tchak

tchak Jun 6, 2013

Member

Ember.Control is reserved for something else. It is supposed to be the counterpart of Ember.Route but without url.

Ember.Radio should ba a primitive not something that tries to solve all the use cases IMHO.

Member

tchak commented Jun 6, 2013

Ember.Control is reserved for something else. It is supposed to be the counterpart of Ember.Route but without url.

Ember.Radio should ba a primitive not something that tries to solve all the use cases IMHO.

@ahawkins

This comment has been minimized.

Show comment
Hide comment
@ahawkins

ahawkins Jun 6, 2013

Contributor

@tchalk, how are they more complex than select?

On Thu, Jun 6, 2013 at 2:26 PM, Paul Chavard notifications@github.comwrote:

@ahawkins https://github.com/ahawkins the problem is radio button
semantics are quite complex. We need to expose the right primitives.


Reply to this email directly or view it on GitHubhttps://github.com/emberjs/ember.js/pull/1235#issuecomment-19041564
.

Contributor

ahawkins commented Jun 6, 2013

@tchalk, how are they more complex than select?

On Thu, Jun 6, 2013 at 2:26 PM, Paul Chavard notifications@github.comwrote:

@ahawkins https://github.com/ahawkins the problem is radio button
semantics are quite complex. We need to expose the right primitives.


Reply to this email directly or view it on GitHubhttps://github.com/emberjs/ember.js/pull/1235#issuecomment-19041564
.

@stefanpenner

This comment has been minimized.

Show comment
Hide comment
@stefanpenner

stefanpenner Jun 6, 2013

Member

@ahawkins select is a minefield. Our primitive controls need some love.

Member

stefanpenner commented Jun 6, 2013

@ahawkins select is a minefield. Our primitive controls need some love.

@tchak

This comment has been minimized.

Show comment
Hide comment
@tchak

tchak Jun 6, 2013

Member

@ahawkins they group... Speaking of wich, we do not support grouping of options in selects.

Member

tchak commented Jun 6, 2013

@ahawkins they group... Speaking of wich, we do not support grouping of options in selects.

@ahawkins

This comment has been minimized.

Show comment
Hide comment
@ahawkins

ahawkins Jun 6, 2013

Contributor

tl;dr ember form elements are embarrassing.

On Thu, Jun 6, 2013 at 2:35 PM, Paul Chavard notifications@github.comwrote:

@ahawkins https://github.com/ahawkins they group... Speaking of wich,
we do not support grouping of options in selects.


Reply to this email directly or view it on GitHubhttps://github.com/emberjs/ember.js/pull/1235#issuecomment-19041995
.

Contributor

ahawkins commented Jun 6, 2013

tl;dr ember form elements are embarrassing.

On Thu, Jun 6, 2013 at 2:35 PM, Paul Chavard notifications@github.comwrote:

@ahawkins https://github.com/ahawkins they group... Speaking of wich,
we do not support grouping of options in selects.


Reply to this email directly or view it on GitHubhttps://github.com/emberjs/ember.js/pull/1235#issuecomment-19041995
.

@stefanpenner

This comment has been minimized.

Show comment
Hide comment
@stefanpenner

stefanpenner Jun 6, 2013

Member

@tchak @ahawkins confirmed. Lets

Member

stefanpenner commented Jun 6, 2013

@tchak @ahawkins confirmed. Lets

@myabc

This comment has been minimized.

Show comment
Hide comment
@myabc

myabc Jun 8, 2013

+1 for releasing this as an ember/ember-radio-controls add-on

myabc commented Jun 8, 2013

+1 for releasing this as an ember/ember-radio-controls add-on

@stefanpenner

This comment has been minimized.

Show comment
Hide comment
@stefanpenner

stefanpenner Jun 8, 2013

Member

I think this is for the best, providing an addon with readme + tests + travis is more accessible. It would allow the project to ge the attention it needs, and reach maturity quicker.

Member

stefanpenner commented Jun 8, 2013

I think this is for the best, providing an addon with readme + tests + travis is more accessible. It would allow the project to ge the attention it needs, and reach maturity quicker.

@jagthedrummer

This comment has been minimized.

Show comment
Hide comment
@jagthedrummer

jagthedrummer Jun 26, 2013

+1 making this available somehow, somewhere. It's just silly that there's no way to create a radio button in Ember. It really should be a part of the core lib.

+1 making this available somehow, somewhere. It's just silly that there's no way to create a radio button in Ember. It really should be a part of the core lib.

@wagenet

This comment has been minimized.

Show comment
Hide comment
@wagenet

wagenet Jul 19, 2013

Member

It looks like the vote was for an add-on. If someone releases a solid add-on we can consider whether or not it's appropriate to merge into core later.

Member

wagenet commented Jul 19, 2013

It looks like the vote was for an add-on. If someone releases a solid add-on we can consider whether or not it's appropriate to merge into core later.

@wagenet wagenet closed this Jul 19, 2013

@guilhermeaiolfi

This comment has been minimized.

Show comment
Hide comment
@guilhermeaiolfi

guilhermeaiolfi Aug 2, 2013

It should be in core, no matter what the API is. We can break compat later in future versions. But we need to support that out of the box. Embarrassing...

It should be in core, no matter what the API is. We can break compat later in future versions. But we need to support that out of the box. Embarrassing...

@stefanpenner

This comment has been minimized.

Show comment
Hide comment
@stefanpenner

stefanpenner Aug 2, 2013

Member

@guilhermeaiolfi are you volunteering? The providing an alternative implementation using new Ember.Component would be useful.

Member

stefanpenner commented Aug 2, 2013

@guilhermeaiolfi are you volunteering? The providing an alternative implementation using new Ember.Component would be useful.

@wagenet

This comment has been minimized.

Show comment
Hide comment
@wagenet

wagenet Aug 2, 2013

Member

We actually can't just break the API. We're attempting to keep things stable and once we hit 1.0 (which will be soon), this becomes even more essential.

Member

wagenet commented Aug 2, 2013

We actually can't just break the API. We're attempting to keep things stable and once we hit 1.0 (which will be soon), this becomes even more essential.

@guilhermeaiolfi

This comment has been minimized.

Show comment
Hide comment
@guilhermeaiolfi

guilhermeaiolfi Aug 2, 2013

Using Ember.Component will make it much more easy to change it's internals later. We just need to define the attrs for it.

Using Ember.Component will make it much more easy to change it's internals later. We just need to define the attrs for it.

@hlubek

This comment has been minimized.

Show comment
Hide comment
@hlubek

hlubek Aug 2, 2013

I'm using the new views from the PR without any Ember.Control and it just works (the change that was needed is merged like @wagenet noted). Would be great to make this available (at least as an add-on).

hlubek commented Aug 2, 2013

I'm using the new views from the PR without any Ember.Control and it just works (the change that was needed is merged like @wagenet noted). Would be great to make this available (at least as an add-on).

```handlebars
{{#view Ember.RadioButtonGroup name="role" valueBinding="content.role"}}
{{view RadioButton value="admin"}}

This comment has been minimized.

@hlubek

hlubek Aug 2, 2013

The nested view has to be accessed with {{view view.RadioButton value="..."}} in the latest RC

@hlubek

hlubek Aug 2, 2013

The nested view has to be accessed with {{view view.RadioButton value="..."}} in the latest RC

@denisnazarov

This comment has been minimized.

Show comment
Hide comment
@denisnazarov

denisnazarov Sep 3, 2013

Contributor

Any updates here?

Contributor

denisnazarov commented Sep 3, 2013

Any updates here?

@askmatey

This comment has been minimized.

Show comment
Hide comment
@askmatey

askmatey Sep 5, 2013

Hello ??? Any updates here ??

askmatey commented Sep 5, 2013

Hello ??? Any updates here ??

@alvincrespo

This comment has been minimized.

Show comment
Hide comment
@alvincrespo

alvincrespo Sep 12, 2013

Contributor

👍 I would totally work on this, but I need to learn how to edit pull request(s).

Contributor

alvincrespo commented Sep 12, 2013

👍 I would totally work on this, but I need to learn how to edit pull request(s).

@kumavis

This comment has been minimized.

Show comment
Hide comment
@kumavis

kumavis Oct 31, 2013

Contributor

+1

Contributor

kumavis commented Oct 31, 2013

+1

@kumavis

This comment has been minimized.

Show comment
Hide comment
@kumavis

kumavis Oct 31, 2013

Contributor

@alvincrespo the correct way would be to just create a new PR

Contributor

kumavis commented Oct 31, 2013

@alvincrespo the correct way would be to just create a new PR

@wagenet

This comment has been minimized.

Show comment
Hide comment
@wagenet

wagenet Nov 1, 2013

Member

If you submitted the PR, you can edit, but not if someone else did.

Member

wagenet commented Nov 1, 2013

If you submitted the PR, you can edit, but not if someone else did.

@mansona

This comment has been minimized.

Show comment
Hide comment
@mansona

mansona Nov 1, 2013

Contributor

@wagenet @alvincrespo I know you can checkout the pull request and then you could effectively "fork" the pull request and make a new one. Once you do then if you mention the new pull request here it will become "linked"
(hope I helped ;)

Contributor

mansona commented Nov 1, 2013

@wagenet @alvincrespo I know you can checkout the pull request and then you could effectively "fork" the pull request and make a new one. Once you do then if you mention the new pull request here it will become "linked"
(hope I helped ;)

@chainlink

This comment has been minimized.

Show comment
Hide comment
@chainlink

chainlink Dec 13, 2013

+1 for this feature.

+1 for this feature.

@namlook

This comment has been minimized.

Show comment
Hide comment
@namlook

namlook Jan 30, 2014

Any update about this feature ?

namlook commented Jan 30, 2014

Any update about this feature ?

@cmkornell

This comment has been minimized.

Show comment
Hide comment
@cmkornell

cmkornell Feb 5, 2014

I pulled this code from @ghempton and updated it to extend from component, fixed up the documentation, updated the tests, and added helpers. It works great aside from the one failing test that I can't seem to hammer out; although, I see it working when I build Ember and use it in production, so I think I'm just missing something really simple.

Can someone please help me pass the last test so I can re-submit this PR? This is my first attempt at working with the Ember source and the Ember Testing Suite.

I really believe this should be in the core and @ghempton did an excellent job with it; I would love to help out in any way I can to make it happen.

Here's my branch: https://github.com/cmkornell/ember.js/tree/radio-button-group
The failing test: Ember.RadioButtonGroup: value should update correctly after change event

I pulled this code from @ghempton and updated it to extend from component, fixed up the documentation, updated the tests, and added helpers. It works great aside from the one failing test that I can't seem to hammer out; although, I see it working when I build Ember and use it in production, so I think I'm just missing something really simple.

Can someone please help me pass the last test so I can re-submit this PR? This is my first attempt at working with the Ember source and the Ember Testing Suite.

I really believe this should be in the core and @ghempton did an excellent job with it; I would love to help out in any way I can to make it happen.

Here's my branch: https://github.com/cmkornell/ember.js/tree/radio-button-group
The failing test: Ember.RadioButtonGroup: value should update correctly after change event

@mansona

This comment has been minimized.

Show comment
Hide comment
@mansona

mansona Sep 4, 2014

Contributor

I posted this on #4352 but i wanted to get some feedback on it and continue the discussion: https://www.npmjs.org/package/ember-radio-buttons Its a slightly simpler implementation than @ghempton 's but I think it should do for most cases

Contributor

mansona commented Sep 4, 2014

I posted this on #4352 but i wanted to get some feedback on it and continue the discussion: https://www.npmjs.org/package/ember-radio-buttons Its a slightly simpler implementation than @ghempton 's but I think it should do for most cases

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment