While doing machine suggestions, the user is in a new "mode" of the visual editor (the other two being visual and source modes). The new mode is "machine suggestions" mode, as described in T269638: Add a link: Suggestions mode.
- 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 "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 machine suggestions mode: their progress is gone.
- When the user is in machine 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 two modes. "Suggestions" will be the first one in the list, in blue, and with a robot icon. Below it will be the "Visual editing". Toggling to and from source is tracked separately via T285785: Add a link: support toggling between source and machine suggestion modes.
- When the user selects the visual mode, they will get a modal that asks them to confirm they want to leave machine suggestions mode if they have unsaved changes regardless of whether useeditwarning preference is set. If they leave machine 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 machine 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 machine 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:
And in other cases, like clicking "Read", that looks like this:
Inheriting all of that is fine.
|Mobile mockups as of 2021-01-12:||Desktop mockups as of 2021-01-12:||Screenshot of dialog when user selects "x" on the editor toolbar|
NOTE: Refer to Figma for up-to-date detailed redline mocks and specs:
See T278115: Instrumentation: Edit mode toggle for details.