The Cargo extension (https://www.mediawiki.org/wiki/Extension:Cargo) lets you declare a certain field as having "allowed values" (like "Blue, Red, Yellow"), but it doesn't allow for defining a field as holding a hierarchy of values. An example would be a field called "Topic", which can hold both major topics and minor sub-topics as values.
As I see it, the steps of such a project may look something like:
- Add support for declaring hierarchy fields
- Add support for querying hierarchy fields, using a new Cargo keyword, "WITHIN" (as in "where=City WITHIN 'Asia'"). This would need to work with both single-value fields and fields that hold multiple values.
- Add support for such fields within Cargo's Special:Drilldown interface - a line there might look like:
Fruits (23) * Vegetables (30) ("Vegetables" only (3) * Root vegetables (15) ("Root vegetables" only (1) * Carrots (12) * Turnips (2) ) * Peppers (12) )
- Add support for hierarchy fields in the Page Forms extension - so that such fields automatically get the right input type ("tree"), with the right values filled in
- Also make hierarchy fields easy to create in Page Forms' helper pages, like Special:CreateTemplate and Special:CreateClass
Internship project details
- Primary mentor: Nischay Nahata (@Nischayn22)
- Co-mentor: Yaron Koren (@Yaron_Koren), Tobias Oetterer (@Oetterer)
- Skills: PHP, SQL
- Estimated project time for a senior contributor: 2 weeks