mediawiki-extensions-Visual.../modules/ve-mw/ui
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
..
actions
commands
contextitems Remove @param/@return docs that literally repeat the code 2021-06-14 15:44:51 +02:00
datatransferhandlers
dialogs Merge "Make the sidebar in the transclusion dialog responsive" 2021-08-06 10:40:44 +00:00
elements Add icons to the show/hide button in the ExpandableContentElement 2021-06-29 08:33:22 +00:00
inspectors Remove @param/@return docs that literally repeat the code 2021-06-14 15:44:51 +02:00
pages Merge "Add a message next to undocumented parameters" 2021-07-16 12:05:29 +00:00
styles Make the sidebar in the transclusion dialog responsive 2021-08-05 17:23:22 +02:00
tools Document and use mw.Api parameter defaults 2021-07-12 09:13:59 +02:00
widgets Fix off-by-1 error when deprecated parameters are hidden 2021-08-06 12:24:49 +00:00
ve.ui.MWCommandRegistry.js
ve.ui.MWExtensionWindow.js
ve.ui.MWSequenceRegistry.js
ve.ui.MWSurface.js
ve.ui.MWTransclusionsBooklet.js Method for getting the currently selected element 2021-06-10 15:32:07 +02:00
ve.ui.MWWikitextCommandRegistry.js
ve.ui.MWWikitextDataTransferHandlerFactory.js
ve.ui.MWWikitextSequenceRegistry.js
ve.ui.MWWikitextSurface.js
ve.ui.MWWikitextTransferRegistry.js