rustdoc mobile: fix scroll offset when jumping to internal id#93067
Merged
bors merged 1 commit intorust-lang:masterfrom Jan 21, 2022
Merged
rustdoc mobile: fix scroll offset when jumping to internal id#93067bors merged 1 commit intorust-lang:masterfrom
bors merged 1 commit intorust-lang:masterfrom
Conversation
Contributor
|
Some changes occurred in HTML/CSS/JS. |
Member
Maybe the following would work: click on an element. Check that the element has the Otherwise, this PR looks good to me minus the missing test. :) Thanks a lot for this improvement! |
6c3e1fd to
801ac0e
Compare
Contributor
Author
|
Added a test! |
GuillaumeGomez
approved these changes
Jan 19, 2022
Member
|
r=me once CI pass then. :) |
Contributor
Author
|
@bors r=GuillaumeGomez rollup |
Collaborator
|
📌 Commit 801ac0e has been approved by |
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Jan 21, 2022
…askrgr Rollup of 17 pull requests Successful merges: - rust-lang#91032 (Introduce drop range tracking to generator interior analysis) - rust-lang#92856 (Exclude "test" from doc_auto_cfg) - rust-lang#92860 (Fix errors on blanket impls by ignoring the children of generated impls) - rust-lang#93038 (Fix star handling in block doc comments) - rust-lang#93061 (Only suggest adding `!` to expressions that can be macro invocation) - rust-lang#93067 (rustdoc mobile: fix scroll offset when jumping to internal id) - rust-lang#93086 (Add tests to ensure that `let_chains` works with `if_let_guard`) - rust-lang#93087 (Fix src/test/run-make/raw-dylib-alt-calling-convention) - rust-lang#93091 (⬆ chalk to 0.76.0) - rust-lang#93094 (src/test/rustdoc-json: Check for `struct_field`s in `variant_tuple_struct.rs`) - rust-lang#93098 (Show a more informative panic message when `DefPathHash` does not exist) - rust-lang#93099 (rustdoc: auto create output directory when "--output-format json") - rust-lang#93102 (Pretty printer algorithm revamp step 3) - rust-lang#93104 (Support --bless for pp-exact pretty printer tests) - rust-lang#93114 (update comment for `ensure_monomorphic_enough`) - rust-lang#93128 (Add script to prevent point releases with same number as existing ones) - rust-lang#93136 (Backport the 1.58.1 release notes to master) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Followup to #92692. The semantics of
scroll-margin-topare a little surprising - the attribute needs to be applied to the element that gets scrolled into the viewport, not the scrolling element.This fixes an issue where clicking on a method (or other item) from the sidebar takes you to a scroll position where the topbar covers up the method name.
I'm interested in ideas for how to test this with browser-ui-test, but I think it doesn't yet have what I need. What I need is an assert that
<element>.getBoundingClientRect().yis > 45.Demo: https://rustdoc.crud.net/jsha/fix-scroll-padding-top/std/string/struct.String.html#method.extend_from_within
r? @GuillaumeGomez