Failure

User tests: Successful: Unsuccessful:

avatar Bakual
Bakual
30 Jul 2013

See Feature Tracker:
http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&tracker_item_id=31514

Chosen has performance issues when facing a huge amount of options. Since the menu item view (like most views) use JHtml::_('formbehavior.chosen', 'select'); to load Chosen on every <select>, this can break the creation of menu items.
This PR makes use of the default behaviour of JHtml::_('formbehavior.chosen'); which triggers on the class .advancedSelect.

This PR will do a few things:

  • Changing the list formfield so it defaults to the class "advancedSelect" if no class is given. Currently there is no default at all.
  • Changing the list formfield so it removes this class if there are more than 10'000 options.
  • Changing the call JHtml::_('formbehavior.chosen', 'select'); to use the default JHtml::_('formbehavior.chosen'); in the menu item view.
avatar Bakual Bakual - open - 30 Jul 2013
avatar nicksavov
nicksavov - comment - 25 Aug 2013

Hi Thomas,

Looks like this is out-of-sync. Could you update it to master?

avatar Bakual
Bakual - comment - 25 Aug 2013

Merged master without conflicts

avatar nicksavov
nicksavov - comment - 25 Aug 2013

Thanks Thomas! :)

avatar Fedik
Fedik - comment - 28 Aug 2013

@Bakual maybe you have idea how to find out with Chosen performance with all other select items in backend?
related pull #1302

avatar Bakual
Bakual - comment - 28 Aug 2013

The content of this PR could certainly be extended to other areas of the CMS.
However I kept it simple on purpose so it's easier to test and it adresses the main issue that was brought up in the google group.

avatar Bakual
Bakual - comment - 24 Oct 2013

Merged upstream master

avatar betweenbrain
betweenbrain - comment - 3 Mar 2014

@Bakual What are your thoughts on extending this PR to cover all JForm fields that are rendered as a select elements and all backend views of the CMS? This issue with Chosen seems to affect other views of the CMS and other JForm fields like type="menuitem" multiple="true".

avatar Bakual
Bakual - comment - 3 Mar 2014

@betweenbrain No objections from me to expand this. I initially did this because the issue was raised in the Google Group for this particular view.

avatar betweenbrain
betweenbrain - comment - 3 Mar 2014

@betweenbrain No objections from me to expand this. I initially did this because the issue was raised in the Google Group for this particular view.

I'm in favor of that and happy to help. Please let me know if I can do anything.

avatar Bakual
Bakual - comment - 4 Jun 2014

Closing in favor of #3721 which is the same as this, but updated, a bit improved and against staging.

avatar Bakual Bakual - close - 4 Jun 2014
avatar Bakual Bakual - head_ref_deleted - 4 Jun 2014

Add a Comment

Login with GitHub to post a comment