Save the state of `inline` toggle as a hidden user preference
== Feature Summary ==
A user will have the ability to switch between `inline` and `table` formats when Wikidiff2 is installed. Add a user preference that tracks this selection so the system can remember the format to load.
== Implementation Details ==
No JS implementation options:
1. Drop no-JS support
2. Wrap the existing no-JS controls with a form that posts to a new special endpoint, which sets the preference and then redirects back to the diff page, which will then show the newly selected format. Similar to watch star.
- Optionally: make the OOUI control infusable so that the same control can be used in JS and no-JS mode. This would fix visible updates on DOM ready.
3. Make the preference be a non-hidden preference.
4. Retain the diff-type query string parameter. Don't actually set the preference in no-JS mode.
Anonymous options:
1. Just be broken
2. Apologise for broken behaviour
3. Retain diff-type query parameter stickiness and use it for this.
- In JS mode, refresh the page as if in no-JS mode, or rewrite self-links to include diff-type.
4. Add a core concept of user-or-session options. On read, if the user cannot have user options, merge values from the current session with site defaults. Callers opt in. In ApiOptions, if the user cannot have user options, set a session cookie if necessary and write to the session. Clients opt in.
- Variant: same but specific to diff types. Add a new API module just for setting the diff type.
5. Use localStorage like T339268. Generate the complete diff in the wrong format on the server side and have the client replace it on DOM ready, to work around the lack of anonymous server-side preferences.