Page MenuHomePhabricator

Integrate QuickCategories into Cat-a-lot for efficient editing of large categories
Open, Needs TriagePublicFeature

Description

Currently, Cat-a-lot requires users to manually select files to batch-edit categories. This becomes inefficient when dealing with categories containing thousands of files. This task proposes adding support for QuickCategories integration using PetScan + PagePile for large-scale category edits, improving usability and performance for power users.

Features Currently Implemented

  • A toggle appears in the Cat-a-lot UI only on category pages when the category contains more than a defined threshold of files (currently set to 100 for testing).
  • If the toggle is checked:
    • The entire media section is visually highlighted.
    • The counter updates to reflect the total number of files in the category (e.g., “1569 files selected”).
    • Clicking any action (+ / → / −) redirects to QuickCategories, generating a PagePile for the category using PetScan.
    • A descriptive title is generated for QuickCategories based on the action.
    • A notification informs users when QuickCategories opens and suggests checking popup blockers if nothing happens.
  • If the user selects a large number of files manually (irrespective of the size of the current category), a confirmation dialog prompts whether to proceed with QuickCategories or Cat-a-lot's in-browser editing. Currently, the threshold is set low for ease of testing.

To test
Disable Cat-a-lot from your preferences and add the following to your common.js:

mw.loader.load('//commons.wikimedia.org/w/index.php?title=User:Adiba_anjum3/Gadget-Cat-a-lot-large-files.js&action=raw&ctype=text/javascript');

Video Demonstration
You can watch the following short video to better understand how the feature works.
Video Link - The demo video was too large to embed here, so I’ve uploaded it to Google Drive.

This is a bare-bones working version of the feature (currently limited to commons). It still needs refinement so feedback is very much appreciated.

Event Timeline

Hi @Don-vip !
I'm tagging you here since you're a power user of Cat-a-lot, especially for editing large numbers of files. We think this feature could be particularly useful for your workflow. Would love to hear your thoughts or feedback when you have time.

Wow this looks awesome, thank you! I'll try it as soon as I have the need to process an entire category and let you know.

I found a bug, I selected all files of a category that only contains 4 pictures, and I got this popup:

image.png (1×2 px, 444 KB)

Thanks for testing, @Don-vip! That’s actually not a bug, I had temporarily lowered the manual file selection threshold for easier testing. It’s now been reset to 200, so the confirmation popup should only appear for genuinely large manual selections going forward. It should behave as expected now. :)
If you notice anything else, feel free to let me know!

OK I no longer have the error, now it works as expected. I submitted two batches, it works very fine. Thank you for this very useful work, it will save me a lot of time in the future!

One report in talkpage was that "Other comment: the new version did not allow for recategorizing the same file to the same cat with a new sort key after the pipe, the old version does that well."

I think that it doesn't pass the new sortkey to quickcategories (so this is confirmed there). However, does this happen also when page is edited with cat-a-lot too?

Hmm, now the T395770 is more or less (i hope) successfully out i think that this one is next one. I think that technically version 06:53, 18 August 2025 works. (as newer version have new changes compared to version which was in testing), but there are some user interface what will still need to be addressed

  1. As there is already new interface elements in Cat-a-lot dialog so quickcategories integration should be more minimalistic when it adds new UI elements (because limited screen estate)
  2. Since users need to log in to QuickCategories before linking works, this needs to be communicated to the user somehow. I was thinking something like this:
    • the "first time" a user starts to delegate tasks to QuickCategories, there would be an information dialog with steps explaining what the user needs to do, along with a link to QuickCategories and user info.
    • Only after the user has acknowledged this dialog would it continue with submitting data to PetScan and opening the QuickCategories link.
    • The info dialog would be shown every time until the user checks the "Do not show again" checkbox in the dialog.
    • Information about whether the user has checked the checkbox can be saved using mw.Api().saveOption() and can be read with mw.user.options.get().