Skip to content

Add focus area template, dummy data, basic Lua module

This adds the main Template:Community_Requests/Focus_area and /Card templates that are used when creating a focus area page (later we may make a form so staff don't have to code in wikitext). Focus areas are where voting happens, so the plan is for i.e. [[Community_Requests/Focus_areas/Foobar]] which uses the new template. Once staff are comfortable with the language, they'll use CWS Manager (T365558) to setup the page for translation. Like previous surveys, this would involve moving it to a subpage, now called /Translatable, and that gets marked for translation, then votes go on the parent page. The system can be seen by using the new demo pages (see below).

Summary of other changes:

  • Add new npm run setup:demo task to install a dummy proposal and a dummy focus area. More dummy data to be added later.
  • Rename nuke to setup:nuke for consistency.
  • DeployCommand: show full URL to mark pages for translation so (depending on your OS/terminal) you can simply click the link rather than copy/paste.
  • Add new Lua module for general utility functions. Some of the logic in the templates may later be moved to this module. For now, it does basic persentation-level things.
  • Add knowledge of 'draft' status to the Status template
  • Remove old redirects.
  • Store Phab tasks as CSV instead of wikitext to save on storage, and move presentation logic (linking) to the new csvToPhabTasks() Lua method.
  • Move TemplateStyles to Template:Community_Requests/styles.css to centralize on-wiki styles in one place.
  • Document the templates and page structure in the README, and add 'TODO' files for those that are missing.
  • Minor copy editing.
  • Bump mysql2 per npm audit.

Bug: T363235

Bug: T365122

Bug: T364648

Bug: T363223

Bug: T363240

Edited by MusikAnimal

Merge request reports

Loading