Anomie added a comment. |
In T174032#3990487, @daniel wrote:In T174032#3990355, @Anomie wrote:For ApiComparePages, we need to first figure out T174036: Allow the diffs to show multiple slots [MCR].
Diffs will be slot-by-slot. For T174036 we need to figure out how in what order they should be shown, with what headings, where the code for composing the HTML should live, etc. None of that matters for API output.
What does matter is what changes if any get made in DifferenceEngine.
ApiParse has several modes, and MCR only matters when the page parameter is specified.
Wrong. It obviously also matters if pageid or oldid are used. And it should also be possible to specify multiple slots explicitly with text parameters.
In that case, it should be possible to again handle this just like the ApiQueryRevisionsBase case: add a slots parameter, and return output for multiple/all slots if requested, be introducing another level in the result structure.
I can't think of any reasonable method of doing page views where that would make sense for any existing use of action="" Maybe a method that blindly concatenates them in alphabetical order by slot name?
Neither your proposal nor mine works with parsing the slots individually and returning separate HTML blobs for each one. Yours has another layer on top of parsing individual slots that somehow combines them all, while mine only directly parses the main slot and lets other slots either be transcluded or implicitly add themselves like Cite's automatic adding of references if no <references/> was present.
That leaves the question what exactly should happen if no slots parameter was specified.
The output should be the same HTML blob that is inserted into the skin chrome when viewing a page or is shown inside the <div id="wikiPreview"> when previewing an edit.
If a "slots" parameter affects the output at all, it should most likely behave the same as viewing a non-main slot if we add that ability to the web UI.
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