Page MenuHomePhabricator

Hide unused parameters by default in multi-part transclusions
Closed, ResolvedPublic0 Estimated Story Points

Description

In T298259: Add button to sidebar to hide/show unused fields we implemented a "hide unused parameters" filter for large lists of template parameters. This is a follow-up to that.

  • Whenever the dialog opens with a single template, unused parameters are shown.
  • When a multi-part transclusion is edited, all unused parameters in all parts are initially hidden.
  • All this must consider that the filter options are hidden for templates with 3 or less parameters. Contrary to what was said above unused parameters are not hidden when a template has 3 or less parameters.
  • When adding more parameters to a template so it includes more than 3, the search and hide unused widgets will show, but unused parameters should (still) not be hidden
  • When adding another part to a multi-part transclusion, the new part should never be collapsed.
  • This allows for more performance improvements. See T300974.

Event Timeline

thiemowmde set the point value for this task to 5.Feb 2 2022, 9:22 AM

All this must consider that the filter options are hidden for templates with 3 or less parameters. Contrary to what was said above unused parameters are not hidden when a template has 3 or less parameters.

On question to that:

  • Currently a 3 parameter template added in a multipart transclusion shows these parameters as described and hides the interface to search/filter unused.
  • When I now add a 4th parameter using the Add undocumented parameter UI this changes and the search/filter unused becomes visible.
  • In that step the 3 unused parameters will "suddenly" become hidden due to the new default of hiding unused parameters on multipart.
  • Should that stay like that? ( The button then shows Show all fields as it should and there might be no problem, just wanted to raise awareness for that fact )

In that step the 3 unused parameters will "suddenly" become hidden […]

Uh, no, that doesn't sound right to me. The behavior should be consistent in so far that:

  1. The initial state this ticket is about is only for when the dialog opens. It should not have an effect later.
  2. I don't think there is another situation where adding a parameter suddenly hides something.

Change 759497 had a related patch set uploaded (by WMDE-Fisch; author: WMDE-Fisch):

[mediawiki/extensions/VisualEditor@master] Hide unused paramters by default on multipart

https://gerrit.wikimedia.org/r/759497

WMDE-Fisch changed the point value for this task from 5 to 3.Feb 4 2022, 1:49 PM

Change 759497 merged by jenkins-bot:

[mediawiki/extensions/VisualEditor@master] Hide unused paramters by default on multipart

https://gerrit.wikimedia.org/r/759497

thiemowmde updated the task description. (Show Details)
thiemowmde moved this task from Demo to Doing on the WMDE-TechWish-Sprint-2022-02-02 board.

Change 764742 had a related patch set uploaded (by Thiemo Kreuz (WMDE); author: Thiemo Kreuz (WMDE)):

[mediawiki/extensions/VisualEditor@master] Never collapse newly added templates in transclusion dialog

https://gerrit.wikimedia.org/r/764742

Change 764742 merged by jenkins-bot:

[mediawiki/extensions/VisualEditor@master] Never collapse newly added templates in transclusion dialog

https://gerrit.wikimedia.org/r/764742

thiemowmde changed the point value for this task from 3 to 1.Feb 23 2022, 9:34 AM
thiemowmde changed the point value for this task from 1 to 0.
thiemowmde moved this task from Tech Review to Demo on the WMDE-TechWish-Sprint-2022-02-23 board.
thiemowmde changed the point value for this task from 0 to 3.Feb 23 2022, 9:42 AM

There seems to be an edge case, where on templates with template data, that have no parameter added to them, hiding the unused by default does not work. Instead, the button assumes the hidden state while the parameters are all visible.

WMDE-Fisch changed the point value for this task from 3 to 2.

Change 770940 had a related patch set uploaded (by WMDE-Fisch; author: WMDE-Fisch):

[mediawiki/extensions/VisualEditor@master] Revert "Skip initial creation of unused parameter widget"

https://gerrit.wikimedia.org/r/770940

I did not find a good solution to fix the issues that came with the performance patch's changes so I'm tending to revert it. It can always be re-applied when it's fixed and working correctly.

WMDE-Fisch changed the point value for this task from 2 to 0.Mar 17 2022, 7:30 AM

I created a follow up ticket for this bug. Also to document the issue properly.

Change 772833 had a related patch set uploaded (by Thiemo Kreuz (WMDE); author: Thiemo Kreuz (WMDE)):

[mediawiki/extensions/VisualEditor@master] Fix hiding unused template parameters sometimes not working

https://gerrit.wikimedia.org/r/772833

Change 772833 merged by jenkins-bot:

[mediawiki/extensions/VisualEditor@master] Fix hiding unused template parameters sometimes not working

https://gerrit.wikimedia.org/r/772833

thiemowmde claimed this task.