ComboBox and SuggestionBox migration to 4.0
ilya_shaikovsky Nov 3, 2009 10:07 AMThere I want to rise some question and points to be discussed for the combo and suggestion box components.
1) The first questions I wanted to rise - if we really need two components?
Actually combobox was designed after request to provide more lightweight component without table in popup and using client side suggestions.
I believe we could combine that in one component. E.g.
= for markup we could add attribute which could switch the component presentation or just make decision according to the fact if the user defined custom markup using columns inside or not.
= for data fetching way we could also add both definitions possibilities to the same component and just restrict usage of both in the same time. So the component could be defined either with suggestionValues for client side suggestion or with autocomplete method which should be called to fetch the data.
The second point of view.
If we will leave suggestion as is as separate component we could add possibility to attach it to multiple input components. In this case performance improvement will be achieved for example when the component should be used in tables or just for many fields of the user form.
2) Proposals list
This list not includes full features listing. There are just RFCs risen for current components functionality.
http://tinyurl.com/ykjyqhx
2.1) data fetching.
= Allow to pre-render the suggestions. It should be possible for ajax fetching mode.
= Allow to minimize count of request in ajax fetching mode. E.g. if the user not removing new characters but continue typing he could want the component just to filter already fetched list and not request the data for new prefix again and again. And if the characters removed (already entered prefix changed) - only then new list should be requested.
= Minimize count of request in ajax fetching mode by using caching. If the component already fetched some list for prefix then popup closed and the list called again without prefix change - request should not be called second time.
= DataScroller support. Provide the pagination mechanisms for long suggestion lists.
2.2)component markup
= additional facets header, footer for popup. And the same ones for columns should be supported if columns used in markup.
= inline markup for the component should be supported
2.3) input changes and suggestion filtering
= Provide mode where component js will not allow to enter the value which isn't suggested. (aka select mode)
= enableManualInput could be implemented in order not to allow keyboard input at all. So the component functionally become a select.
2.4) Misc
= google like suggestions. Nothing selected by default when suggestion appears so pressing enter not causes anything to be selected.
= If suggestion will be decided to implement as separate component. It should provide built-in input instead of to be attached to
some external one. Discussed many times at user forums and will allow us to rise the events more carefully (changing, component focusing and blur..)
== Also suggestions calling button should be optionally available for this case.
= more careful keyboard support. (just need to revise a few RFC issues in jira)
= careful JS API implementation. User should be able to
== fill the list on the client according to his logic.
== change the list by adding/removing some items from suggestions
== call suggestion popup with or without(cached) Ajax request from external js
To be continued...