Follow up from full page editing spike: T328591
This task is to update our article view to allow for full page editing. We are going to lean on our current section wikitext editor flow, so design should consider how that currently works and document if any UI changes need to be made for full page editing.
=== Design notes ===
1. Design: Add a place somewhere in our article view where a user can enter the entire the full page editor flow.
2. Design: Should any UI/copy/logic change in the existing editor when using in full-page mode? This includes any changes needed on initial modals (onboarding, edit notices, blocked messages), the standard flow screens (wikitext editor > preview > save screens), error messages when attempting to publish, and success message on article after successfully publishing.
3. Design: What happens when a user highlights article text and chooses "Edit" from the context menu? Does that continue to push to the section editor or the full page editor?
=== Engineering notes ===
//Note: Basic prototype work is done in `full-page-editing` branch. Feel free to reference.//
1. Do some small code renaming to our SectionEditorViewController flow to allow for full page editing (like maybe rename "section" out of various places, since these code files will now support full page editing).
2. Do necessary changes to get full page editing mode working:
- Make section ID optional when entering editing screens and pass in nil.
- When fetching wikitext, remove section ID from API call so that full wikitext is fetched and loaded in editor.
- When publishing, remove section ID from API call so that full wikitext is published properly.
3. Performance: see notes from spike on performance findings. My proposed solutions are that we ensure the loading banner displays up until wikitext is visible in the editor (inserting long text into the editor takes several seconds), as well as remove the ability to change font sizes for full page editor. I also suggest let's try to have a spinner somewhere while find & replace results are calculating, or worst-case, let's disable find-and-replace for certain devices.
4. Analytics work will be handled in a separate task (T331937).
=====Designs
[[ https://www.figma.com/file/avprbeltVWk4WL7zihyhZB/Talk-Page%3A-%40mentions-%26-full-page-editing?node-id=41%3A1972&t=LdNr15oRdc2OXo6C-1 | Link to Figma here ]] (make sure to choose the 'Full page editing' from 'Pages' in the top left corner of Figma)
**Comments: **
- Full page editing will be accessed by tapping on the 'Edit' button in the nav. bar.
- We will be keeping the flow as it is with the 'Preview'.
- When the contributor tries to go back to the talk page screen from the editor view without publishing an action sheet will be displayed (similar to the one displayed when writing a comment/topic in talk pages) asking if the want to discard edit or keep editing.
- When a contributor successfully publishes their edit a toast will appear that confirms that the edit has been published.
> What happens when a user highlights article text and chooses "Edit" from the context menu? Does that continue to push to the section editor or the full page editor?
- In this case the full page editor should open. We are not sure if the editor would want to edit multiple sections (if they do, then it provides a smoother experience with the full page editor).
| Article view | Full page editing mode | Discard edit? | Preview | Save changes? | Successfully published the edit |
| {F36926173} | {F36926175} | {F36926177} | {F36926179} | {F36926181} | {F36926183} |
>
> **Error messages** same as the messaging for talk page full page editing T331936
> The errors are similarly displayed as the ones found in T312314. Examples below.
> - Only the copy of 'Unable to publish comment due to no internet connection' changes a little bit.
> - Copy:
> - Title: Unable to publish your edit.
> - Text: Please check your internet connection.
> - Button: Go to Settings
>
> | Unable to publish comment due to no internet connection | Server error | No internet connection |
> | {F36926094} | {F36926092} | {F36926097} |