Description
It seems as if #92629 has removed the theme picker from rustdoc. Both the way to change themes as well as any indication of the fact that changing themes is possible in the first place is hidden behind a setting page that many users will probably not even use at all.
My initial experience with rustdoc and mdbook, back over 1 year ago, was quite positive because of the easy option to customize the looks / themes. I hadn't set up my browser for any dark theme yet at the point; the easy accessibility and good visibility of the paintbrush icon largely introduced me to the appeal of dark-themed documentation pages.
I have switched themes in rustdoc countless times. For every new browser, for every new device, for every new incognito window on a non-dark-theme-configured browser / device. And that number multiplied by the amount of websites that contain rustdoc, which is docs.rs, doc.rust-lang.org, and a whole lot of self-hosted pages for certain crates, like docs.serde.rs.
The change in #92629 makes changing themes about 20x more effort. Instead of 2 clicks (click paint brush, then the theme) in the same area of the page, you need to:
- click the (less conveniently and less visibly located) setting button
- this takes you to a different page!
- traverse the whole screen with the mouse
- click to toggle "use system theme"
- traverse the whole screen with the mouse again
- click to open the drop down menu
- click to select theme (this changes the theme)
- move mouse to browser's "back" button to get to previous page
- click back button
- this takes you back to the previous page, and the new theme is no longer visible (admitted, this issue only happened sometimes)
- click refresh
- this changes the theme back back into the newly selected one
So over all
- the page changed 5 times (2 navigation, 3 theme changes)
- the mouse traversed width of the the screen twice
- I had to click 6 times
Previously it was
- 1 page change (theme change)
- two clicks
- no significant forced extra mouse movement
Additionally, discoverability is terrible (I estimate that – optimistically – less than half as many users will be able to find out on there own that there are themes in the first place), the settings page with its initial layout showing "preferred dark / light theme" is confusing, the need to go back to the previous page using browser navigation is confusing, and the need to refresh the page is absolutely confusing.
Finally, if I don’t know my favorite theme yet and want to compare the looks:
- I can’t get a direct visual comparison at all because it displays a different page in-between,
- unless I open multiple tabs to be able to switch themes for direct visual comparison
- The issue of having to click more and do more stuff multiplies, because I want to take a look at all the themes. With just 3 themes right now, this is somewhat manageable, because you “only” need to play the game twice to be able to see all the themes, and a third time to select your favorite; but assuming that more themes might be added in the future, it will get worse.
The change on nightly rustdoc unfortunately affects crate documentations on docs.rs immediately. In my personal opinion this change is a terrible user experience and should be reverted as fast as possible. Future attempts to remove the paintbrush icon should, in my opinion
- make sure that changing the theme is less effort, including at least that you don't have to leave the page at all
- maybe a pop-up version of (a subset of) the settings could be implemented
- make sure that themes stay discoverable
- maybe, if rustdoc is able to save theme selection, it’s also possible to show a visual hint to “first-time” users, that there’s an option for theme selection in the settings
But I don’t actually see any problem with just keeping a paintbrush symbol. Mdbook does this, too. Rustdoc pages are usually huge and full of information, I don’t see why there wouldn’t be room to keep the paintbrush symbol. I also don’t understand why a redundant way to change the same setting has to be a problem; after all, themes are a great feature, (who expects API docs to have themes? wow, Rust is so great...) and discoverability of this feature is only improved if there’s multiple ways to change them.
If you want to address the main point of #84539, well, I don’t understand how that’s a significant issue in the first place, and there are probably better solutions than removing the paintbrush symbol. For example I personally wasn’t even aware that there was a different way of choosing themes than using the paintbrush symbol. My first reaction to browsing nightly std docs was “oh no, have they now joined those websites that don’t give you any configuration option besides automagically syncing with system settings?” (These websites are terrible if you’re on a device where it’s hard to bring your browser into an actual working dark mode; this took me multiple days to achieve on my current PC (linux), and actually it’s still kind-of broken). The main question
It's not clear how these are related. Does one override the other? Also, what is the "system theme"?
describes a minor problem; it doesn’t really matter whether a user understands the precise logic of these settings as long as they find some option easily that makes the website look the way they want it to look. And Github is a bad comparison because it’s a central (single host) website that basically assumes you’re logged in, which immediately makes (the equivalent of) the problem of having to reconfigure for
- new devices and browsers
- new rustdoc-hosting pages
go away. Good luck trying to change your Github theme when you’re not logged in (I’m not even sure if that’s possible at all!) Well, but for rustdoc paged, you’re never logged in! Hence, adapting Github’s approach is probably a terrible idea, isn’t it?
@rustbot label T-rustdoc
cc @jsha