While doing AI suggestions, the user is in a new "mode" of the visual editor (the other two being visual and source modes). The new mode is "AI suggestions" mode, as described in {T269638}.
* It only possible to get into this mode via the suggested edits feed or the post-edit dialog from doing a suggested edit. Users cannot toggle into this mode when they are just editing under normal circumstances, though in the farther future, they //will// be able to.
* Users cannot combine link suggestions with other kinds of edits. They can do one or the other. If they leave "AI suggestions" mode, their progress is gone. Same with if they toggle over to visual or source mode, make some changes, and then toggle back to AI suggestions mode: their progress is gone.
* When the user is in AI suggestions mode, they can toggle out of the mode with the edit pencil mode dropdown in the upper right of the editor.
* When the user selects that mode dropdown, they will see three modes. "Suggestions" will be the first one in the list, in blue, and with a robot icon. Below it will be the "Visual editing" and "Source editing" modes as usual.
* When the user selects either the visual or source modes, they will get a modal that asks them to confirm they want to leave AI suggestions mode. If they leave AI suggestions mode, their progress will be lost and unrecoverable.
** Header: "Leave AI suggestions?"
** Body: "Switching modes will allow you to make other kinds of edits. Finish reviewing to submit your progress so far."
** First button option: "Switch without submitting"
** Second button option: "Cancel"
* If the user selects "x" on the toolbar, they will see the standard dialog shown when a change is made in editor mode on VE and source.
* Once in visual or source mode, they can edit and publish like normal. Publishing through visual or source mode does not lead them to any special post-edit workflows. It's just normal.
* Users can also switch back to AI suggestions mode with the toggle, which will put them back at the beginning of the link suggestion flow as if they had not started yet, i.e. where they were right after the onboarding. If they made some changes in visual or source mode and then want to switch back to AI suggestions mode, they should get the dialog that you get in the editor when you are going to close the window and lose your edits, the one that says: "Are you sure?"
For wikis that have multiple edit tabs, yes, the "Edit source" tab should do the same thing as the edit mode toggle (show the special dialog, etc.)
But for all other ways to exit the experience (e.g. clicking "Read", clicking a left nav item, clicking the Wikipedia logo, etc.) we should hand the user the standard "you are exiting the editor" experience.
In some cases, like clicking the left nav, that looks like this:
{F34430453}
And in other cases, like clicking "Read", that looks like this:
{F34430456}
Inheriting all of that is fine.
| //Mobile mockups as of 2021-01-12:// {F33997231} {F33997229} | //Desktop mockups as of 2021-01-12:// {F33997233} | Screenshot of dialog when user selects "x" on the editor toolbar {F34161168}
**NOTE:** Refer to Figma for up-to-date detailed redline mocks and specs:
!!Mobile: https://www.figma.com/file/2SONd8P1tsexIB5coMOp8h/Growth-Structured-tasks?node-id=181%3A65!!
!!Desktop: https://www.figma.com/file/2SONd8P1tsexIB5coMOp8h/Growth-Structured-tasks?node-id=112%3A0!!
==== Instrumentation ====
//See {T278115} for details.//