TheDJ has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/156250

Change subject: Categories: Don't suggest empty or old categories
......................................................................

Categories: Don't suggest empty or old categories

The categories table holds all categories that exist OR have at one
point existed. This means it also contains a lot of vandalism and
other inappropriate names that happily come up in the suggestions.
This is undesirable. This changes the query to only list categories
with at least 1 entry.

Though technically it can be argued that an empty category with an
existing page might 'exist' and should thus be listed, with this
change they won't be. I don't think that is terribly incorrect to
say that such would be a 'new category', but we could also consider
renaming the label in the suggestion list to say:
'Currently unused category' or something similar.

As far as I can tell there is no way to test for page existance OR
generate a list based on allcategories with one API query.

Bug: 70025
Change-Id: I0e195d3ce26e69d4710d6a505b9da7d1b7678d92
---
M modules/ve-mw/ui/widgets/ve.ui.MWCategoryInputWidget.js
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor 
refs/changes/50/156250/1

diff --git a/modules/ve-mw/ui/widgets/ve.ui.MWCategoryInputWidget.js 
b/modules/ve-mw/ui/widgets/ve.ui.MWCategoryInputWidget.js
index e6c911a..4649695 100644
--- a/modules/ve-mw/ui/widgets/ve.ui.MWCategoryInputWidget.js
+++ b/modules/ve-mw/ui/widgets/ve.ui.MWCategoryInputWidget.js
@@ -57,6 +57,7 @@
        return ve.init.target.constructor.static.apiRequest( {
                action: 'query',
                list: 'allcategories',
+               acmin: 1,
                acprefix: this.value,
                acprop: 'hidden',
                redirects: ''

-- 
To view, visit https://gerrit.wikimedia.org/r/156250
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0e195d3ce26e69d4710d6a505b9da7d1b7678d92
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: TheDJ <hartman.w...@gmail.com>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to