Skip to content

Remove CSS variables feature-testing from PDFSidebarResizer #12352

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

Merged

Conversation

Snuffleupagus
Copy link
Collaborator

This reverts commit 9e4552d for causing the sidebar to become too narrow when the entire viewer is resized.

**Steps to reproduce:**
 1. Load the viewer.
 2. Open the sidebar.
 3. Resize the sidebar, making it wider.
 4. Resize the entire viewer, i.e. the browser window, making it *narrower* than 400 pixels.

**Expected result:**
 The sidebar width is clamped at 200 pixels.

**Actual result:**
 The sidebar becomes too narrow.

The cause of this bug is, in hindsight, quite obvious since the `clamp` helper function implicitly assumes that the `min`/`max` arguments are correctly sorted. At viewer widths *below* 400 pixels, that assumption is broken which explains the bug.
@Snuffleupagus
Copy link
Collaborator Author

/botio-linux preview

@pdfjsbot
Copy link

pdfjsbot commented Sep 9, 2020

From: Bot.io (Linux m4)


Received

Command cmd_preview from @Snuffleupagus received. Current queue size: 0

Live output at: http://54.67.70.0:8877/2c76ec3d2363866/output.txt

@pdfjsbot
Copy link

pdfjsbot commented Sep 9, 2020

From: Bot.io (Linux m4)


Success

Full output at http://54.67.70.0:8877/2c76ec3d2363866/output.txt

Total script time: 3.47 mins

Published

@Snuffleupagus Snuffleupagus force-pushed the sidebar-resizer-CSS-vars branch from b8c58c6 to 01c1d87 Compare September 9, 2020 20:26
@timvandermeij
Copy link
Contributor

/botio-linux preview

@pdfjsbot
Copy link

pdfjsbot commented Sep 9, 2020

From: Bot.io (Linux m4)


Received

Command cmd_preview from @timvandermeij received. Current queue size: 0

Live output at: http://54.67.70.0:8877/884bd83dc1d0ca3/output.txt

@pdfjsbot
Copy link

pdfjsbot commented Sep 9, 2020

From: Bot.io (Linux m4)


Success

Full output at http://54.67.70.0:8877/884bd83dc1d0ca3/output.txt

Total script time: 3.46 mins

Published

@timvandermeij timvandermeij merged commit e8822e1 into mozilla:master Sep 9, 2020
@timvandermeij
Copy link
Contributor

Nice to get rid of this code. Thanks!

@Snuffleupagus Snuffleupagus deleted the sidebar-resizer-CSS-vars branch September 10, 2020 07:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants