The Joomla!® User Experience Portal

Welcome, Guest
Username Password: Remember me

The JS that convert all selects and radio elements is very unpleasant
(1 viewing) (1) Guest
  • Page:
  • 1

TOPIC: The JS that convert all selects and radio elements is very unpleasant

The JS that convert all selects and radio elements is very unpleasant 8 months ago #1172

And inflexible too.

1. When values are shorter select takes space

2012-09-20_12-21-41.png


2. When values are longer it is cut

2012-09-20_12-22-45.png


3. When radio element loaded with Ajax i have to run JS again over all DOM

2012-09-20_12-24-50.png


Solution
Leave everything as it is. Let radio be radio and list be list as it used to be. But if I want something with search in it I can use type="listseach" or if I need toggle bar instead of radio I use type="toggle"

This way will be the best. Otherwise Joomla will lose on Usability a lot with 3.0 release. It will make more fun than excitement.

The rule is simple. Just do not change bootstrap. Do not make experience of the developer unexpected. Like you markup one thing and you get something else and then you think how come? If you want to invent something put it aside as additional tool. Do not force your inventions over everyone. Give us freedom to use things like we want. Let developer decide where he wants margin and where doesn't.

What I am confronting now is to create whole set of my own elements to be used with my extension although Bootstrap was suposed to solve this problem.

Re: The JS that convert all selects and radio elements is very unpleasant 8 months ago #1180

Hi,
Bootstrap has been extended and customized for Joomla since it lacked accessibility and didn't work well with language strings, and other Joomla-specific issues. I implemented some of these changes, others were forced by the bugsquad and I didn't necessarily agree...

The JavaScript select boxes aren't Bootstrap though, they're Chosen JS. You don't have to load them in your own component views if you don't want them.

For the Chosen long language string not wrapping, that's an issue where a Bootstrap btn-group has a nowrap, but we added specific CSS to fix this, not sure why it's not working. This is the CSS:
.btn-group .chzn-results {
white-space: normal;
}


The radio toggles are a huge usability improvement, but again you don't have to use them in your own component, they only activate when the form xml has class="btn-group" for the radio element
-Kyle Ledbetter

Re: The JS that convert all selects and radio elements is very unpleasant 8 months ago #1193

My point was different. I suggested formatting toggels in the element class but not with JS on DOM load. Because when I load form with Ajax it does not work. I have to run this JS over again.

Re: The JS that convert all selects and radio elements is very unpleasant 7 months, 1 week ago #1265

Kyle, have you seen Select2 - ivaynberg.github.com/select2/

I tried Chosen for my last project but was disappointed by it's lack of flexibility and options. I found Select2 a lot more powerful and may provide J developers more flexibility. I don't know if it's too late but if Chosen proves to be a pain for the community, it's something to think about. Just my two cents.
  • Page:
  • 1
Time to create page: 0.42 seconds