Page MenuHomePhabricator

Show/hide advanced toolbar when multi-part content is present
Closed, ResolvedPublic1 Estimated Story Points

Description

Background:
The advanced toolbar (add additional templates, add wikitext, move up/down, remove part) is only useful when there is multi-part content. In a typical single template editing situation they cause significant confusion. We will leave the toolbar as is, but hide when it is not needed and show when it is useful.

Requirements

  • Implement behind a feature flag with:
  • When inserting a template or editing a single template, the tool bar is hidden
  • When editing pre-existing multi-part, linked content, the tool bar is shown
  • When editing pre-existing multi-part content, the tool bar is shown even if the user removes all but one content/template i.e. the state of showing/hiding toolbar does not change within an editing session. If the user saves and reopens the dialog, it would be treated as a single template editing session and the toolbar would be hidden.
  • Each button functions as they currently do:
    • Puzzle icon brings up template search and when template is chosen from the dropdown is added to the sidebar and is editable
    • [[ ]] icon adds wikitext/content field to the main dialog and sidebar list
    • Move up/down arrows allow to move content order in relation to each other. Current disabling behavior remains the same.
    • Trashcan removes content
  • Remove the Parameter icon, the option's updated behaviour is addressed in this ticket T272487: New input for undocumented parameters
  • After removing parameter icon, adjust spacing of icons as shown in the specs below
  • Rename 'Content' component to 'Wikitext'
  • When the toolbar is hidden the space at the bottom should be gone
  • Trashcan only works when template name or wikitext titles in the sidebar are focused. When parameters are in focus, the trashcan is disabled.

For reference
Current toolbar:

Screen Shot 2021-02-09 at 10.45.31.png (124×532 px, 8 KB)

Mock:

Screen Shot 2021-02-17 at 14.45.51.png (217×1 px, 13 KB)
Screen Shot 2021-02-17 at 14.46.33.png (225×1 px, 32 KB)

Note: ellipsis/menu implemented in the prototype is not being used in the final design. Some of the above functions were included there but are no longer being moved. See prototype ticket for reference: T263414: Change behaviour for adding/removing templates

Related Objects

StatusSubtypeAssignedTask
OpenNone
ResolvedWMDE-Fisch
ResolvedWMDE-Fisch
ResolvedAndrew-WMDE
ResolvedWMDE-Fisch
ResolvedAndrew-WMDE
ResolvedBUG REPORTawight
OpenNone
OpenNone
ResolvedWMDE-Fisch
Resolvedawight
DeclinedNone
ResolvedNone
InvalidNone
Resolvedthiemowmde
Resolvedlilients_WMDE
InvalidNone
Resolvedthiemowmde
ResolvedAndrew-WMDE
ResolvedAndrew-WMDE
ResolvedNone
ResolvedNone
Resolvedthiemowmde
ResolvedAndrew-WMDE
ResolvedWMDE-Fisch
ResolvedLena_WMDE
ResolvedNone
Resolvedawight
ResolvedAndrew-WMDE
InvalidNone
Resolvedthiemowmde
ResolvedBUG REPORTWMDE-Fisch
ResolvedBUG REPORTthiemowmde
ResolvedBUG REPORTthiemowmde
ResolvedWMDE-Fisch
OpenBUG REPORTNone
ResolvedECohen_WMDE
OpenNone

Event Timeline

Lena_WMDE renamed this task from DRAFT: Add ellipsis menu to VE TemplateDialog to DRAFT: Add ellipsis menu to sidebar of VE TemplateDialog.Jan 20 2021, 1:43 PM
Lena_WMDE updated the task description. (Show Details)
ECohen_WMDE renamed this task from DRAFT: Add ellipsis menu to sidebar of VE TemplateDialog to DRAFT: Show/hide advanced toolbar when multi-part content is present.Feb 9 2021, 9:53 AM
ECohen_WMDE updated the task description. (Show Details)
Lena_WMDE set the point value for this task to 5.Mar 10 2021, 2:38 PM

Pure-CSS toggling is possible: we add a multipart-transclusion or single-transclusion to an ancestor container (already done?) and use that to control visibility and restyling.

Lena_WMDE renamed this task from DRAFT: Show/hide advanced toolbar when multi-part content is present to Show/hide advanced toolbar when multi-part content is present.Mar 10 2021, 3:49 PM
Lena_WMDE updated the task description. (Show Details)

Change 710272 had a related patch set uploaded (by Andrew-WMDE; author: Andrew-WMDE):

[mediawiki/extensions/VisualEditor@master] [WIP] Only show sidebar controls when multi-part content is present

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

Change 710272 merged by jenkins-bot:

[mediawiki/extensions/VisualEditor@master] Show sidebar controls only when multi-part content is present

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

During review:

  • When the toolbar is hidden the space for it should also be removed so the full height of the sidebar can be used.

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

[mediawiki/extensions/VisualEditor@master] Use the \"wikitext\" for content in transclusions

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

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

[mediawiki/extensions/VisualEditor@master] Remove sidebar margin on single transclusion

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

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

[mediawiki/extensions/VisualEditor@master] Adjust icon spacing in new sidebar menu

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

Change 713459 merged by jenkins-bot:

[mediawiki/extensions/VisualEditor@master] Adjust icon spacing in new sidebar menu

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

Change 713453 merged by jenkins-bot:

[mediawiki/extensions/VisualEditor@master] Remove sidebar margin on single transclusion

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

Change 713450 merged by jenkins-bot:

[mediawiki/extensions/VisualEditor@master] Use the \"wikitext\" for content in transclusions

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

awight moved this task from Sprint Backlog to Demo on the WMDE-TechWish-Sprint-2021-08-18 board.
awight changed the point value for this task from 5 to 1.
thiemowmde updated the task description. (Show Details)
thiemowmde moved this task from Demo to Done on the WMDE-TechWish-Sprint-2021-08-18 board.