-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Improve display of crate name when hovered #117906
Improve display of crate name when hovered #117906
Conversation
Some changes occurred in HTML/CSS/JS. cc @GuillaumeGomez, @jsha |
It was done that way so that it would align with the search bar. How does this commit address that? |
Also if using more screen space is okay, I can simply increase |
So what do you want to do here @notriddle ? |
I’ll approve if @fmease thinks it looks good. |
Oddly enough, having built rustdoc locally with this patch applied, it looks totally different from Guillaume's screenshots here: #117906 (comment). The backdrop still aligns with the the search bar: And I've found a slight debatable regression (which you can hopefully reproduce):
Not blocking though. So I can neither approve nor disapprove atm ^^' Mozilla Firefox 121.0 |
This PR is a bit old. I'm going to rebase and update whatever needs to be updated then I'll post new screenshots and an online demo. |
1a9544e
to
96e6cfa
Compare
Updated screenshots, code and added link to online docs so you can test it yourself. :) |
CC #120471, could be addressed in this PR, too, or in a follow-up. In the latter case, r=notriddle,fmease on this PR I suppose. |
Different case. I'll take a look later on. Thank you both for the reviews! @bors r=fmease,notriddle |
…llaumeGomez Rollup of 11 pull requests Successful merges: - rust-lang#117906 (Improve display of crate name when hovered) - rust-lang#118533 (Suppress unhelpful diagnostics for unresolved top level attributes) - rust-lang#120293 (Deduplicate more sized errors on call exprs) - rust-lang#120295 (Remove `raw_os_nonzero` feature.) - rust-lang#120310 (adapt test for v0 symbol mangling) - rust-lang#120342 (Remove various `has_errors` or `err_count` uses) - rust-lang#120434 (Revert outdated version of "Add the wasm32-wasi-preview2 target") - rust-lang#120445 (Fix some `Arc` allocator leaks) - rust-lang#120475 (Improve error message when `cargo build` is used to build the compiler) - rust-lang#120476 (Remove some unnecessary check logic for lang items in HIR typeck) - rust-lang#120485 (add missing potential_query_instability for keys and values in hashmap) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#117906 - GuillaumeGomez:improve-crate-name-hover, r=fmease,notriddle Improve display of crate name when hovered Currently when we hover the crate name, the background is stuck to the version and to the logo (when there is one): ![Screenshot from 2023-11-14 11-42-39](https://github.com/rust-lang/rust/assets/3050060/717190cd-483d-45a1-a462-e9ba342d4376) ![Screenshot from 2023-11-14 11-43-19](https://github.com/rust-lang/rust/assets/3050060/23f8bc9b-1304-4f91-ae1e-96bc508e9da6) I find it very unpleasant so I reduced the padding size and increased the margin (left and top) to keep the same positioning but not making it stuck anymore: ![Screenshot from 2024-01-29 20-40-11](https://github.com/rust-lang/rust/assets/3050060/82cf266c-7f99-4a46-a62b-ebe2445f52be) ![Screenshot from 2024-01-29 20-48-01](https://github.com/rust-lang/rust/assets/3050060/e7097c10-6e09-4bdc-a37f-070b6dac671d) [online docs](https://rustdoc.crud.net/imperio/improve-crate-name-hover/std/index.html) r? `@notriddle`
Currently when we hover the crate name, the background is stuck to the version and to the logo (when there is one):
I find it very unpleasant so I reduced the padding size and increased the margin (left and top) to keep the same positioning but not making it stuck anymore:
online docs
r? @notriddle