Page MenuHomePhabricator

[Epic] Isolate template dialog from BookletLayout interface by introducing high-level class for modifying UI
Closed, DeclinedPublic

Description

While reviewing our proof-of-concept code to change how the template dialog sidebar works, we've identified the current usage of BookletLayout as a risk to our project. There are three separate classes sharing responsibility for manipulating the sidebar and content panes, making any changes touching the sidebar unnecessarily complicated. We have some initial suggestions for simplification,

  • Do not change the ooui BookletLayout implementation at all.
  • Extract logic which directly manipulates the booklet panes into a separate class, and expose only the highest-level interface e.g. "add item" which manages both the sidebar and content pane transparently to the caller.
  • Minimize knowledge required by callers.

See subtasks for more details.

Event Timeline

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

[mediawiki/extensions/VisualEditor@master] Extract "show all" to placeholder class

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

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

[mediawiki/extensions/VisualEditor@master] Introduce a new class to encapsulate booklet inter-pane wiring

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

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

[mediawiki/extensions/VisualEditor@master] Method for getting the currently selected element

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

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

[mediawiki/extensions/VisualEditor@master] [WIP] starting to migrate "remove"

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

awight renamed this task from Simplify and consolidate template dialog booklet layout interface to [Epic] Simplify and consolidate template dialog booklet layout interface.Jun 9 2021, 11:30 AM
awight renamed this task from [Epic] Simplify and consolidate template dialog booklet layout interface to [Epic] Isolate template dialog from BookletLayout interface by introducing high-level class for modifying UI.Jun 16 2021, 3:48 PM
awight updated the task description. (Show Details)

This wrapper might be thrown out, and turns out to be a delicate dissection. So I'm postponing the work until it might become unnecessary.

Hopefully the work done so far wasn't quite wasted, it's clean-up that simplifies other changes.