Page MenuHomePhabricator

Synchronize scroll and focus when template dialog is in narrow-screen mode
Closed, ResolvedPublic5 Estimated Story Points

Description

On narrow (mobile) screens, the template dialog collapses so that only one side is shown at a time. The button at the bottom flips between the two sides. This ticket is exclusively about this mode.

  • When I enable a parameter in the sidebar and flip to the content pane,
    • the parameter should scroll into view at the top of the screen. The parameter label should be at the top, with the description and input field directly below. This should work the same way as T299036: VE Dialog: Clicking template or parameter name scrolls it to top of dialog
    • ... and (if narrow + desktop) the text cursor should be in the input field for the parameter I just added
    • ... but (if narrow + mobile) the input field should not be focused
  • Same when I click on a parameter name that's already checked.
  • Same when I press enter on the parameter.
  • When I put the text cursor in an input field in the content pane, and then flip to the sidebar, the corresponding item in the sidebar should be highlighted.
    • … and scroll into view.
    • also for wikitext inputs

Related work already done via T289043: [Epic] Synchronize scroll, highlight, and focus in new VE template dialog sidebar and content pane.

Other possibly related tickets:

Related Objects

Event Timeline

awight renamed this task from Synchronize scroll positions when template dialog is in collapsed (mobile) mode to Synchronize scroll and focus when template dialog is in collapsed (mobile) mode.Sep 15 2021, 7:10 AM
awight renamed this task from Synchronize scroll and focus when template dialog is in collapsed (mobile) mode to Synchronize scroll and focus when template dialog is in narrow-screen mode.Sep 15 2021, 12:04 PM
thiemowmde set the point value for this task to 5.Sep 15 2021, 1:27 PM

Change 722626 had a related patch set uploaded (by Awight; author: Awight):

[oojs/ui@master] [WIP] Make it possible to unset the page

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

Change 722627 had a related patch set uploaded (by Awight; author: Awight):

[mediawiki/extensions/VisualEditor@master] [WIP] narrow mode fixes

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

awight moved this task from Doing to Review on the WMDE-TechWish-Sprint-2021-09-15 board.

Everything but left-to-right focus should work. That behavior has eluded me so far, it suffers from some optimization in oojs which short-circuits focus when the library detects it is already applied.

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

[oojs/ui@master] Remove misplaced .selectFirstSelectablePage() calls in BookletLayout

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

Change 722627 merged by jenkins-bot:

[mediawiki/extensions/VisualEditor@master] Sync panels in narrow-view mode

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

Change 723611 merged by jenkins-bot:

[oojs/ui@master] Remove misplaced .selectFirstSelectablePage() calls in BookletLayout

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

Change 736621 had a related patch set uploaded (by VolkerE; author: VolkerE):

[mediawiki/core@master] Update OOUI to v0.42.1

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

Change 736621 merged by jenkins-bot:

[mediawiki/core@master] Update OOUI to v0.42.1

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

awight removed awight as the assignee of this task.
awight moved this task from Ready for pickup to In sprint on the WMDE-Templates-FocusArea board.
awight moved this task from Sprint Backlog to Doing on the WMDE-TechWish-Sprint-2022-06-22 board.
awight moved this task from Doing to Demo on the WMDE-TechWish-Sprint-2022-06-22 board.

Change 722626 abandoned by WMDE-Fisch:

[oojs/ui@master] [WIP] Make it possible to unset the page

Reason:

Not needed anymore since we forked BookletLayout for our needs.

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

One last broken case: clicking into a wikitext input in the content pane doesn't select or scroll the sidebar when switching back.

Updated task to reflect the mobile distinction discussed in sprint review (I hope it's clear!)

awight updated the task description. (Show Details)

Change 811702 had a related patch set uploaded (by Awight; author: Awight):

[mediawiki/extensions/VisualEditor@master] Focus the input after switching to the content pane

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

Change 811710 had a related patch set uploaded (by Awight; author: Awight):

[mediawiki/extensions/VisualEditor@master] Scroll even if sidebar selection hasn't changed

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

awight removed awight as the assignee of this task.Jul 6 2022, 1:01 PM

Change 811710 merged by jenkins-bot:

[mediawiki/extensions/VisualEditor@master] Scroll even if sidebar selection hasn't changed

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

Change 811702 merged by jenkins-bot:

[mediawiki/extensions/VisualEditor@master] Focus the input after switching to the content pane

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

Check how it looks after any potential changes to remove scrolling animation.

thiemowmde claimed this task.
  NODES
Note 6
Project 6