Get rid of the "You must save your edit before switching to another editing mode." alert and make it just work. All the code already exists for this in mw.ArticleTarget with use in mw.DesktopArticleTarget; we "merely" need to hook it up in mw.MobileArticleTarget.
|Open||ppelberg||T221185 Prepare visual editor to be a default mobile editor|
|Resolved||matmarex||T221328 [Epic] Mobile VE usability improvements (FY18-19 Q4)|
|Resolved||Esanders||T128422 Allow switching between editors with changes on mobile|
|Resolved||Esanders||T117716 Be able to switch to VisualEditor after starting to edit a section without losing edits|
|Resolved||matmarex||T222312 Mobile switching with changes from WTE to VE fails on non-RESTBase setups|
|Resolved||Esanders||T222315 Abandon changes dialog is inconsistently shown after switching editors on mobile|
- Mentioned In
- T186149: [betalabs] Cannot switch to VE in MinervaNeue
T221328: [Epic] Mobile VE usability improvements (FY18-19 Q4)
T221905: Audit and visualise mode switching in VE with Desktop/Mobile + Section/Non-section edits + Modified/Unmodified state
- Mentioned Here
- T117716: Be able to switch to VisualEditor after starting to edit a section without losing edits
T209986: User Testing Plan for Isolated Section Editing Feature
T209955: [EPIC: Focus] Isolate Section Editing
This repeatedly came up as problematic for testers performing Section Editing user testing T209986
Here's what it looks like:
- An editor starts editing in Visual Editing mode
- They want to check what it looks like in source (having the mindset that they can seamlessly switch back and forth between modes)
- They click into source mode
- They are prompted to save (publish) their in-progress edit
NB that when switching from visual section editing to source mode we will have to fall back to full document mode, as changes to a visual section can potentially modify other parts of the document (e.g. deleting a reference could cause it's contents to be moved to another section).
NB that switching from source mode to visual mode while in a section is currently impossible on desktop (T117716), and may require some work on RESTBase to implement this. As mobile always uses section editing in source mode, this means there is currently no easy way to switch from source mode to visual mode.
The patches merged so far implement switching from visual to wikitext, but not in the other direction – looks like that is covered by https://gerrit.wikimedia.org/r/c/mediawiki/extensions/MobileFrontend/+/503670.