Extension:Page Forms/Select2 for autocompletion

Switching Semantic Forms Autocompletion to Select2
 Public URL: : https://www.mediawiki.org/wiki/User:Jatin.me/GSoC14

 Bugzilla report: Bug 61974

 Announcement: (link to the announcement of your proposal at the wikitech-l mailing list.

Name and contact information
 Name: Jatin Mehta  Email: mehtajatin05@gmail.com IRC:  jme on freenode, channels: #mediawiki #semantic-mediawiki
 * Web Page / Blog / Microblog / Portfolio:Mediawiki User Profile: Jatin.me
 * My Blog: https://medium.com/@jatinmehta_
 * Linkedin: Jatin

Location: Allahabad, India (UTC+05:30) Typical working hours:  11 am - 5 pm (IST) and 10 pm - 2 am (IST)

Synopsis
Autocompletion of fields in Semantic Forms is one of the most important feature which allows users to see what the previously-entered values were for a given field, this greatly helps to avoid issues of naming ambiguity, spelling, etc. The goal of this project is to switch the currently available autocompletion in Semantic Forms from jquery UI Autocomplete to Select2.

Drawbacks in the current Autocompletion
Although some of these features are now possible with some recent changes in the Jquery-UI autocomplete library but that will also require changes in the current Autocompletion, so why not move on to a rather complete and robust system i.e. Select2 JS autocompletion.
 * The Jquery-UI autocomplete has a bind method for select but it just seemed a bit messy and the coding is not the easiest to follow.
 * It does not provide the feature of Tokenization for the fields which can hold multiple values.
 * Inflexible autocompletion for characters with accent.

Advantages of Select2 JS Autocompletion
It has everything from a solid multi-select feature to AJAX loading, to rich item formatting - very easy to use and powerful. It supports searching, remote data sets, and infinite scrolling of results. Browser compatibility: IE 8+, Chrome 8+, Firefox 10+, Safari 3+, Opera 10.6+.
 * Tagging: ability to add new items on the fly.
 * Flexible Accent Folding is also available.
 * Working with large, remote datasets: ability to partially load a dataset based on the search term.
 * Templating: support for custom rendering of results and selections.
 * Possible mentors
 * Yaron Koren, Stephan Gambke
 * Yaron Koren, Stephan Gambke

Switching to Select2 will make significant improvement

 * It will make ‘Tokenization’  possible for the fields which allow multiple values. Tags.png
 * Flexible autocompletion for characters with accents. (Accent-folding has its limitations but it can help make some important yet overlooked user interactions work better. An accent-folding function essentially maps Unicode characters to ASCII equivalents. Anywhere you apply case-folding, you should consider accent-folding, and for exactly the same reasons. With accent-folding, it doesn’t matter whether users search for cafe, café or even çåFé; the results will be the same.) Accent-folding.png ‎
 * Display of an image associated with each term.
 * Displaying values in a tree structure.
 * Much better support for autocompletion on remote data sets.

Different Phases of the project
Phase I: This phase would involve the basic task of introducing Select2 JS autocomplete to the current autocompletion system of Semantic Forms with no or minimal UI changes to get the whole system running fine with this new autocompletion system.

Phase II: In this phase I would integrate the feature for flexible autocompletion of characters with accents and the feature of displaying image associated with each term (which involves designing and improvements in UI ).

Phase III: This phase would involve more of designing part which include designing UI of tree-type structure for displaying values and UI for the autocompletion on remote data sets. Later in this phase I would also work on allowing admins/users to set layouts for the remote data sets.

Phase IV:

Deliverables
Please describe the details and the timeline of the work you plan to accomplish on the project you are most interested in (discuss these first with the mentor of the project):

About you

 * Education completed or in progress:


 * How did you hear about this program?


 * Will you have any other time commitments, such as school work, another job, planned vacation, etc., during the duration of the program?


 * We advise all candidates eligible to Google Summer of Code and FOSS Outreach Program for Women to apply for both programs. Are you planning to apply to both programs and, if so, with what organization(s)?

Past experience

 * Please describe your experience with any other FOSS projects as a user and as a contributor:


 * Please describe any relevant projects that you have worked on previously and what knowledge you gained from working on them (include links):


 * What project(s) are you interested in (these can be in the same or different organizations)?