Jdlrobson created this task.
Jdlrobson added a subscriber: Jdlrobson.
Jdlrobson added a project: Wikidata-Page-Banner.
Herald added a subscriber: Aklapper.
Herald added a project: Wikidata.

TASK DESCRIPTION
  From https://gerrit.wikimedia.org/r/#/c/239010/
  > I found the (lack of) architecture hard to follow. Concpetually, what the 
extension does seems really simple - there is a list of banner sources (parser 
function, PageImages, Wikidata, global configuration), the first that can 
provide a banner name (according to some configurable order) will determine 
what is used. So I would expect a bunch of banner source classes, a 
configuration variable that contains a list of ObjectFactory arguments and a 
banner lookup class that goes through the sources the find which one can return 
a banner. Instead there is a hard-coded mess of static method calls, which is 
completely obscuring the logic.
  overuse of static methods. Something like $wpbFunctionsClass::doStuff() 
should be a huge red flag.
  
  Let's start cleaning this up step by step:
  [] Convert includes/WikidataPageBanner.functions.php  into a set of classes
  [] class Banner with methods addIcon, getHtml and addTOC
  [] class WikidataBanner extends Banner
  [] class BannerFactory( $title )
  [] Cleanup addBanner in WikidataPageBanner.hooks should $banner = 
BannerFactory::newFrom( ... ); insertBannerIntoOutputPage( $banner );

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

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

To: Jdlrobson
Cc: Aklapper, Jdlrobson, Wikidata-bugs, aude, Lydia_Pintscher, Mbch331



_______________________________________________
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs

Reply via email to