List of steps to reproduce
- Create a template with at least suggested / required parameters and some other parameters. I think it must be at least 4 parameters.
- Add two templates as part of a transclusion to a page and dont add any parameters
- Open the transclusion in the VE template dialog
What happens?:
- The parameters that are neither suggested nor required are not hidden although they are unused
- The button to hide unused parameters says "Show all fields"
What should have happened instead?:
- The unused parameters should be hidden. See T300640: Hide unused parameters by default in multi-part transclusions
What I found out so far
- This regression was introduced with https://gerrit.wikimedia.org/r/c/mediawiki/extensions/VisualEditor/+/761002/ while implementing T300974: Loading performance: Postpone initial widget creation for unused template parameters
- When calculating which parameters should be hidden and which should be shown, the new code after that patch does not consider, that suggested and required parameters are shown by default. In the specific situation mentioned above this leads to the weird behavior.