Page MenuHomePhabricator

Show only nonempty options in the Sandbox and other filters
Open, Needs TriagePublic

Description

Many times I don't know which option (parametr) does what and want to read about it.

Use case

For example I have this link to the Sandbox:
https://en.wikipedia.org/wiki/Special:ApiSandbox#action=query&format=json&prop=pageprops&titles=Booker_Prize&generator=links&formatversion=2
I want to know:

  1. Where (in which group) is the "titles" option?
  2. What does it mean? Is it used with or without namespace?
  3. How many titles can I add in one query?

Would be great if I would be able to filter options (names of parameters) in some way.

Solutions?

  1. So one option to resolve this is to only show option with some value. That way it is easier to edit the query in the form (rather then by changing url). Currently it might be easier to change the url.
  1. Another option would be to filter views. I have a helper ViewFilter class for that if you want (allows using words or regexp for filtering). Filtering by both label (name of the option) and description would be great. Would allow me to also find new parameters (not only those that are non-empty). All groups / panels seem to be in the DOM, so that should be doable with very little changes. Only problem is that mw-apisandbox-widget-field and mw-apisandbox-help-field is in separate groups. So if that structure could change then filtering would be trivial to implement (with ViewFilter class or similar).