-
Notifications
You must be signed in to change notification settings - Fork 13.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hide type declarations by default #49412
Conversation
Kinda skeptical if we want to do this when there are public fields without doc comments, but otherwise r=me |
@killercup Fields without docs still appear in the main listing, regardless of whether they have docs on them or not. Strictly speaking, there's no true loss of information going on - we're just auto-folding the bit that takes up more room. |
@QuietMisdreavus yeah, as I've said offline, I'm fine with this change then :) |
@bors r+ |
📌 Commit 73b97c7 has been approved by |
⌛ Testing commit 73b97c7 with merge 06b29bedd183458a59bf61c436c26d02f6fb576d... |
💔 Test failed - status-appveyor |
@bors retry Appveyor timeout |
Hide type declarations by default I'm not very happy for the moment about the rendering but the bases are here: <img width="610" alt="screen shot 2018-03-27 at 11 56 27" src="https://user-images.githubusercontent.com/3050060/37960492-0e045954-31b6-11e8-9cea-1ef8a3f980c4.png"> r? @QuietMisdreavus
💔 Test failed - status-appveyor |
@bors retry p=15 3 hour timeout. |
Hide type declarations by default I'm not very happy for the moment about the rendering but the bases are here: <img width="610" alt="screen shot 2018-03-27 at 11 56 27" src="https://user-images.githubusercontent.com/3050060/37960492-0e045954-31b6-11e8-9cea-1ef8a3f980c4.png"> r? @QuietMisdreavus
☀️ Test successful - status-appveyor, status-travis |
Since this change made it to the nightly docs, I have found myself constantly having to open the type declaration. To copy/paste trait function's signatures to implement them, or to see the type/lifetime parameters for the type, for example. Usually public fields are documented, but when they're not this change makes things less convenient. As far as I can tell associated types have the same issue, which is, imo, much more important than fields because forgetting them when It also isn't documented anywhere else whether an item is a struct, enum, trait, etc. except through the color of the name, so looking to see what kind of item a thing is means I have to open the type declaration, unless I've memorized what the colors mean. I imagine that might make things slightly more annoying for color-blind people as well. I don't know why this change was made in the first place, I couldn't find any other issues or PRs about this, if its because of traits like |
Because generally, it isn't wanted by the users since you have the fields/variants listed just below with all needed information and documentation. This is "just" the rust code declaration. However, I think I'll start writing a settings menu to allow users to have a better control over a few things. |
I am also not happy with this change. Often for me type declarations are sufficient enough to remember all details which I want with a single glance, while with documented fields it's significantly less convenient/fast. So I believe this change has introduced an unpleasant speed bump for proficient users. |
You can change the corresponding settings to have like it was before this change. |
IIUC you can't do anything for docs on doc.rust-lang.org. Maybe it will make sense to add a small js+cookie logic, e.g. if you've opened type declaration is stays open and vice versa? |
It should be saved though... At least it works as expected for me. If you have a bug with settings, please open an issue. |
I'm not very happy for the moment about the rendering but the bases are here:
r? @QuietMisdreavus