Join GitHub today
[rustdoc] Add sub settings #60778
I added a mechanism to have the possibility to add sub-settings (when clicking on the master, all the children take the same value) and I added it for types to get a more fine-tuned handling on which types you want to see their declaration or not by default.
A little screenshot of the setting page with the sub-settings:
does the code need to be general enough to cope with cases where a mixture of sub-setting choices needs to make the grouping setting into some indeterminate state (or into the "on" state)? the example screenshot might benefit from an indeterminate state?
maybe an ⓘ-style icon with more info about what clicking it does to the sub-settings and what clicking a sub-setting does to the master?
referenced this pull request
May 21, 2019
QuietMisdreavus left a comment
Other than the refactor to the settings code, i'm not totally convinced about this change. What's the motivation? This looks like a solution in search of a problem.
The reason i'm worried is that the settings page seems to have become a sort of catch-all solution to problems where a decision is split and no one is arguing strongly for either side. One of us chooses one version as the "default" and defers anyone else to the small, non-obvious button embedded onto every page. Sometimes, like this PR, it seems to be a change for change's sake, without adding something that creates a strong enough draw or solves a pressing problem.
I'm also worried about the added features in particular because of how we treat the auto-hide functionality in much the same way - a catch-all solution to a problem (long pages due to too much information) that creates new problems of its own (added load times on exceptionally long pages due to DOM manipulation). I feel like we're leaning too hard on the auto-hide functionality (and on the settings page) in terms of adding more run-time features for it.
Something to remember when adding features to rustdoc output is that we're not building a web app - we're building a static site generator. I think there's some design tension between these two conceptions at play here.