Page MenuHomePhabricator

Refactor code for dashboard lists
Closed, ResolvedPublic


Currently, on our dashboard, there are three lists - Suggestions (configurable), In progress and Published. First list is inside file and later two are in file. Both of these lists are defined as separate entities in extension.json and loaded as dependencies of, which is in file.

Some parts of those distinct types of dashboard lists are shared and can be factored out into a common parent of both and Since both list types are used in module with same applyFilters() interface, and have some other common init/show/hide logic (or parts of the logic are same), it makes sense to introduce abstract parent to both of these list classes. Inside of abstract parent, common methods between two lists can be defined, like logic to show dialog when user session expires - T200646: Communicate session has expired on dashboard when switching between lists.

Additionally, we can load all list classes needed for from a single Resource Loader module to reduce the burden on the Resource Loader (see T193612#4199278). Or maybe we can defer the loading of, since that list is configurable with $wgContentTranslationEnableSuggestions, which defaults to true since 1.30.0-wmf.19.

Finally, is the naming convention of yesterday, we can take the opportunity and rename to the pattern used nowadays.

Event Timeline

Change 449727 had a related patch set uploaded (by Petar.petkovic; owner: Petar.petkovic):
[mediawiki/extensions/ContentTranslation@master] Introduce common class for translation and suggestion lists

Change 449727 merged by jenkins-bot:
[mediawiki/extensions/ContentTranslation@master] Introduce common class for translation and suggestion lists

Restricted Application changed the subtype of this task from "Deadline" to "Task". · View Herald TranscriptSep 5 2018, 7:53 AM