[Wikidata-bugs] [Maniphest] [Commented On] T255882: Don’t use WikibaseRepo when initializing Client pageterms API

2020-07-01 Thread Ladsgroup
Ladsgroup added a comment.


  In T255882#6240846 , 
@Lucas_Werkmeister_WMDE wrote:
  
  > If the API behavior should stay the same, then I imagine we could resolve 
the direct Client→Repo dependency by registering some kind of “term buffer + 
entity ID lookup” stash in Lib, and Repo fills it with its services upon 
initialization, and Client fills it with its services only if it wasn’t already 
initialized by Repo. So the two extensions would coordinate via Lib instead of 
talk directly to one another, so to speak. Something similar could probably 
also be done if Product says the API should first return the terms of the 
current entity and otherwise the terms of the entity linked to the current 
page, or something like that.
  
  I would be very much in favor of having simpler logic in our codebase, this 
seems complicated (meaning harder to maintain and more likely to have bugs and 
harder onboarding). Sometimes complicated logic is inevitable, like high 
concurrency, large scale caching, etc. But this case can be resolved by having 
other API modules (all boils down to what product decide of course) but I would 
say complicated logic is a negative point for having everything in one place.

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

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

To: Ladsgroup
Cc: Ladsgroup, Aklapper, Lucas_Werkmeister_WMDE, darthmon_wmde, Nandana, Lahi, 
Gq86, GoranSMilovanovic, QZanden, LawExplorer, _jensen, rosalieper, Scott_WUaS, 
Wikidata-bugs, aude, Lydia_Pintscher, Mbch331
___
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs


[Wikidata-bugs] [Maniphest] [Commented On] T255882: Don’t use WikibaseRepo when initializing Client pageterms API

2020-06-24 Thread Lucas_Werkmeister_WMDE
Lucas_Werkmeister_WMDE added a comment.


  One solution would be to move the “page terms of //this item//” functionality 
to a separate API module.

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

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

To: Lucas_Werkmeister_WMDE
Cc: Aklapper, Lucas_Werkmeister_WMDE, darthmon_wmde, Nandana, Lahi, Gq86, 
GoranSMilovanovic, QZanden, LawExplorer, _jensen, rosalieper, Scott_WUaS, 
Wikidata-bugs, aude, Lydia_Pintscher, Mbch331
___
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs


[Wikidata-bugs] [Maniphest] [Commented On] T255882: Don’t use WikibaseRepo when initializing Client pageterms API

2020-06-19 Thread Lucas_Werkmeister_WMDE
Lucas_Werkmeister_WMDE added a comment.


  If the API behavior should stay the same, then I imagine we could resolve the 
direct Client→Repo dependency by registering some kind of “term buffer + entity 
ID lookup” stash in Lib, and Repo fills it with its services upon 
initialization, and Client fills it with its services only if it wasn’t already 
initialized by Repo. So the two extensions would coordinate via Lib instead of 
talk directly to one another, so to speak. Something similar could probably 
also be done if Product says the API should first return the terms of the 
current entity and otherwise the terms of the entity linked to the current 
page, or something like that.
  
  If the expected behavior is that the API always returns the terms of the 
entity connected to the current page, then I think we can simply remove the 
hack :)

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

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

To: Lucas_Werkmeister_WMDE
Cc: Aklapper, Lucas_Werkmeister_WMDE, darthmon_wmde, Nandana, Lahi, Gq86, 
GoranSMilovanovic, QZanden, LawExplorer, _jensen, rosalieper, Scott_WUaS, 
Wikidata-bugs, aude, Lydia_Pintscher, Mbch331
___
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs