mediawiki-extensions-Visual.../modules/ve-mw/ui/widgets
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.ui.MWAceEditorWidget.js Remove @param/@return docs that literally repeat the code 2021-06-14 15:44:51 +02:00
ve.ui.MWCategoryInputWidget.js build: Update eslint-config-wikimedia to 0.17.0 2020-08-18 13:16:49 +01:00
ve.ui.MWCategoryItemWidget.js doc: Bump copyright year for 2020 2020-01-08 09:13:24 -08:00
ve.ui.MWCategoryPopupWidget.js doc: Bump copyright year for 2020 2020-01-08 09:13:24 -08:00
ve.ui.MWCategoryWidget.js Remove/fix a few small pieces of unused code 2021-05-21 11:43:45 +00:00
ve.ui.MWDismissibleMessageWidget.js Add missing newline in JSDoc 2021-06-18 14:13:31 +02:00
ve.ui.MWEditSummaryWidget.js Document and use mw.Api parameter defaults 2021-07-12 09:13:59 +02:00
ve.ui.MWEducationPopupWidget.js Rewrite EducationPopup so it isn't a mixin 2020-09-24 21:33:50 +01:00
ve.ui.MWExternalLinkAnnotationWidget.js Fix:Internal and External Link annotation widget 2020-02-24 16:40:19 -08:00
ve.ui.MWGalleryGroupWidget.js doc: Bump copyright year for 2020 2020-01-08 09:13:24 -08:00
ve.ui.MWGalleryItemWidget.js Preserve inline media tag name in galleries across edits 2020-12-16 17:28:51 -05:00
ve.ui.MWInternalLinkAnnotationWidget.js MWInternalLinkAnnotationWidget: show disambiguation pages last 2021-07-27 18:36:50 -04:00
ve.ui.MWLazyMultilineTextInputWidget.js doc: Bump copyright year for 2020 2020-01-08 09:13:24 -08:00
ve.ui.MWMediaInfoFieldWidget.js eslint: Enable the mediawiki/class-doc rule and make pass 2020-04-17 22:59:11 +01:00
ve.ui.MWMoreParametersResultWidget.js doc: Bump copyright year for 2020 2020-01-08 09:13:24 -08:00
ve.ui.MWNoParametersResultWidget.js doc: Bump copyright year for 2020 2020-01-08 09:13:24 -08:00
ve.ui.MWParameterCheckboxInputWidget.js doc: Bump copyright year for 2020 2020-01-08 09:13:24 -08:00
ve.ui.MWParameterResultWidget.js Change style for adding an "Unknown field" in the parameter search 2021-07-08 09:20:25 +02:00
ve.ui.MWParameterSearchWidget.js Merge "Change style for adding an "Unknown field" in the parameter search" 2021-07-08 08:20:59 +00:00
ve.ui.MWPreTextInputWidget.js doc: Bump copyright year for 2020 2020-01-08 09:13:24 -08:00
ve.ui.MWTargetWidget.js Merge "Ensure correct classes are added to surfaces" 2021-05-25 19:33:17 +00:00
ve.ui.MWTemplateOutlineParameterCheckboxLayout.js Finishing touches to new template editor sidebar 2021-07-15 08:40:35 +00:00
ve.ui.MWTemplateTitleInputWidget.js Document and use mw.Api parameter defaults 2021-07-12 09:13:59 +02:00
ve.ui.MWTocWidget.js build: Update eslint-config-wikimedia to 0.17.0 2020-08-18 13:16:49 +01:00
ve.ui.MWTransclusionOutlineButtonWidget.js Finishing touches to new template editor sidebar 2021-07-15 08:40:35 +00:00
ve.ui.MWTransclusionOutlineContainerWidget.js Filter right content side of the template dialog as well 2021-08-05 14:36:10 +02:00
ve.ui.MWTransclusionOutlinePartWidget.js Finishing touches to new template editor sidebar 2021-07-15 08:40:35 +00:00
ve.ui.MWTransclusionOutlinePlaceholderWidget.js Reuse generic button widget for elements in the new sidebar 2021-07-13 17:23:27 +00:00
ve.ui.MWTransclusionOutlineTemplateWidget.js Fix off-by-1 error when deprecated parameters are hidden 2021-08-06 12:24:49 +00:00
ve.ui.MWTransclusionOutlineWikitextWidget.js Reuse generic button widget for elements in the new sidebar 2021-07-13 17:23:27 +00:00