mediawiki-extensions-Visual.../modules
Thiemo Kreuz 6446cf950f Fix off-by-1 error when deprecated parameters are hidden
This is a direct follow-up to I6ebd020.

Steps to reproduce the bug:
* Make sure you have a template with a deprecated parameter.
  The position doesn't matter.
* Add the template. The deprecated parameter is hidden.
* Add an undocumented parameter, e.g. "b". This is added to the
  end, as it should.
* Add an undocumented parameter "a". This should appear before
  "b", but doesn't. The reason is because the invisible
  deprecated parameter is in the list that is used to calculate
  the index, shifting it by 1 (or more when there are more
  hidden parameters).

This patch includes a few closely related changes:
* We can loop the list of checkboxes directly instead of
  indirectly via the list of parameter names.
* I made it so that an active filter only resets if it would
  hide the new parameter. The original problem we had to solve
  was that the new parameter would always be visible, even if
  it doesn't match the filter. This awkward mismatch is still
  guaranteed to not happen.

Bug: T274551
Change-Id: I1b0480ae836cc19b77b159d3fb30ff32e8c59df4
2021-08-06 12:24:49 +00:00
..
ve-mw Fix off-by-1 error when deprecated parameters are hidden 2021-08-06 12:24:49 +00:00
ve-mw-collab Update VE core submodule to master (1f76dea7e) 2021-06-04 23:53:02 +02:00