-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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: mobile nav fixes #93183
rustdoc: mobile nav fixes #93183
Conversation
Some changes occurred in HTML/CSS/JS. |
Did you encounter this problem somewhere? If so, can you add a GUI test to prevent a regression please? |
For the scrolling: yes, will write.
For the font size issue: is there a way to set the browser's font size in
browser-UI-test?
…On Sat, Jan 22, 2022, 10:46 Guillaume Gomez ***@***.***> wrote:
Did you encounter this problem somewhere? If so, can you add a GUI test to
prevent a regression please?
—
Reply to this email directly, view it on GitHub
<#93183 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABVYLLDL56NAVJARIFNOMLUXL3RDANCNFSM5MRBJFKA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
I actually don't know how to set the browser's font size, so I can't answer this question... I'll check that tomorrow. |
I think this does what you want? |
I think so? That links to https://vanilla.aslushnikov.com/?Page.setFontSizes, which seems to do what I need. But that needs to be exposed in browser-UI-test, right? |
Also how do I tell browser-UI-test "scroll this specific container all the way to its bottom?" |
I need to add it indeed.
Just to be sure: do you mean like scrolling to the end of a text field or really going to the bottom of a given element? For the second, you can always scroll to the element just after it. Or we could add a parameter/new command in browser-ui-test? In both cases, can you open issues there please so I can put them in my todo list? |
e448be6
to
7c24468
Compare
Filed GuillaumeGomez/browser-UI-test#248 and updated the PR with a small, imperfect test for the scrolling issue. |
What browser, font size, and screen / viewport dimensions? |
Firefox, default font size and < 420px. |
- Make sure the mobile-topbar doesn't overflow its height if the user sets a bigger font. - Make sure the sidebar can be scrolled all the way to the bottom by shortening it to accommodate the mobile-topbar. - Make the item name in the mobile-topbar clickable to go to the top of the page. - Remove excess padding sidebar in mobile mode.
7c24468
to
a998a37
Compare
Found it and pushed a fix! The heading was wrapping, which was causing a scrollbar. Turned off wrapping for that heading, and set |
// Check that the bottom-most item on the sidebar menu can be scrolled fully into view. | ||
click: ".sidebar-menu-toggle" | ||
scroll-to: ".block.keyword li:nth-child(1)" | ||
assert-position: (".block.keyword li:nth-child(1)", {"y": 542.96875}) |
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.
Wow, that's quite the number. XD
Thanks! @bors: r+ rollup |
📌 Commit a998a37 has been approved by |
Rollup of 5 pull requests Successful merges: - rust-lang#92887 (Bootstrap compiler update) - rust-lang#92908 (Render more readable macro matcher tokens in rustdoc) - rust-lang#93183 (rustdoc: mobile nav fixes) - rust-lang#93192 (Add VS 2022 into error message) - rust-lang#93475 (Add test to ensure that theme is applied correctly when going back in history) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Make sure the mobile-topbar doesn't overflow its height if the user sets a bigger font.
Make sure the sidebar can be scrolled all the way to the bottom by shortening it to accommodate the mobile-topbar.
Make the item name in the mobile-topbar clickable to go to the top of the page.
Remove excess padding sidebar in mobile mode.
Demo https://rustdoc.crud.net/jsha/mobile-nav-fixes/std/string/struct.String.html
r? @GuillaumeGomez