Page MenuHomePhabricator

Implement Suggestion Mode Toggle (v0.2)
Closed, ResolvedPublic5 Estimated Story Points

Assigned To
Authored By
ppelberg
Mar 16 2026, 8:06 PM
Referenced Files
F74717176: image.png
Apr 1 2026, 7:58 AM
F74701470: image.png
Mar 31 2026, 5:26 PM
F73532055: image.png
Mar 23 2026, 2:11 PM
F73532036: image.png
Mar 23 2026, 2:11 PM
F72962705: image.png
Mar 17 2026, 12:26 PM
F72962540: image.png
Mar 17 2026, 12:16 PM
F72962557: image.png
Mar 17 2026, 12:16 PM
F72962520: image.png
Mar 17 2026, 12:16 PM

Description

This task represents the work of implementing v0.2 of the Suggestion Mode toggle.

For more details about the broader arc and scope of this feature, please review T415589.

Story

  • As an experienced volunteer who has enabled the Suggestion Mode beta feature, is using desktop VE, and who most often arrives into editing with a clear change in mind, I'd value there being a way to decide whether suggestions are or are not shown by default upon landing in VE so that I can remain in flow and preserve the option of seeing suggestions in future edit sessions.
  • As someone who has decided to toggle Suggestion Mode OFF, I'd value knowing that Suggestion Mode will remain OFF in all future VE editing sessions until I change it, so that I know A) why I may not be seeing suggestions and/or B) what I need to do in order to [have the potential to] see suggestions within the article I'm editing

Requirements

Meta

  • Platform(s): desktop
  • Configuration
    • By default, the Suggestion Mode toggle this ticket introduces will be in an ON state whenever people arrive into a VE edit session; however, when someone changes the state of this toggle, that state should be remembered/persisted across desktop VE edit sessions until someone changes it

User experience
Augment the UX T420245 introduced by...

  • Making it so the state of the toggle people set within an edit session is remembered/persisted across all future desktop VE edit sessions until someone changes it
  • The first time someone toggles Suggestion Mode OFF, present a confirmation that makes them aware that Suggestion Mode will remain OFF across all future edit sessions until they change the state of this toggle
  • Introducing a different treatment of the 💡 button that will appear when it is in the ON state
    • Note: It sounds like we need this icon implemented in OOUI. Can't be implemented as a normal icon.

Mockups

image.png (96×108 px, 1 KB)
image.png (96×108 px, 1 KB)
ToggleButton OFFToggleButton ON

When suggestions are OFF, we will use the cdxIconLightbulb icon. When suggestions are ON, we will use the lightbulb icon with an active indicator, representing that suggestions are turned on. The active version keeps the same lightbulb shape and size but including small spark elements around the lightbulb that expand outward in a subtle animation to indicate it is turned on.

Captura de pantalla 2026-03-17 a las 12.27.55.png (660×1 px, 39 KB)

Suggestions will appear ON by default, but users can use the ToggleButton to turn them off (and on again). We will use a contextual Toast to inform the user when they are turned off/on (related T417827). And, the first time when turning off, we will inform that this setting will be saved in future edit sessions.

image.png (1×2 px, 1 MB)
1st time when turning off: "Suggestions turned off. This will apply to future edit sessions."
image.png (1×2 px, 1 MB)
Next times: "Suggestions turned off." or "Suggestions turned on."

Acceptance criteria

  • Requirements are implemented

Event Timeline

The first time someone toggles Suggestion Mode OFF, present a confirmation that makes them aware that Suggestion Mode will remain OFF across all future edit sessions until they change the state of this toggle

Do we need this? It involves adding a second user-preference for "has seen the suggestion mode post-toggle notice", and someone who has just used the toggle definitely knows about it and where it is when they want to turn suggestions back on.

El T420268#11716413, @DLynch escribió:

The first time someone toggles Suggestion Mode OFF, present a confirmation that makes them aware that Suggestion Mode will remain OFF across all future edit sessions until they change the state of this toggle

Do we need this? It involves adding a second user-preference for "has seen the suggestion mode post-toggle notice", and someone who has just used the toggle definitely knows about it and where it is when they want to turn suggestions back on.

This layer will be especially needed on mobile if we finally decide to hide the Suggestions ToggleButton within the edit handle menu. Anyway, I think it's good to inform the user about this the first time.

In order to block the user with a confirmation message (Dialog), we could use a Toast informing the user that:

  • Suggestions have been turned off (related T417827)
  • This setting will be saved in future edit sessions (this just the first time when turning off)
image.png (1×2 px, 1 MB)
1st time when turning off: "Suggestions turned off. This will apply to future edit sessions."
image.png (1×2 px, 1 MB)
Next times: "Suggestions turned off." or "Suggestions turned on."
bmartinezcalvo updated the task description. (Show Details)
bmartinezcalvo moved this task from Incoming to Done on the Design board.

Icons have to fit on a 20x20px canvas which the lightbulb icon currently fills. The only way to add rays would be to make the bulb smaller, or implement some custom local hack for this particular tool.

This layer will be especially needed on mobile if we finally decide to hide the Suggestions ToggleButton within the edit handle menu. Anyway, I think it's good to inform the user about this the first time.

I think it makes even less of a difference on mobile if the toggle is hidden away. The popup won’t help them find it later, after all, and by navigating to it somewhere in a menu they’ll have proven they know where it is. (On desktop there’s the argument that they might have accidentally flipped it while aiming for a button next to it.)

Icons have to fit on a 20x20px canvas which the lightbulb icon currently fills. The only way to add rays would be to make the bulb smaller, or implement some custom local hack for this particular tool.

@Esanders the lightbulb icon should be the same size in both OFF and ON states. The only difference is that the ON state includes some sparkles around this lightbulb.

Since icons are created on a 20x20px, the only way to do this possible is including the sparkle as elements separated from the lightbulb icon. The way I implemented the spark elements in the prototype was including the sparkles as lines around the lightbulb icon. I could share the sparkle elements as SVG if needed, or some lines could be added on top of the cdxIconLightbulb icon.

El T420268#11718786, @DLynch escribió:

This layer will be especially needed on mobile if we finally decide to hide the Suggestions ToggleButton within the edit handle menu. Anyway, I think it's good to inform the user about this the first time.

I think it makes even less of a difference on mobile if the toggle is hidden away. The popup won’t help them find it later, after all, and by navigating to it somewhere in a menu they’ll have proven they know where it is. (On desktop there’s the argument that they might have accidentally flipped it while aiming for a button next to it.)

The proposed Toast is to inform the user about the suggestions settings being saved for future edit sessions. If we decide to hide the ToggleButton under a button, then we will need to observe if users find the ToggleButton (either to turn off and on) and if not, solve it.

The proposed Toast is to inform the user about the suggestions settings being saved for future edit sessions. If we decide to hide the ToggleButton under a button, then we will need to observe if users find the ToggleButton (either to turn off and on) and if not, solve it.

Yeah, but the toast will only be seen after the user has demonstrably found the button and experienced toggling suggestions. They're the people who will least need education about it.

The toggle's instrumented, so we have everything we need to tell whether users are finding it in-place. (Though "users who want to find it cannot" is, of course, a thing we cannot read their minds to determine.)

VPuffetMichel set the point value for this task to 5.Mar 18 2026, 5:36 PM
VPuffetMichel subscribed.

5 does not include the toast. cc @ppelberg

I'm not sure the lightbulb rays are going to be worth the effort. In the real toolbar they make the icon look unbalanced in the space (shifted upwards).

image.png (151×973 px, 22 KB)

They are also visually inconsistent with our other icons which are confined the 20x20 canvas. As our libraries have no mechanism for displaying oversized icons this also incurs technical debt and maintenance debt, for example the icon is already broken monobook/apex, which doesn't res-colour icons and uses less padding:

image.png (72×147 px, 2 KB)

The separate image also has to be hard coded (as would any animations - we also don't have a framework for that and it's not easy to do with pure CSS), and any future changes to the toolbar could break the alignment.

I would prefer if we stuck to the existing design patterns unless (cf the existing special character toggle) there is a compelling reason.

Change #1259118 had a related patch set uploaded (by Esanders; author: Esanders):

[mediawiki/extensions/VisualEditor@master] Persist suggestion mode toggle state

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

@Esanders the intention behind adding the rays was to better communicate the Suggestions ON state through a subtle animation. The goal was not decorative, but to reinforce the idea that something is active or “producing ideas,” beyond just a color state that changes.

Regarding consistency, while our icons are 20x20, there are some cases where additional elements can extend beyond the base icon (e.g. a badge on an icon). Regarding the Monobook issue, although we support all skins we typically design and prioritize for the main ones (Vector 2022 and Minerva), ensuring they work well there first.

I think there is value in making the ON state more expressive and visible, especially for discoverability and clarity of the feature. That said, this should not come at the cost of significant technical complexity. If implementing the rays introduces really high complexity, then I would lean towards simplifying and staying within existing icon patterns.

Change #1259118 merged by jenkins-bot:

[mediawiki/extensions/VisualEditor@master] Persist suggestion mode toggle state

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

Drive-by comment to +1 the points @bmartinezcalvo thoughtfully laid out in T420268#11738854.

@Esanders: did you end up implementing the "rays of light" (that's fun to type out!) in this iteration? If not, can you please file a follow-on ticket for doing so?

Suggestion mode state gets stuck if user tries toggling off after clicking the "Add citation" button:

Steps to reproduce:

  1. Confirm suggestion mode is enabled
  2. Select a suggestion to add a citation
  3. Click "Add citation"
  4. Try toggling state from enabled to disabled

Experience:
Bulb goes grey to communicate that it's been disabled while suggestion side nav and citation popup remains

Expected experience:
All suggestion mode affordances are closed out

image.png (1×3 px, 455 KB)

Experience:
Bulb goes grey to communicate that it's been disabled while suggestion side nav and citation popup remains

The ToggleButton will need to communicate its state of toggled ON/OFF by representing the rays in the ON state and also the badge (being implemented in T420386) will need to communicate that disabled state.

Colors used:

  • lightbulb icon on/off: color-disabled
  • badge off: background-color-disabled and number color-disabled-emphasized
  • badge on: border-color-disabled and number color-disabled-emphasized

image.png (544×616 px, 17 KB)

Drive-by comment to +1 the points @bmartinezcalvo thoughtfully laid out in T420268#11738854.

@Esanders: did you end up implementing the "rays of light" (that's fun to type out!) in this iteration? If not, can you please file a follow-on ticket for doing so?

Not in this iteration as there were issues with horizontal alignment as the rays have to be a separate element. Filed T421997

Suggestion mode state gets stuck if user tries toggling off after clicking the "Add citation" button...

@EAkinloose: great spot. Two follow-up questions for you:

  1. What (if any) other issues/unexpected behavior (beyond the quoted bit above) did you encounter when QA'ing this task?
  2. Could you please review T424101 and ensure it accurately describes the issue you encountered ?

Suggestion mode state gets stuck if user tries toggling off after clicking the "Add citation" button...

@EAkinloose: great spot. Two follow-up questions for you:

  1. What (if any) other issues/unexpected behavior (beyond the quoted bit above) did you encounter when QA'ing this task?
  2. Could you please review T424101 and ensure it accurately describes the issue you encountered ?

No other issues that are yet to be addressed and https://phabricator.wikimedia.org/T424101 accurately describes what's needed.

Suggestion mode state gets stuck if user tries toggling off after clicking the "Add citation" button...

@EAkinloose: great spot. Two follow-up questions for you:

  1. What (if any) other issues/unexpected behavior (beyond the quoted bit above) did you encounter when QA'ing this task?
  2. Could you please review T424101 and ensure it accurately describes the issue you encountered ?

No other issues that are yet to be addressed and https://phabricator.wikimedia.org/T424101 accurately describes what's needed.

Excellent. Thank you for confirming. Resolving!