Currently the support for customizing the behavior of fields in the details step of the uploader is patchy and inconsistent. We will want to ensure that the following requirements are met:
- There is feature parity between the main config and campaign configs
- All fields should be explicitly listed in the config (including those included by default), so that they can be modified or removed.
- New fields of multiple types can be added, including text, number and dropdown inputs.
- The fields can be freely reordered.
- The fields can be configured:
- hidden/visible
- enabled/disabled
- default value
- required/recommended/optional
- label, tooltip
- other field type-specific options (e.g. max string length)
- Values for all fields can be passed in the query string.
- Coordinate with T275027: Improve file description syntax configurability – allow each field to have custom wikitext syntax. This should be both powerful and simple, so that something as common as adding another parameter to a template should be trivial.
- It is possible to attach custom JS to these fields somehow, e.g. for input filtering and validation. For example, an custom input filter on the categories field could be used to better suggest media-related categories.
To avoid reinventing the wheel, the configuration settings should probably correspond somehow to OOUI/WVUI element and option names. We'll have to investigate this further, though.
Of course all of this should be documented in a clear manner, preferably with example snippets that can be copied.