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

Fix weird layout workflow issues on firefox #358

Merged

Conversation

@GuillaumeGomez
Copy link
Member

commented May 20, 2019

Currently, on firefox, on a big enough page, when you scroll and press 'S', the page scrolls back to the search bar but it's still hidden under the top navbar. It's because firefox considers that we're scrolling the body and not the content, which is an issue fixed by this PR.

I need to check on chrome if it doesn't break anything and works as expected.

A little screenshot:

Screenshot from 2019-05-20 16-52-57

Fixes #356

@GuillaumeGomez

This comment has been minimized.

Copy link
Member Author

commented May 20, 2019

I confirm that it works as expected on chrome as well!

@GuillaumeGomez GuillaumeGomez changed the title [WIP] Fix weird layout workflow issues on firefox Fix weird layout workflow issues on firefox May 20, 2019

@GuillaumeGomez

This comment has been minimized.

Copy link
Member Author

commented Jun 4, 2019

@GuillaumeGomez

This comment has been minimized.

Copy link
Member Author

commented Jun 5, 2019

Thanks to @onur, I was able to see that the right scrollbar wasn't where it was supposed to be. The second commit fixes this issue.

@onur

This comment has been minimized.

Copy link
Member

commented Jun 5, 2019

@GuillaumeGomez it's really a nasty hack and unfortunately didn't work. Here is the result for different screen resolutions, click them to see in full resolution:

Note: My rustc is really old therefore using an old version of css from rustdoc. I don't think its gonna make any difference but I'll try again tomorrow with a newest version of rustc.

Screenshot_2019-06-06 rand - Rust
Screenshot_2019-06-06 rand - Rust(1)
Screenshot_2019-06-06 rand - Rust(2)
Screenshot_2019-06-06 rand - Rust(3)

@GuillaumeGomez

This comment has been minimized.

Copy link
Member Author

commented Jun 6, 2019

Didn't think that the resolution would change that... I need to investigate further. Thanks again for the bug reports! :3

@GuillaumeGomez GuillaumeGomez force-pushed the GuillaumeGomez:layout-workflow-issues branch from ba4c4c5 to 1f86ee2 Jun 6, 2019

@GuillaumeGomez

This comment has been minimized.

Copy link
Member Author

commented Jun 6, 2019

I found an even easier way to fix the problem: removing the limit on the top element to let sub elements handle it themselves. :)

@GuillaumeGomez

This comment has been minimized.

Copy link
Member Author

commented Jun 11, 2019

ping @onur

@@ -141,14 +143,13 @@ div.container {
}

div.container-rustdoc {
max-width: 1200px;

This comment has been minimized.

Copy link
@QuietMisdreavus

QuietMisdreavus Jun 25, 2019

Member

What does removing this rule do?

This comment has been minimized.

Copy link
@QuietMisdreavus

QuietMisdreavus Jun 25, 2019

Member

After talking with Guillaume on Discord, it seems like this was the thing causing the bug Onur had seen, with the scrollbar appearing next to the content rather than on the edge of the viewpoint. However, removing this also causes the "crate search" box in the docs.rs navbar to move all the way to the side:

image

Maybe we can move this rule to div.nav-container-rustdoc instead, rather than deleting it entirely? The value itself may need to be changed, since the rustdoc content is a little wider than 1200px.

@GuillaumeGomez GuillaumeGomez force-pushed the GuillaumeGomez:layout-workflow-issues branch from 1f86ee2 to d727476 Jun 25, 2019

@@ -140,15 +142,15 @@ div.container {
text-align: left;
}

div.container-rustdoc {
div.nav-container-rustdoc {

This comment has been minimized.

Copy link
@QuietMisdreavus

QuietMisdreavus Jun 25, 2019

Member

When i said "move this rule to div.nav-container-rustdoc, i meant to use the existing block on line 265. By renaming the block like this, the div loses its text-align: left rule:

image

This comment has been minimized.

Copy link
@GuillaumeGomez

GuillaumeGomez Jun 26, 2019

Author Member

If I did that, the width of the navbar would be maximum 1200px, which wouldn't be nice. I changed something else instead. :)

@GuillaumeGomez GuillaumeGomez force-pushed the GuillaumeGomez:layout-workflow-issues branch from d727476 to 598810a Jun 26, 2019

@GuillaumeGomez

This comment has been minimized.

Copy link
Member Author

commented Jul 22, 2019

It seemed to have fix the issue (at least locally). I'll merge it for now but don't hesitate to come back to me if any other issue appears!

@GuillaumeGomez GuillaumeGomez merged commit 8b53e64 into rust-lang:master Jul 22, 2019

6 checks passed

docs.rs Build #20190626.1 succeeded
Details
docs.rs (test jessie) test jessie succeeded
Details
docs.rs (test stretch) test stretch succeeded
Details
docs.rs-2.0 Build #20190626.1 succeeded
Details
docs.rs-2.0 (test jessie) test jessie succeeded
Details
docs.rs-2.0 (test stretch) test stretch succeeded
Details

@GuillaumeGomez GuillaumeGomez deleted the GuillaumeGomez:layout-workflow-issues branch Jul 22, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.