**Background:**
As a part of making working with templates in Visual Editor easierThe advanced toolbar (add additional templates, we will change the way in which parameters can be discoveredadd wikitext, added and removed from a template invocation. up/down, We will also be making changes to how templates and wikitext can be added,remove part) only applies when there is multi-part content. removed,In a typical single template editing situation they cause significant confusion. and editing to reduce confusion and implement a more consistent editing experience.We will leave the toolbar as is, but hide when it is not relevant and show when it is.
**Requirements**
[] Implement behind a feature flag with T272368, T272481 and T272487:
[] An OOUI ellipsis icon is added to the right * {T272368}
[] On click this opens a dropdown menu with four different items: moving the template up or down (currently done in the toolbar at the bottom with expand/collapse icons), removing the template, link to template documentation.
[] When removing a template with content, show the same warning message from* {T272355}.481}
[] When there is only oneinserting a template in the dialogor editing a single template, hide the move up/down buttons.tool bar is hidden
[] When multiple templates are thereediting pre-existing multi-part, show both move up and move down buttons but if that specific template can only be moved up or down because of its current orderlinked content, only enable the usable option/ disable the unusable option.the tool bar is shown
[] Template move up/down buttons move the template in the outline and content panes.[] 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
[] Remove the trash icon next to the template name in the description/help area. * [[ ]] icon adds wikitext/content field to the main dialog and sidebar list
[] Rem * Move up and down buttons from the toolbar at/down arrows allow to move content order in relation to each other. Current disabling behavior remains the bottomsame.
[] Template heading appears with <h4> style (bold)
Note: behavior for adding additional templates remains the same. They are added using the existing template button (puzzle piece) in the bottom left menu bar.
Note: difference from test instance - keeping the puzzle icon as-is in the sidebar
**Mocks*** Trashcan removes content
{F34085887}[] Rename 'Content' to 'Wikitext'
//Specs to be added//
Ellipsis icon: 20x20px and Base20, hover/click area is 44x40px. For size/layout match the VE dropdown menus (ex[] Trashcan only works when template name or wikitext titles in the sidebar are focused. Insert menu)When parameters are in focus, from a OOUI word processor toolbarthe trashcan is disabled. Up and down arrows are OOUI icons: downTriangle, upTriangle.//(Question: or should it still work and if a param is selected it just gets unchecked?)//
Template name styling: H 5
Related tickets:**For reference**
Current toolbar:
- Prototyping tickets{F34097894}
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}