This task involves the work with introducing edit affordances within the desktop site's new sticky header (T283505).
Requirements
Notes: once finalized, this section will end up being a combination of the requirements originally defined in T287545 as well as those that emerged during the Sticky Header Mini Offsite the Editing Team held on 1-Dec-2021.
Meta
- Platforms: Desktop
- Editing Interfaces: Visual editor and 2010 Wikitext editor
- #TODO: do we get support for the 2017 wikitext editor "for free"?
- People Affected: people who A) Are Logged in and B) Have the Use Legacy Vector setting within Special:Preferences#mw-prefsection-rendering disabled
- Note: the Web Team will revisit the question of whether the sticky header will be made available to logged out users in Q3FY2021-22.
- Relationship to settings: Logged in editors who have explicitly set a preference for the Editing mode setting within Special:Preferences#mw-prefsection-editing will notice their preference reflected within the reading mode sticky header by way of the editing affordance(s) they see/do not see.
- Note: This requirement will likely already have been met by way of T289723.
- Note: This requirement is expanded upon on in ==== Noticing the edit affordance below.
Noticing the edit affordance
- In single edit tab contexts, one affordance, that opens the editing interface projects will have defined as their default or individual people will have defined as their preferred interface, must be present within the sticky header.
- In contexts where two edits tabs are available, affordances to open the wikitext and visualeditor must be present within the sticky header
Transitioning from reading into editing
Source + Visual
- Upon landing in editing mode, people ought to see the section they were just viewing focused in-view while still being able to scroll to any other part of the article.
- Note: this functionality is already implemented within the Visual editor. Additional work will be required to implement this in the 2010 wikitext editor.
Visual
- Upon clicking an edit affordance within the sticky header, we should strive to minimize the amount that the viewport/content moves, so that people can maintain their focus on the content they are seeking to change, and ultimately, begin making that change as quickly as possible after the editing interface becomes ready.
- Note: the approach we implement now will be improved when the new parser is deployed.
- #TODO: define which section heading we should pick as point we use to anchor the reading and editing experiences
- Note: the work to define the section anchor point will happen in T296977.
Source
- #TODO: define which section heading we should pick as point we use to anchor the reading and editing experiences
- Note: the work to define the section anchor point will happen in T296977.
- Note: "section heading" in this context refers to all section levels: ==H2==, ===H3===, ====H4====, etc.
Making a change
Source + Visual
- When the editing interface loads, the sticky header people will see while reading should not be visible so: A) they do not become confused what modality they're in and B) they can continue to access the editing toolbar they will need to make changes.
Transitioning from editing into reading
Abandoning the editing interfaces (source + visual)
- No changes to the current experience: upon abandoning the editing interfaces (e.g. pressing Escape or clicking the browser's Back button) people should be returned [as closely as possible] to the scroll position they were at in the moment they clicked the Edit affordance within the sticky header. Note: we will investigate improving this experience in T296975.
Publishing a change
Visual
- No changes to the current experience: upon publishing an edit, people should land back in reading mode at the same position in the article as they were just before they clicked Publish changes. Note: we will investigate improving this experience in T296975.
Source
- No changes to the current experience: upon publishing an edit, people should land back in reading mode at the top of the section they were in just before they clicked Publish changes. Note: we will investigate improving this experience in T296975.
Prototype
via @Esanders; last updated 21-Dec-2021:
https://patchdemo.wmflabs.org/wikis/557db5804f/w/index.php?title=Special:UserLogin&returnto=Douglas+Adams (login as Patch Demo)