Generally speaking, it's a lot better to be able to see a full expression than to have it all on the same line, so we probably want to add some sort of wrapping support to the rendered latex output.
See also:
- T134281: Page becomes horizontally scrollable with certain formulae
- T338951: Math formulae render with unnecessary vertical scrollbars
QA steps
- Visit https://en.wikipedia.beta.wmflabs.org/w/index.php?title=MathML and resize browser so that the left and right menu are open on either side.
- Search/Scroll to For odd n, all odd prime divisors of Fn are congruent to 1 modulo 4, implying that all odd divisors of Fn (as the products of odd prime divisors) are congruent to 1 modulo 4.
- A scrollbar should be visible
- Check scrollbar is not visible on shorter equations
- Confirm same behaviour on mobile domain
- In MacBook Settings, enable "Show scroll bars: always" and confirm the behaviour is identical to before.
- In MacBook Settings, enable "Show scroll bars: Automatically based on mouse of trackpad". Go to the page and confirm no scrollbars. Then add a physical mouse to your device and confirm the behaviour is identical to before.
- In browser stack view the page in Windows 7, latest Chrome and confirm the same behaviour.
Requirement
Ensure that long math output is readable on small screens by providing a horizontal scrollbar for lengthy equations, while shorter equations do not show a scrollbar. This behavior should be consistent across desktop and mobile domains and respect system settings for scrollbars.
BDD
Feature: Improve readability of long math output on small screens
Scenario: Long math equations display a horizontal scrollbar on Chrome macOS
Given I visit a Wikipedia article with long math output on Chrome macOS
When I view the page with left and right menus visible
Then a horizontal scrollbar should be visible for the long math equation
Scenario: Long math equations display a horizontal scrollbar on Windows 7 Chrome
Given I visit a Wikipedia article with long math output on Windows 7 using Chrome
When I view the page with side menus visible
Then a horizontal scrollbar should be visible for the long math equationTest Steps
Test Case 1: Verify horizontal scrollbar on Chrome macOS
- Visit https://en.wikipedia.org/wiki/Fibonacci_sequence on a Mac running Chrome.
- Scroll to the Decomposition of Powers section containing the long math sequence.
- AC1: Confirm that a horizontal scrollbar is visible for the long math equation.
⸻
Test Case 2: Verify horizontal scrollbar on Windows 7 Chrome
- Using BrowserStack or an equivalent tool, open https://en.wikipedia.org/wiki/Fibonacci_sequence in Windows 7 with Chrome.
- Scroll to the Decomposition of Powers section containing the long math sequence.
- AC2: Confirm that a horizontal scrollbar is visible for the long math equation.
QA Results - Prod
| AC | Status | Details |
|---|---|---|
| 1 | ✅ | T201233#10711375 |
| 2 | ✅ | T201233#10711375 |









