Page MenuHomePhabricator

Enable WWT to be turned on and off remotely
Closed, ResolvedPublic

Description

To be able to support behavior where VisualEditor (or potentially any other tool) turns on and immediately turns WWT *off* (and potentially disables it while it's operational) we need to make sure that the system allows for a clear action that loads, unloads, and disables the WWT system.

Right now a lot of those actions are done from within the different widgets, and is hard to unify externally (an external system will need to know to call the info bar widget + replace the DOM + manage the side link, etc.) This is making managing the system's state (enabling/launching/dismissing) through external code practically impossible. This ticket aims to create this method by creating a model/controller approach.

Acceptance criteria (and test):

  • Have a clear functional method to launch and dismiss WWT

Event Timeline

PR available: https://github.com/wikimedia/WhoWroteThat/pull/63

For testing, you can now use, in the console:

wwtDebug.launch();
wwtDebug.dismiss();
dom_walden subscribed.

For testing, you can now use, in the console:

wwtDebug.launch();
wwtDebug.dismiss();

These appear to function as intended. They act similarly to toggling the "Who Wrote That?" link.

The same function as this.dismiss() is used by the VisualEditor functionality implemented in T231508.

Further testing of opening and closing WWT will be tested when T234483 is fixed.