Version: unspecified
Severity: enhancement
See Also:
https://bugzilla.wikimedia.org/show_bug.cgi?id=40076
Description
Details
- Reference
- bz38785
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
Open | None | T29312 Implement visual interface for changing the categories a page is in | |||
Open | None | T96911 Improve UploadWizard UX (tracking) | |||
Resolved | • Prtksxna | T40785 UploadWizard: Make category suggestions case-insensitive |
Event Timeline
I wrote a comment, but it failed to upload from some reason, re-submitting:
When one add a category through upload wizard category adder, it give some suggestion (using hot-cat style). Though, when try to add something like:
Professors from israel, the suggestion stops at the i since the category's name is Professors from Israel. Would be moew user-friendly to suggest the right category name and if choosen, uppercase or lowercase as needed.
Hi there!
We accomplish this using the mw.api.getCategoriesByPrefix [0] function. Until that function has this capability, this is not a UW bug, it's upstream. Sorry!
Recategorizing.
The mediawiki.api module is just a convenience wrapper in javascript around jQuery.ajax and the server-side api.php. Features such as case-insensitive search require much deeper integration:
- (massive) Database indexes for searching
- then (easy) support in the api.php module for allpages/prefix
mediawiki.api.category would transparently start working (or if needed, pass a simple parameter to trigger it)
Rephrasing bug to represent the original use case.
Implementation could vary. Implementing case-insensitive prefix search in allpages would require a huge database index probably.
Another solution would be to make mw.Api.getCategoriesByPrefix() make use of ApiOpenSearch (action=opensearch) which (if TitleKey is installed, which it is on Wikimedia) supports case-insensitive search.
I am not sure if this is low-enhancement because reports of unpleased users are popping up:
https://commons.wikimedia.org/w/index.php?oldid=113075033#Category_selection
Importance: Normal-normal (Of course you are free to revert me)
Also: Hotcat supports this feature. I could not find the line in the source code but it may be possible to steal it.
getCategoriesByPrefix() has no business caring about case sensitivity, the underlying API is case-sensitive by design. UploadWizard should use something like search suggestions (action=opensearch), which is case-insensitive.
Change 208932 had a related patch set uploaded (by Prtksxna):
mwCoolCats: Use action=opensearch instead of getCategoriesByPrefix()
Change 208932 merged by jenkins-bot:
mwCoolCats: Use action=opensearch instead of getCategoriesByPrefix()