Skip to content
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

Source code scrollbar #109932

Merged
merged 2 commits into from
Apr 5, 2023
Merged

Conversation

GuillaumeGomez
Copy link
Member

Fixes #109865.

You can test it here.

It seems to introduce a few regressions (at least change of behaviour) about the scroll "saving" though.

r? @notriddle

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Apr 4, 2023
@rustbot
Copy link
Collaborator

rustbot commented Apr 4, 2023

Some changes occurred in HTML/CSS/JS.

cc @GuillaumeGomez, @Folyd, @jsha

@notriddle
Copy link
Contributor

What would it take to have horizontal scroll on the body? That’s how you get the best version of scrolling in almost all browsers (not just correct placement of scroll bars, but a lot of other little features).

@GuillaumeGomez
Copy link
Member Author

It would require to make the left sidebar static and to add left padding for the body. It's what I originally did but found it less elegant.

@notriddle
Copy link
Contributor

Just to list a few cases where attaching scroll bars to anything other than the body causes problems:

  • the scroll container needs focused or keyboard scrolling won’t work
  • Firefox Screenshots and archive.today won’t capture the entire page
  • the URL bar in mobile safari won’t auto-hide, and tapping the status bar to scroll to the top won’t work
  • pull-to-refresh behaves weirdly

@GuillaumeGomez
Copy link
Member Author

Ok so my first idea was actually better suited. I'll update this PR accordingly then.

@GuillaumeGomez
Copy link
Member Author

It was finally much simpler than I originally thought: I didn't need to update the padding or anything, just changing the sidebar z-index was enough. I updated the demo as well.

@notriddle
Copy link
Contributor

Looks fine to me in Firefox, Safari, and Chromium.

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Apr 4, 2023

📌 Commit 8aef0c7 has been approved by notriddle

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 4, 2023
bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 5, 2023
Rollup of 6 pull requests

Successful merges:

 - rust-lang#107236 (Add T-bootstrap label to tools)
 - rust-lang#109847 (Only create graphviz nodes for reachable MIR bb's)
 - rust-lang#109848 (submodule detection for proper fix on rust-lang#96188)
 - rust-lang#109932 (Source code scrollbar)
 - rust-lang#109952 (Move comment about python2 closer to the place it's used)
 - rust-lang#109956 (Tweak debug outputs to make debugging new solver easier)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit ee63b65 into rust-lang:master Apr 5, 2023
@rustbot rustbot added this to the 1.70.0 milestone Apr 5, 2023
@GuillaumeGomez GuillaumeGomez deleted the source-code-scrollbar branch April 5, 2023 15:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

rustdoc's source page is missing the horizontal scrollbar
4 participants