Anomie added a comment.

What does matter is what changes if any get made in DifferenceEngine.

I don't expect any, since DifferenceEngine is per content model. You'd just have one DifferenceEngine for each slot.

Something needs to change, because the way it's currently called gets "the" content handler, passes revision IDs without any indication of desired slots, and relies on DifferenceEngine to extract "the" Content object for each revision.

If the only change is that we get a content handler per slot and pass the slot role when creating each DifferenceEngine, that's fine, but it's still a change in the signature of ContentHandler::createDifferenceEngine() and DifferenceEngine::__construct().

And it should also be possible to specify multiple slots explicitly with text parameters.

That would be nice (for ApiParse as well as ApiComparePages), but I'm not sure it's really needed.

It's needed for stuff like the "live preview" feature.

Yes - which is "whatever PreparedEdit::getCombinedParserOutput() returns".

ApiParse doesn't actually use WikiPage::prepareContentForEdit(). I don't think it even can, since ApiParse would need to pass in ParserOptions and that method is designed for preparing a ParserOutput for canonical options.

I note that EditPage previews don't use WikiPage::prepareContentForEdit() either, likely because that too wants to use ParserOptions specific to the user.


TASK DETAIL
https://phabricator.wikimedia.org/T174032

EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Anomie
Cc: gerritbot, Aklapper, daniel, Giuliamocci, Adrian1985, Cpaulf30, Lahi, PDrouin-WMF, Gq86, Baloch007, E1presidente, Ramsey-WMF, Cparle, Darkminds3113, SandraF_WMF, Lordiis, GoranSMilovanovic, Adik2382, Th3d3v1ls, Ramalepe, Liugev6, QZanden, Tramullas, Acer, LawExplorer, Lewizho99, Maathavan, Susannaanas, Aschroet, Jane023, Wikidata-bugs, PKM, Base, matthiasmullie, aude, Ricordisamoa, Lydia_Pintscher, Fabrice_Florin, Raymond, Anomie, Steinsplitter, Mbch331
_______________________________________________
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs

Reply via email to