-
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
rustdoc: Convert sub-variant toggle to HTML #84321
Conversation
Some changes occurred in HTML/CSS/JS. |
r? @ollie27 (rust-highfive has picked a reviewer for you, use r? to override) |
This comment has been minimized.
This comment has been minimized.
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.
Overall looks great to me! Thanks for working on this.
7987f91
to
6461087
Compare
Instead of creating a JS toggle, this injects details/summary for sub-variants of enums. This also fixes the CSS so that the toggle button does not jump when expanding/collapsing.
6461087
to
9f8eeca
Compare
Also, before I forget: can you add a test in |
I tried to do, however I have troubles getting those tests to run on my Windows. Maybe I will try this on my Linux another time. |
I definitely can't help you for running things on windows, sorry. :-/ To give you a little help: here you need to have a "hidden" item by default and to go to a page with an ID referring to that item and then check that this item isn't hidden (stating the obvious, sorry haha). For the second part, you need to use the Good luck! |
Let's merge this for the moment, I'll add the rustdoc-gui test later on. Opening an issue to not forget about it. Don't hesitate to claim it if you want to give it a try! @bors: r+ |
📌 Commit 8cf1b7734a5d9c50a4448c8e709a889228f15136 has been approved by |
@GuillaumeGomez just noticed while self-reviewing that I messed up the rustdoc-gui test (edited the wrong file after copying). If you are tracking followup work already I think its fine, otherwise I can fix the patch as well :-D |
No, please fix it now. :) @bors: r- |
8cf1b77
to
00d0e79
Compare
@GuillaumeGomez fixed the accidental file mixup, however I didn’t quite get around to actually trying the ui test on my linux |
It's fine, I opened the issue for that. Please remove your test, it's not testing much in here so better remove it for the moment. :) |
00d0e79
to
85879fe
Compare
done |
Thanks! @bors r+ rollup |
📌 Commit 85879fe has been approved by |
Rollup of 11 pull requests Successful merges: - rust-lang#80805 (Improve `Iterator::by_ref` example) - rust-lang#84248 (Remove duplicated fn(Box<[T]>) -> Vec<T>) - rust-lang#84321 (rustdoc: Convert sub-variant toggle to HTML) - rust-lang#84359 (:arrow_up: rust-analyzer) - rust-lang#84374 (Clean up .gitignore) - rust-lang#84387 (Move `sys_common::poison` to `sync::poison`) - rust-lang#84430 (doc/platform-support: clarify UEFI support) - rust-lang#84433 (Prevent control, shift and alt keys to make search input lose focus) - rust-lang#84444 (doc: Get rid of "[+] show undocumented items" toggle on numeric From impls) - rust-lang#84456 (Fix ICE if original_span(fn_sig) returns a span not in body sourcefile) - rust-lang#84469 (Update comment on `PrimTy::name_str`) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Instead of creating a JS toggle, this injects details/summary for
sub-variants of enums. This also fixes the CSS so that the toggle button
does not jump when expanding/collapsing.
Takes inspiration from #83337 and should be considered part of #83332. Not quite sure if the
.sub-variant
selectors could be further simplified? AFAICS it is only used in that place, and that does not seem to allow any recursion.