-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Add version display for associated consts #55798
Add version display for associated consts #55798
Conversation
75a0102
to
2c47647
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One question about HTML semantics.
src/librustdoc/html/render.rs
Outdated
let src = if let Some(l) = (Item { cx, item }).src_href() { | ||
if !version.is_empty() { | ||
write!(w, "</span></td><td><span class='out-of-band'>")?; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this </span>
match the original class='invisible'
one from before the initial <table>
? I'm guessing it displays okay based on your screenshot, but this seems odd.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I took the exact same code as above. I'd need to double check but I assume it does, otherwise the html checker would have failed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@GuillaumeGomez seems like the span
is strayed. https://validator.w3.org/nu/?doc=https%3A%2F%2Fdoc.rust-lang.org%2Fstd%2Fnet%2Fstruct.Ipv4Addr.html
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed, I'll update it soon.
2c47647
to
a91b1ac
Compare
I fixed the DOM. |
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
Apparently not... |
a91b1ac
to
2968a5a
Compare
Okay, should be good this time. |
Added test. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, let's get this rolling!
@bors r+ |
📌 Commit ca04c63 has been approved by |
⌛ Testing commit ca04c63 with merge fb4765cd318d41500cdedeff530ed8b7b49274ea... |
💔 Test failed - status-travis |
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
@bors retry Segfault in the stdlib :/ |
⌛ Testing commit ca04c63 with merge a97d78c69ced34ee446f0a31346844d7c0b138f8... |
💔 Test failed - status-travis |
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
…ciated-const, r=QuietMisdreavus Add version display for associated consts Fixes rust-lang#54030. <img width="1440" alt="screenshot 2018-11-08 at 23 57 29" src="https://user-images.githubusercontent.com/3050060/48232648-99decf00-e3b2-11e8-9f41-6bd12a161c7d.png"> r? @QuietMisdreavus
…t, r=QuietMisdreavus Add version display for associated consts Fixes #54030. <img width="1440" alt="screenshot 2018-11-08 at 23 57 29" src="https://user-images.githubusercontent.com/3050060/48232648-99decf00-e3b2-11e8-9f41-6bd12a161c7d.png"> r? @QuietMisdreavus
☀️ Test successful - status-appveyor, status-travis |
…umeGomez Simplify foreign type rendering. Simplified foreign type rendering by switching from tables to flexbox. Also, removed some seemingly extraneous elements like “ghost” spans. Reduces element count on the `std::iter::Iterator` page by 30%. On my laptop it drops Iterator page load time from ~15s to ~10s. Frame times during scrolling are a hair lower too. Known visual changes (happy to tweak based on feedback): * The main `impl ...` headers are now getting the default, larger, h3 font size. This was an accident, but I liked how it turned out so I didn't fix it. * There's a hair less vertical spacing between the end of a where block and the start of the next fn. Now, all spacing is consistent. I think this looks a bit worse. I may tweak vertical spacing more here or in a follow-up that cleans up vertical spacing more broadly. * "[src]" links are all sized at 17px. A few were 19px in the original. I haven't yet done heavy cross-browser or cross-crate testing. I was hoping to get a quick thumbs up or thumbs down here at this first draft, then if this is on the right track I'll spend some time on that testing. TODO: - [x] Test on Chrome - [x] Test on Firefox - [ ] ~~Test on UC Android~~ - [x] Test on Edge - [x] Test on iOS safari - [x] Test on desktop safari - [x] Update automated tests - [x] Increase vertical margin - [x] Fix "Important traits for" hover overlap - [x] Wait for rust-lang#55798 to land & merge it
Fixes #54030.
r? @QuietMisdreavus