Page MenuHomePhabricator

Organize JavaScript code
Closed, ResolvedPublic


Explain JS code structure.

Event Timeline

The design pattern used is Module Pattern (details). This design pattern is already adopted by MediaWiki JS library (example mw.Api).

Modules list (see PST User workflow):

  • PSManager, module that manages the suggested statements
  • PSFilterComponent
  • PSConfigurationComponent
  • PSRandomItemComponent
  • globals.js, global vars and methods usable by every module
  • util.js, methods usable by every module

The global object accesible is ps.

Afnecors moved this task from Doing to Done on the Wikidata-primary-sources board.