Page MenuHomePhabricator

[EPIC] Display statements made with deleted federated properties
Open, Needs TriagePublic13 Estimated Story Points

Description

We need to display properties differently in situations where a federated property that has been used to make a statement on the local Wikibase is later deleted on the source wiki.

BDD (Scenario: Display Deleted Property)
Given the federated property used to make a statement was deleted on the source Wiki
When I load the item page
Then the property is displayed as "Pxx (Deleted Property)"

Related Objects

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptApr 21 2020, 10:26 AM
Addshore added a subscriber: Addshore.EditedApr 27 2020, 1:03 PM

I will break these points down into subtasks soon.
(This is the output of our task breakdown)

  • Extract the wbgetentities call for all needed properties(entities) during rendering into another service
    • So the "magic" prefetching via the label / term lookup would already prefetch the details for the needed entities (this behaviour should be researched and documented later)
    • The service would always fetch all of the information that we need (labels, descriptions and aliases in all possible languages & existence of the entity)
    • This service would cache responses in the process
    • This service would allow retrieval of parts of the result?
  • Use the new wbgetentitie service in the ApiPrefetchingPropertyTermLookup (implemented in a previous sprint)
  • Create a service that is an EntityExistanceChecker with method ->isDeleted()
    • One implementation would use an EntityTitleLookup and the $title->isKnown() method
    • Another implementation would use the new wbgetentities service
  • Alter EntityUrlLookup interface to have 2 methods, the getFullUrl (for use in contexts like search), and a new one getUrl which gives the localUrl for local entities and the full url for remote entities. (also document this in the phpdc well)
  • Rewrite LabelsProviderEntityIdHtmlLinkFormatter to remove use of the EntityTitleLookup service, and instead use the new EntityExistanceChecker service, and our already created EntityUrlLookup and EntityTitleTextLookup
  • Rewire the federated properties entity type service definition for the EntityIdLabelFormatter to use LabelsProviderEntityIdHtmlLinkFormatter (and delete the temporary other formatter?)
  • Find and document this prefetching magic that happens when rendering an entity page (either for the whole entity or just terms / labels)
Samantha_Alipio_WMDE renamed this task from Display statements made with deleted federated properties to [EPIC] Display statements made with deleted federated properties .Apr 29 2020, 12:12 PM
Samantha_Alipio_WMDE set the point value for this task to 13.Mon, May 4, 9:35 AM