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

Pages with and without "Contents" have different widths #473

Closed
fmaussion opened this issue Jan 29, 2022 · 12 comments
Closed

Pages with and without "Contents" have different widths #473

fmaussion opened this issue Jan 29, 2022 · 12 comments
Labels
bug Something isn't working

Comments

@fmaussion
Copy link
Contributor

fmaussion commented Jan 29, 2022

Describe the bug

The left-hand bar moves a little when switching between pages. Best explained with a video:

miro-2022-01-29_15.57.00.mp4

Reproduce the bug

Have a page with, and a page without Level 2 headers in it, build the book, and switch between them.

List your environment

Jupyter Book : 0.12.1
External ToC : 0.2.3
MyST-Parser : 0.15.2
MyST-NB : 0.13.1
Sphinx Book Theme : 0.1.10
Jupyter-Cache : 0.4.3
NbClient : 0.5.10

@fmaussion fmaussion added the bug Something isn't working label Jan 29, 2022
@pradyunsg
Copy link
Member

Do you have this documentation hosted somewhere, or the source code for it available online such that we can build a documentation set with this issue?

Asking because that'd make investigating this easier! :)

@fmaussion
Copy link
Contributor Author

@pradyunsg sure, sorry I should have thought of it:

Switching between "Welcome" and "Syllabus" makes the small shift - really really not a big deal, but enough to be noticed.

@fmaussion
Copy link
Contributor Author

Switching between "Welcome" and "Syllabus"

Actually now I notice, it's probably because of the image in the right side bar, because it doesn't occur with another page which hasn't this image

@fmaussion
Copy link
Contributor Author

Sorry for the noise, false alarm: removing the margin image doesn't solve the problem...

@choldgraf
Copy link
Member

I think that this is now resolved by the HTML refactoring in #471 . For example:

will close this - but please re-open if the problem persists when using the master branch of this repo!

@choldgraf
Copy link
Member

choldgraf commented Mar 29, 2022

@da5nsy something weird I just noticed - on the second page the scroll bar wasn't present. When I scrolled up or down, then it showed up and the width was the same as the other pages. Upon subsequent reloads, the scroll bar was there by default. Do you experience this?

If this behavior is due to the scroll bar showing up on some pages and not on others (because of content length etc) this will be hard to fix with CSS rules

@pradyunsg
Copy link
Member

FYI: The hacky solution that Furo uses for the scrollbar-on-tall-page-height is... always having a scrollbar on the page. :)

https://github.com/pradyunsg/furo/blob/c386171ffad12d069cc179fb5d77c75145f21d22/src/furo/assets/styles/_scaffold.sass#L16

@fmaussion
Copy link
Contributor Author

FYI: The hacky solution that Furo uses for the scrollbar-on-tall-page-height is... always having a scrollbar on the page. :)

Seems like the perfect solution to me 😉

@da5nsy
Copy link

da5nsy commented Mar 29, 2022

All 3 above examples appear the same width to me today 🤷 (on a different machine today but...). I will update if I can work anything else out...

@choldgraf
Copy link
Member

Maybe it is because one of your machines has a taller screen? That could explain why the scroll bar shows up on one but not the other.

IMO @pradyunsg has a reasonable approach to just make it appear all the time

@da5nsy
Copy link

da5nsy commented Apr 2, 2022

Maybe it is because one of your machines has a taller screen? That could explain why the scroll bar shows up on one but not the other.

Just tested. Spot on @choldgraf! 🌟

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants