Sync single-file mode user preference
Problem
Follow up from #233898 (closed) and UX debt from !47726 (merged).
As explained in #233898 (comment 447253883), the Show one file at a time
user preference exists in two places, but those are not in sync:
- User preferences page
- MR preferences menu
Changing the preference in the MR menu will always override what is set in the user preferences page.
If it is a lot of work to keep them in sync, we can remove the user preference page setting and have just the MR preference setting in the dropdown menu. We already have user preferences that only live in the MR preference dropdown: file browser mode and comparison modes. At least this approach would be consistent with that.
Solution
Having backend create the API endpoint for this user preference and then on the MR having it use that API to actually toggle the preference. Maybe this is a good opportunity to introduce some more GraphQL as it's "net-new" API (maybe not).
This feature falls apart the moment someone tries to use a different computer, clears their cookies, opens in a new browser, etc. By leveraging an API to do this, we can provide a more consistent experience to users across these situations.