Page MenuHomePhabricator

Allow suggestions to be suppressed programmatically
Open, Needs TriagePublicFeature

Description

Feature summary (what you would like to be able to do and where):

When VisualEditor is launching, provide a (officially blessed) way for suggestions to be turned off.

(This semi-exists already, because controller.toggleSuggestionMode() exists, but that just toggles rather than letting you force it to a given state. It would also behave incorrectly if called before the controller had finished its setup phase. Just explicitly setting controller.suggestionsMode = false; in their surfaceReady handler would probably work, but we should provide a method for it that'd be a stable API.)

Use case(s) (list the steps that you performed to discover that problem, and describe the actual underlying problem which you want to solve. Do not describe only a solution):

Growth integrates with VisualEditor for their "Revise Tone" newcomer task. It triggers editing a page in VisualEditor with a custom editcheck loaded and focused immediately. Growth may not want this check to be surrounded by other suggestions.

They might like to be able to turn suggestions off completely, or perhaps to re-enable them after their own check is finished.

Event Timeline

Note: this work will come into play in ≥2 cases...

  1. If/when Editing and Growth land in a situation where the Revise Tone (T413065) and Suggestion Mode (T404600) controlled experiments are being run on ≥1 of the same wikis at the same time
  2. If/when we come to learn both experiments are successful and we start to scale both features [i]

i. Good call, @kstoller