Doc Presentation

While I agree that the Rust generated doc is great, I still often find it annoying. I often elatedly click on a promising-sounding function on the left, only to see that it is unsafe, experimental and/or deprecated. I consider these off limits for production code, so I hardly want to be distracted by them.

  • I suggest extending the cog-wheel options to allow hiding them. This can (mostly) even be done in pure CSS (e.g. checkbox hack.)

  • Independently of this, I would give them different colours, e.g. red instead of green for unsafe (with some colour-blind-workaround) both in the doc and in the sidebar.

  • Also I would give them their respective icon(s) :fire::microscope::-1: in the sidebar as well.

A lesser gripe are the trait impls, which often consist of mostly signatures with scant text. Since the impl header hardly stands out, this looks chaotic. I would either indent everything under a common heading and/or give it a slightly different background colour.

7 Likes

I agree with this completely, but unfortunately it seems the Rustdoc team does not see things the same way: https://rust-lang.zulipchat.com/#narrow/stream/393423-t-rustdoc.2Fmeetings/topic/meeting.2004-09-2023/near/389048618

2 Likes

Oh gosh! Maybe it's time to fire up GreaseMonkey and do it myself…

2 Likes

It would be great if the elements at the very least had appropriate CSS classnames so they could be easily hidden… but they don’t D:

3 Likes

I think this comment refers to performing strikethrough / dimming / etc of certain elements automatically (in their case, deprecated items), not to having an option to hide some kinds of elements depending on user preferences

Yes, it has a narrower scope. They might still be open to hiding. However, when not hiding, they tend to not want to make the user's life easier. Homogeneous look of the side bar seems to trump usability ("Clicking is free" – no it's not, it wastes time and distracts.) So sorry they shredderd Jules' useful strikethrough attempt!

In my opinion the left sidebar is just not a good way to explore available methods. A separate method-signature table would be more valuable.

1 Like