This input field is only for language names. There's no reason for it
to have something longer. Looking at the logs of searches,
people sometimes write very long things there: gibberish,
URLs, inappropriate search strings, mistaken pastes from other places,
and so on.
So it should be limited by maxlength.
It's practically never useful after 20 characters, but setting at 40
just to be on the safe side. The longest language name in langdb is 34.
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
* 20px spacing above and below the "No results found" message.
* 12px spacing above and below the search indications ("You can search by...")
* Adjusting the text color to use Base20 (#54595D)
* Adjust the background to use the same background color as the area above it (#FCFCFC).
* Add a top border in Base80 (#EAECF0) to separate both areas.
See https://phabricator.wikimedia.org/T175235
* 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
* Custom no-results message support
* Refactoring and clean up for LanguageCategoryDisplay class
* Document the options for LanguageCategoryDisplay class
* Reduce the spreading of no results handler code
* Add an option to accept no results template
* Remove unwanted, unused constructor too
* Use CSS to hide or show the no-results view
* Remove the unwanted noresults method in jquery.uls.core, directly
call the same method of lcd.
* Add an example
* Support a function returning jquery element as the no-result handler
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
* Drop the ugly height: 100% hack and do it properly and remove TODO
* after( $suggestions.show() ) seems to not work as expected in recent
jQuery versions. Changed it to manipulate the presence of 'hide'
class properly.
* Consistency fix in a comment
* Fixed a bug where creating multiple ULS instances would break the
"no search results" functionality. This is because we were appending
a jQuery element wrapped in a $(). This is obviously a no-op and a
regression when the template actually was a string and not jQuery.
Fixed by using clone() on it.
https://phabricator.wikimedia.org/T175233
In a list of languages to select autonyms must be unique so that
every user would know what to select.
* Batak Toba language in the Batak writing variant (bbc-batk) has
an autonum in the right script now. This is taken from the Indonesian
Wikipedia article "Surat Batak".
* Similarly to the practice with pa -> pa-guru:
* iu for Inuktitut in the Canadian script redirects to ike-cans.
* ks for Kashmiri in the Arabic writing redirects to ks-arab.
* tg for Tajik in the Cyrillic script redirects to tg-cyrl.
* zgh has an updated autonym, taken from Ethologue.
* zh-classical redirects to lzh, similarly to zh-yue -> yue.