Page MenuHomePhabricator

Display current category state on Import Preview Page
Closed, ResolvedPublic3 Estimated Story Points

Description

Motivation
Currently, users do not see categories at all on the Import Page, except when they open the wikitext.
We should allow users to see which categories their file currently has, and encourage them to exchange them for ones that fit the commons categories.

Mock

Bildschirmfoto 2018-03-13 um 11.47.40.png (408×1 px, 143 KB)

Acceptance Criteria

  • There is a category box below the displayed wikitext on FileInfo as shown in the mock
  • Below the category box there is an info text: Files on Wikimedia Commons should be categorized. This makes it easier to find them. You can add categories to this file by editing the file info on this page.
  • The category box behaves like it would on a normal Commons page, i.e. it shows all categories that do not exist red linked, and all those that do exist blue linked
  • The category info is updated whenever the wikitext was updated

Note
The edge case of no categories existing for the file will be treated in a different ticket.
Thoughts so far: [] If there is no category yet, it adds and shows the "Media needing category" category for Commons, but allows any other category to be added in general
UploadWizard is dealing with this in a way we could copy.

Related Objects

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes
Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Lea_WMDE set the point value for this task to 13.Mar 13 2018, 4:23 PM
thiemowmde triaged this task as Medium priority.Jul 4 2018, 10:36 AM

Change 507374 had a related patch set uploaded (by Andrew-WMDE; owner: Andrew-WMDE):
[mediawiki/extensions/FileImporter@master] [WIP] Display current categories on preview page

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

@Lea_WMDE We're hoping for a bit more specification, about what the behavior should be when the file has no categories.

I can't find any explicit best practice documented on Commons, but there are the following clues:

  • Several schemes have been used on commons, but this format seems to be dominant: "Media needing categories as of 27 February 2019". These are produced using a substitution {{subst:unc}} which expands to the template: {{Uncategorized|year=2016|month=December|day=6}}.
  • There might be an open debate about unc vs chc, though I don't see any discussion beyond the single sentence in Template:unc.
  • https://whatcanidoforwikimediacommons.org/ says, "There is a huge backlog at Category:Media needing categories." This suggests that when we create a new category like "media needing categories as of 1 January 1969", and perhaps this category should be created as a subcategory of that parent. Maybe we should also make it a subcategory of "All media needing categories as of 1969"? Currently the by-year category is actually tagged directly on each file, and is a hidden category.

Should we be using the unc substitution when importing? What do we do when importing to a wiki other than commonswiki, where these templates may not exist?

Personally, the dated category thing irks me but I'm too much of an outsider to question existing on-wiki practices. Do we know whether the dated categories have proven useful to help address the categorization backlog? Should we investigate this further?

@awight thanks for raising the issue! As far as I know, if you upload an image to Commons and it does not yet have a category, it is tagged with "XX needing categories as of Day Month Year". So this seems to be the result of {{subst:unc}} and I suggest we follow the behavior. I don't think we would be creating a new category, since this is the same category that all other files without a category from that day would be placed in. I would expect Commons to do all the magic of making this a sub category of broader categories, and would only want us to do the magic ourselves if this is also being done via the usual Commons upload mechanisms (e.g. UploadWizard).

chc, if I read documentation correctly, seems to request a category check. This is why I would feel more comfortable with the unc template.

The mock currently says "It is recommended that you fill in some categories for the upload. You can do that by editing the file info." I would like to raise two minor concerns about this:

  • The message does not say anything about the motivation, the "why". UploadWizard says "to make it easier to find":

Screenshot from 2019-05-07 15-04-32.png (107×683 px, 10 KB)

  • Suggesting to edit the file info is not the best way to edit categories, as it means the user needs to edit wikitext, and does not get any suggestions for categories. It's much easier to just import the file and edit the categories later with one of the super powerful gadgets, some of which are even enabled by default for all users.

Change 509450 had a related patch set uploaded (by Awight; owner: Awight):
[mediawiki/extensions/FileImporter@master] [squash] Reorganize category code

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

Change 509450 abandoned by Awight:
[squash] Reorganize category code

Reason:
squashed.

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

thiemowmde changed the point value for this task from 13 to 3.
thiemowmde added a subscriber: Andrew-WMDE.
WMDE-Fisch moved this task from Review to Doing on the WMDE-QWERTY-Sprint-2019-05-15 board.
WMDE-Fisch subscribed.

Below the category box there is an info text: Files on Wikimedia Commons should be categorized. This makes it easier to find them. You can add categories to this file by editing the file info on this page.

I guess we still need to add this.

Change 507374 merged by jenkins-bot:
[mediawiki/extensions/FileImporter@master] Display current categories on preview page

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

Below the category box there is an info text: Files on Wikimedia Commons should be categorized. This makes it easier to find them. You can add categories to this file by editing the file info on this page.

I guess we still need to add this.

@Lea_WMDE ^ I feel uneasy about this--there's been some discussion about how categories are best added outside of wikitext, so maybe we should suggest that instead? Also, is this text only displayed when there are no categories? Should we take this off of the acceptance criteria and resolve along with the empty categories task T222873?

Change 512171 had a related patch set uploaded (by Awight; owner: Awight):
[mediawiki/extensions/FileImporter@master] Add notice about categorization

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

Discussed, and the patch reflects the text we want.

Change 512171 merged by jenkins-bot:
[mediawiki/extensions/FileImporter@master] Add notice about categorization

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

Lea_WMDE moved this task from Demo to Done on the WMDE-QWERTY-Sprint-2019-05-15 board.

Change 598692 had a related patch set uploaded (by Thiemo Kreuz (WMDE); owner: Thiemo Kreuz (WMDE)):
[mediawiki/extensions/FileImporter@master] Add missing whitespace between (i) and "category encouragement"

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

Change 598692 merged by jenkins-bot:
[mediawiki/extensions/FileImporter@master] Add missing whitespace between (i) and "category encouragement"

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