Page MenuHomePhabricator

Replace usages of WikiPage::prepareContentForEdit
Open, NormalPublic

Description

Status quo: WikiPage::prepareContentForEdit() provides access to PST-transformed and rendered content for pre-save or post-save processing. It uses a kind of home-brew memoization mechanism to allow callbacks to access this information while a new revision is being saved, without having to re-generate it.

The PreparedEdit object returned by prepareContentForEdit() is not sufficient for multi-content revision handling. Also, several fields exposed by it seem to be unused, or and/or have unclear semantics.

A better mechanism is needed to provide (cached?) access to PST content and rendered ParserOutput each slot, as well as a ParserOutput containing the combined rendering of all slots. Ideally, callbacks would receive a provider object as a parameter which facilitates lazy creation and caching (see T194049).

A first attempt to cover the described functionality can be found in the DerivedPageDataUpdater class proposed in https://gerrit.wikimedia.org/r/c/405015/. However, a more narrow interface should be exposed to calling code, and WikiPage should (eventually) no longer server as the factory and in-situ-cache for the provider object.

Related Objects

StatusAssignedTask
Declineddchen
OpenNone
OpenNone
DuplicateNone
OpenNone
ResolvedAbit
OpenNone
OpenNone
OpenNone
OpenNone
DuplicateNone
OpenNone
OpenNone
OpenNone
OpenNone
OpenNone
Resolvedppelberg
ResolvedKrinkle
OpenNone
OpenNone
OpenNone
OpenNone
OpenNone
OpenNone
Opendaniel
OpenNone
Resolveddaniel
InvalidTgr
ResolvedAnomie
ResolvedAnomie

Event Timeline

daniel triaged this task as Normal priority.May 7 2018, 1:17 PM
daniel created this task.
Restricted Application added a project: Wikidata. · View Herald TranscriptMay 7 2018, 1:17 PM
daniel removed daniel as the assignee of this task.May 7 2018, 1:18 PM
Vvjjkkii renamed this task from Replace usages of WikiPage::prepareContentForEdit to 9gdaaaaaaa.Jul 1 2018, 1:11 AM
Vvjjkkii raised the priority of this task from Normal to High.
Vvjjkkii updated the task description. (Show Details)
Vvjjkkii removed subscribers: Aklapper, gerritbot.
CommunityTechBot renamed this task from 9gdaaaaaaa to Replace usages of WikiPage::prepareContentForEdit.Jul 2 2018, 6:41 AM
CommunityTechBot lowered the priority of this task from High to Normal.
CommunityTechBot updated the task description. (Show Details)
CommunityTechBot added subscribers: Aklapper, gerritbot.
WDoranWMF moved this task from MCR to mop on the Core Platform Team board.Fri, Jul 26, 6:40 PM