Any time a template or parameter receives user events, it should be highlighted in both the sidebar and content, and if necessary the page should scroll to make it visible.
Acceptance criteria
action on the left | results in the sidebar T311204 | results in the content pane |
---|---|---|
select a template or wikitext transclusion (press space) | đĻ blue highlight & âšī¸ focus stays in sidebar | đ scroll to top |
select a parameter (press space) | đĻ blue highlight & âšī¸ focus stays in sidebar T296996 | đ scroll to top |
unselect a selected parameter (space or checkbox click) that was selected | â selection goes away (remove blue highlight) | ⸠focus stays as is T296996, T312213 & no scrolling |
unselect a parameter (space or checkbox click) that was not selected | ⸠nothing happens | â parameter should just be removed & ⸠focus stays as is T296996 & no scrolling |
hover (cursor keys up and down or mouse cursor) | âŦ grey highlight on unselected elements ⸠no change on selected elements | ⸠no scrolling & no focus |
add a new template or new wikitext (with the buttons) | đĻ blue highlight on new element | đ focus on new input field |
press the delete button in the toolbar to delete a template or wikitext transclusion | âŦ selection jumps to following element (template or wikitext), except if there is no element below, âŦ then jump to previous part T312221 | â template or wikitext is hidden |
typing into parameter filter | â removes any selections and associated highlights 810019 | ⸠nothing happens |
hard select (press enter or mouse click on any element) | đĻ blue highlight | đ scroll to top --> see next table |
action on the right | results in the sidebar | results in the content pane |
focus an input element in the content pane T311204 | đ scroll element in sidebar into view & đĻ highlight it | âšī¸ focus on input |
focus a wikitext input in the content pane T291381 | đ scroll element in sidebar into view & đĻ highlight it | âšī¸ focus on input |
Different effects in desktop and mobile
action | results in the desktop skin | results in the mobile skin | results in narrow mode T290975 |
---|---|---|---|
press enter or mouse click on a template name in the sidebar | đ scroll to top & âšī¸ focus moves to link in description | đ scroll to top & âšī¸ focus stays | after view flip: đ scroll to top |
press enter or mouse click on a wikitext item or a parameter in the sidebar | đ scroll to top & âšī¸ focus moves to input field | đ scroll to top & âšī¸ focus stays | after view flip: đ scroll to top |
click new template or new wikitext button | âšī¸ focus on input | âšī¸ focus on input | after view flip (see also T291365): đ scroll to top |
- Disable the bogus auto-scroll feature described in T289043#7297679.
Dev notes
This partly depends on the keyboard navigation work in T285323: Implement keyboard navigation for VE template dialog, which will refactor events. We'll probably need to disconnect old sidebar events, either by preventing it from being created, or by putting conditionals around code that connects its event handlers.