hoo created this task.
hoo added projects: Wikidata, MediaWiki-extensions-WikibaseRepository, Maps 
(Kartographer).
Restricted Application added a subscriber: Aklapper.

TASK DESCRIPTION
  Wikibase renders Kartographer maps via `CachingKartographerEmbeddingHandler` 
which is typically used in contexts where we don't have access to the page 
title/ revision id we're rendering for (as the Wikibase formatter stack is 
supposed to be decoupled from these specifics). Currently this is being worked 
around by just assuming the revision id is the latest revision and the page 
title is the main request title (`RequestContext::getMain()->getTitle()`).
  
  In order to fix this I propose:
  
  1. Leaving the preview formatter 
(`SnakFormatter::FORMAT_HTML_VERBOSE_PREVIEW`) as is, as I don't see a good way 
to address this and its only used for previews while editing (the API used for 
this currently doesn't know which page it operates on, but for previews that 
should be fine, as they don't intend to put data into the parser cache anyway).
  2. Allow (optionally, due to the restrictions we face regarding preview html) 
injecting the page title and revision id into 
`CachingKartographerEmbeddingHandler`
  3. Make the html formatter (`SnakFormatter::FORMAT_HTML`) output a simple, 
but easy to identify html snippet containing the coordinate and potential 
metadata
  4. In repo, use the `ContentAlterParserOutput` hook to extract the simple 
html references and properly render the Kartographer maps at this point (where 
we have access to the page title and revision id we're parsing for). This would 
still be using `CachingKartographerEmbeddingHandler`.
  5. The ParserOutput handling for Kartographer maps 
(`GlobeCoordinateKartographerDataUpdater`) should be changed to also use the 
actual page title and revision id (which should be available at that point).

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

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

To: hoo
Cc: Aklapper, hoo, mrephabricator, Astuthiodit_1, karapayneWMDE, Invadibot, 
maantietaja, ItamarWMDE, Akuckartz, Alilje, Nabetaro, Nandana, MSantos, 
lucamauri, Lahi, Gq86, Looniverse, GoranSMilovanovic, Sturm, QZanden, 
Orienteerix, LawExplorer, Ddproxy, _jensen, rosalieper, JGirault, Scott_WUaS, 
phabyogi, GAllegre, Susannaanas, ferdbold, lxbarth, Planemad, Wikidata-bugs, 
aude, awight, Yurik, TheDJ, Mbch331, Jay8g
_______________________________________________
Wikidata-bugs mailing list -- wikidata-bugs@lists.wikimedia.org
To unsubscribe send an email to wikidata-bugs-le...@lists.wikimedia.org

Reply via email to