-
Notifications
You must be signed in to change notification settings - Fork 323
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
Better ways to organise news page #1610
Comments
Getting the sidebar scrolling behaviour correct is surprisingly difficult, so I'd prefer not to have to revisit the current solution. One thing we could relatively easily do is group the versions using a heading hierarchy, so at least they wouldn't all attempt to show at the same time. Alternatively, you might try: news:
one_page: false to see if that display is any better (but I suspect that it will just reveal a different problem). |
You're right, the
(though there are versions with no release date, so that might be problematic). |
Maybe there could be an option for manual grouping? That would be annoying to set up the first time, but would give maximum flexibility. |
I imagine that would be easiest to implement, and it would get the job done. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Hmmm, I think I have managed to come up with a tweak to make the sidebar independently scrollable: #pkgdown-sidebar {
position: sticky;
top: calc(#{$pkgdown-nav-height} + 1rem);
max-height: calc(100vh - #{$pkgdown-nav-height} - 2rem);
overflow-y: scroll;
} (And remove There's at least one disadvantage, but I think it's pretty minor: if the sidebar content is longer than the main content (which probably would only happen on the home page, and only then if you had a short read me), you need to manually scroll the sidebar. OTOH maybe the sidebar on the home page should get a different treatment anyway, since it's not usually a table of contents. Anyway, I'll work up PR with example later today. |
New strategy for sidebar scrolling: * Only apply to TOC, so doesn't affect home page * Make TOC scrollable, and fix height to 100vw (minus margins) * Remove negative margins treatment since the background is now cut off because `overflow-y: scroll` causes #TOC to get a new "block formatting context" Fixes #1610
The
rgl
package Changelog page lists a lot of versions in the contents sidebar. However, that list doesn't scroll, so on my screen I can only see up to version 0.95.1158 unless I scroll the whole page to the bottom. The final 30 versions then come into view, but if I click on one of them that's not right near the bottom, I lose them again.This is using Bootstrap 3 with the Github devel version of pkgdown, but the same issue occurs with CRAN pkgdown. For my first attempt with Bootstrap 4 I saw the same thing, but after updating all packages to devel versions, the contents listing has disappeared completely (at least with
pkgdown::build_news()
).I think the solution would be to make the contents listing scrollable.
The text was updated successfully, but these errors were encountered: