Page MenuHomePhabricator

Improve PageTriage module folder names
Closed, ResolvedPublic

Description

The PageTriage /modules/ folder (containing all the JavaScript / front end files) currently looks like this

image.png (472×397 px, 33 KB)

image.png (729×1 px, 103 KB)

It is not possible to differentiate which folders contain modern files (Vue re-write), and which folders contain old files that we want to replace (Backbone, Underscore, jQuery), without further investigation. I propose we put the Vue files in their own parent folder named "vue" or "rewrite" or something, or add the word "vue" or "rewrite" or something to existing folders. Should be able to differentiate at a glance.

  • rename folders related to Vue in /modules/ to include "vue" or "rewrite" or something
    • new pages feed (gerrit:966276)
    • curation toolbar already in a vue folder
  • make corresponding renames to Jest tests that touch affected files
    • new pages feed (gerrit:966276)
    • curation toolbar already in a vue folder

Additionally, names like "list" are not very descriptive. I suggest we change that to newPagesFeed, to correspond with Special:NewPagesFeed.

  • rename folders related to Special:NewPagesFeed (currently named "list") to something like newPagesFeed
  • make corresponding renames to Jest tests that touch affected files

I added a section detailing this folder structure to MediaWiki, see https://www.mediawiki.org/wiki/Extension:PageTriage#Directory_structure. But it's not ideal that I need to write this documentation. With better names, documentation would likely not be needed.

Event Timeline

jsn.sherman triaged this task as Medium priority.
jsn.sherman moved this task from Ready to In Progress on the Moderator-Tools-Team (Kanban) board.
jsn.sherman changed the task status from Open to In Progress.Oct 10 2023, 5:45 PM
jsn.sherman changed the task status from In Progress to Stalled.Oct 11 2023, 5:08 PM
jsn.sherman moved this task from In Progress to Ready on the Moderator-Tools-Team (Kanban) board.

I'm going to wait on the curation toolbar merge to do this to avoid a bunch of conflicts. Marking as stalled to reflect the workflow reality.

jsn.sherman changed the task status from Stalled to In Progress.Oct 16 2023, 5:37 PM
jsn.sherman moved this task from Ready to In Progress on the Moderator-Tools-Team (Kanban) board.

Change 966276 had a related patch set uploaded (by Jsn.sherman; author: Jsn.sherman):

[mediawiki/extensions/PageTriage@master] JS modules: rename list to newPagesFeed.vue

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

Change 966282 had a related patch set uploaded (by Jsn.sherman; author: Jsn.sherman):

[mediawiki/extensions/PageTriage@master] JS modules: move views.list to views.newPagesFeed

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

  • I made sure the new curation toolbar lives in a vue subdirectory in the toolbar module. Since we're doing an incremental migration, it needs to live within the toolbar module, so I think we're good there.
  • I have a patch for renaming ext.pageTriage.list to ext.pagetriage.newPagesFeed.vue which handles both the clear vue naming and better naming for vue things related to the feed.
  • I have another patch for renaming ext.pageTriage.views.list to ext.pageTriage.views.newPagesFeed, which handles better naming for backbone things related to the feed.

Change 966276 merged by jenkins-bot:

[mediawiki/extensions/PageTriage@master] JS modules: rename list to newPagesFeed.vue

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

Change 966282 merged by jenkins-bot:

[mediawiki/extensions/PageTriage@master] JS modules: move views.list to views.newPagesFeed

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

Samwalton9-WMF added a subscriber: Samwalton9-WMF.

Moving back to ready given the last couple of items to be done.

MPGuy2824 changed the task status from In Progress to Open.Fri, Jan 26, 5:59 AM

Change 993207 had a related patch set uploaded (by MPGuy2824; author: MPGuy2824):

[mediawiki/extensions/PageTriage@master] Rename the modules/ext.pageTriage.views.toolbar/ directory

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

Change 993207 merged by jenkins-bot:

[mediawiki/extensions/PageTriage@master] Rename the modules/ext.pageTriage.views.toolbar/ directory

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

Novem_Linguae updated the task description. (Show Details)