* Scoll to currently highlighted item if its not visible.
* Fix navigation when list is filtered
* Add support for selecting highlighted item by pressing enter
The $.uls function in jquery.uls.core in createLanguageFilter
passes the onSelect function to the
$.fn.languagefilter so the onSelect there should be made
compatible.
Bug: T261973
ULS input element had onInputChange() handler attached to
change, textInput and input events.
That caused onInputChange() to be called twice when there is user
input and ULS gets closed, since 'change' event fires when
<input type="text"> element loses focus.
Registering handler only for 'input' is sufficient for the intent.
There was a mistake in #299: the $.trigger() must take only one argument
for extraParameters. Sending another parameter causes NULL to be logged in
EventLogging for ulsPurpose.
Add the ulsPurpose option. Empty string by default.
This is useful for web application that use ULS in several different context,
and need to distinguish what was the purpose of the particular ULS panel.
An example of usage can be found at
https://phabricator.wikimedia.org/T179402
* Make ULS responsive
* Depend on both screen size and number of languages when calculating
ULS menu width.
* Introduce resize listener to responsively recreate ULS when screen
size changes.
The resultHandler is responsible for updating the `LanguageCategoryDisplay`, so we should not call `render` separately in `search` when there is no search query.
https://phabricator.wikimedia.org/T185086
* Documentation updates
* Do not group search results by region
* Disable grouping by script when region grouping is disabled
* Add docs, clarify names per code review
* Fix bool -> boolean for consistency
It is a bad practice to assign id attributes when there is no guarantee
about the uniqueness of element. ULS should function even if there are
more than one instance of it is present in a page.
* Use eslint and stylelint, fix all errors
* Remove jshint, jsbeautify
* Use Object.keys directly since that is available in all major browsers
* Fixes for eslint, stylelint errors
* stylelint is not included in grunt test yet because jquery.uls.mobile.css
has so many !important and need to figure out whether they are really needed
It has lot of redundant and unused code used when we had the map.
Removing it. No change in functionality is expected
Change-Id: I278ef63b7756b5061c0b6638ba4e7b7deebf5a0d
If there is a search api configured, ULS list all languages that
pass the search irrespective of whether a language is present in
options.languages
Change-Id: I0be80397bb5b4071bc7bc5e787fe107c98e3d912
* Maps removed from UI
* From no-results UI, removed the links to navigate by clicking region names
* Removed the $.fn.regionSelctor plugin, Retained the RegionSelector class
* Removed all related css for the removed UI parts
* Reduced the padding for main ULS title so that the top header takes less height
* And a dozen of related changes
Change-Id: I8ac89ebe380047ca267e5c7720c2eaa3da080e9d
* Removed unused class end.
* Class uls-lcd-region-section was used in two different elements,
retained it on the outer one.
* Build a list of languages per region, once done render the regions at once.
* Use direct dom manipulation in hot spots.
* Use shorter selectors like children instead of find and dropping the tag name.
* Fixed mismatch when there were no results and when the message was shown.
* Less flickering by not hiding or showing regions unnecessary
* Cache the common languages "quicklist"
* Added itemsPerColumn as an option
Reduces time used to show language selector after clicking the trigger on my
machine from about 1.8s to about 380 ms (JS execution times, actual times are
about the same but little bigger. The actual rendering is now less than 100ms,
the rest is other setup overheard and $.fn.scrollIntoView which can take many
hundreds of milliseconds.