Skip to content
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

Add support for button groups #47

Closed
extesy opened this issue Dec 11, 2012 · 12 comments
Closed

Add support for button groups #47

extesy opened this issue Dec 11, 2012 · 12 comments

Comments

@extesy
Copy link

extesy commented Dec 11, 2012

One particular UI element is missing - button groups:

<div class="btn-group" data-toggle="buttons-radio">
  <button id="score20" class="team2score btn btn-small">0</button>
  <button id="score21" class="team2score btn btn-small">1</button>
  <button id="score22" class="team2score btn btn-small">2</button>
  <button id="score23" class="team2score btn btn-small">3</button>
  <button id="score24" class="team2score btn btn-small">4</button>
  <button id="score25" class="team2score btn btn-small">5</button>
</div>

I should support both "buttons-checkbox" and "buttons-radio" toggle styles.

@dmathieu
Copy link
Contributor

I don't think btn-group would be a good addition. It is only an html tag, which has no use for any binding attribute.
And adding all the buttons programmatically would make it harder to maintain the template.
Just add a div btn-group with all your buttons around it.

@extesy
Copy link
Author

extesy commented Dec 12, 2012

@dmathieu But it does have a useful binding: selected button! I would rather use one control with a single-variable binding than do jquery magic to figure out which of the buttons from the group is selected. It's actually quite similar to the dropdown list with options in this sense.

@dmathieu
Copy link
Contributor

I don't see any change, visible nor in the dom in the bootstrap documentation for the selected button in btn-group.

Anyway, selected button or not, the problem remains the same. This would be one very big handlebars helper with a lot of parameters in it, which would be very hardly usable.

@extesy
Copy link
Author

extesy commented Dec 12, 2012

Selected button has 'active' class added to it. Why should the helper be big? How is list of buttons in div tag different from list of options in select tag?

@dmathieu
Copy link
Contributor

Buttons are components by themselves.
They need to have bindable attributes, and possibly change the current route when clicking on them.

An option in a select tag is only an array entry, which doesn't behaves as a component by itself. It exists only because it is wrapped around a select tag, which controls it.

@extesy
Copy link
Author

extesy commented Dec 12, 2012

Yes, that's true, but I think it's ok to not support the full button's functionality for each individual button in a group. Some helper is better than no helper and the ability to bind to the currently selected button(s) is very useful in itself.

@diosney
Copy link

diosney commented Dec 20, 2012

@dmathieu : Hi, navigation bars are in this category too? I mean: are too complex of implement or otherwise they can be implemented in another way?

Can be used a mix of ember-bootstrap and twitter-bootstrap.js itself in the same project?

@dmathieu
Copy link
Contributor

@diosney: I think navigation bars could be implemented. And yes ember bootstrap and the native twitter bootstrap libraries can be used together.
Note : for the purpose of readability, it would be better to open a new ticket for new requests/issues.

@diosney
Copy link

diosney commented Dec 20, 2012

Sure, I will file a new issue with the navigation request.

Thanks.

@dmathieu
Copy link
Contributor

Hmm, I read progress bar, foolish me.
In fact, navbars have somewhat the same problem as button groups.

Look at modalPane for example.
It exists, but the buttons are currently having only the default bootstrap behavior. We can't use the router on them.
The problem with those groups is the same.

@diosney
Copy link

diosney commented Dec 20, 2012

Oh! I see. Thanks anyway, I will close the issue then referencing this one.

@dmathieu
Copy link
Contributor

Closing this one too. If you have an implementation to propose, please open a pull request.

rtablada pushed a commit to rtablada/ember-bootstrap that referenced this issue Jun 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants