- Delete onOutlineChange and usages.
- New function in two-pane layout to refreshControls which calculates whether we can move the current selection up and down, and whether it can be deleted.
- Replace all outlineSelectWidget selectItemByData and selectItem calls with refreshControls.
Optional:
- Push customizations (new template and new wikitext buttons) down into forked controls widget. https://gerrit.wikimedia.org/r/c/mediawiki/extensions/VisualEditor/+/809174
Replace setAbilities with a readOnly config flag to bookletLayout.Update: We noticed that readOnly is not working anyway, so we will not touch this. T311520