-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
rustdoc: Make the #[stable(since)] version attribute clearer with a tooltip #33705
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @cmr (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
I thought I had pushed/squashed that commit yesterday but I was very wrong |
@bors: r+ rollup I like it, thank you! |
📌 Commit e733629 has been approved by |
@GuillaumeGomez I am confused. The title should not be shown on the page, only on hover. |
@bors: r- until we sort out what is going on |
My screenshot is wrong, however it makes the "since" disappears (and it doesn't show back when you hover the title or whatever). I'm not against a tootip when you hover the "since", but this is not what this seems to do. |
@GuillaumeGomez Salut Guillaume ;) What did you mean by making the "since" disappear ? Like, the word "since" is missing ? If that is the case, I just added the title, there doesn't seem to be a "since" right now on nightly docs, eg https://doc.rust-lang.org/nightly/std/collections/hash_map/struct.HashMap.html#method.with_hasher to link around your screenshot. |
Salut ! :)
No, I'm referring to "1.7.0" for example. The "since tag" if you prefer. With your code, they disappear. |
@GuillaumeGomez : Here's a Chrome 50 (win) screenshot of your "since" span I modified, on HashMap, there's both "1.0.0" and the tooltip showing: I don't have other OSes handy but I tested the PR on OSX as well. The #[stable(since)] to methods like with_hasher (and what your screenshot was showing) are divs that I didn't modify so they should still be here. Maybe you're talking about since tags other than those 2 kinds ? Could you share a screenshot of the behavior you're seeing ? EDIT: to ping guillaume and remove a wrong comment on my part |
I tested on chrome on windows, but not on this "since tag", it was this one. And it seems to be working on firefox/debian. Strange... @steveklabnik: Let's merge this for now and if I have another problem, it'll be always time to fix it. |
Yeah IIRC those are divs rendered by render_stability_since_raw() which I didn't modify — but probably should/will at some point if you guys want me to add a tooltip there as well :) |
This would be very appreciated. :) |
Great, thanks! Can you squash your commits please? |
sure |
@GuillaumeGomez I hope I was able to do it correctly :) |
✌️ @GuillaumeGomez can now approve this pull request |
📌 Commit 352a70b has been approved by |
merci @GuillaumeGomez and thank you @steveklabnik :) |
…laumeGomez rustdoc: Make the #[stable(since)] version attribute clearer with a tooltip Rustdoc's new 'since' version placement only shows the version number in which the item was marked stable. This gains space but might make the meaning of this version string less clear in the docs, so I tried to bring some explicitness in a tooltip.
Rustdoc's new 'since' version placement only shows the version number in which the item was marked stable. This gains space but might make the meaning of this version string less clear in the docs, so I tried to bring some explicitness in a tooltip.