mediawiki-extensions-Visual.../modules
Thiemo Kreuz cf14790450 Utilize native .isRemovable() in template dialog sidebar
The OO.ui.OutlineOptionWidget class does have an .isRemovable()
state. This is how OO.ui.OutlineControlsWidget decides if the
remove button can be used.

It appears like ve.ui.MWParameterPage forgot to mark required
parameters as not removable.

This makes some oddly specific code in ve.ui.MWTransclusionDialog
obsolete. Note how this class does not contain any other code
about "required" or other flags specific to parameters.

Note that one aspect of this patch will be visible in the old
sidebar: The trashcan will be visible on required parameters, but
disabled. It was hidden before. However, this actually improves
the UX. Hiding the trashcan made the up/down buttons jump around.
This makes it unnecessary hard to hit them. It also causes visual
distraction when navigating the list of parameters.

Let's stick to the upstream OOUI behavior.

The remove button still disappears when the only element in the
dialog is the template search widget. This is clearly an
entirely different state. (Don't ask why the up/down buttons are
not hidden. It was like this before.)

Bug: T289039
Change-Id: If78881e503f19f497f1993da4e5b9b09ee538307
2021-09-16 10:03:09 +02:00
..
ve-mw Utilize native .isRemovable() in template dialog sidebar 2021-09-16 10:03:09 +02:00
ve-mw-collab Update VE core submodule to master (1f76dea7e) 2021-06-04 23:53:02 +02:00