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

Add vertical scroll bar to "Articles" tab #2712

Open
TylerSagendorf opened this issue Jul 12, 2024 · 5 comments · May be fixed by #2716
Open

Add vertical scroll bar to "Articles" tab #2712

TylerSagendorf opened this issue Jul 12, 2024 · 5 comments · May be fixed by #2716
Labels
front end 🌷 General HTML, CSS, and JS issues

Comments

@TylerSagendorf
Copy link

When there are too many vignettes & articles in an R package, the display size may completely hide some of the options in the "Articles" tab drop-down menu. Issue visible here: https://motrpac.github.io/MotrpacRatTraining6moWATData/index.html. Suggest displaying only 10 options at once and including a scroll bar to view the rest.

@jayhesselberth
Copy link
Collaborator

May be a simple fix with some CSS.

.dropdown-menu {
    max-height: 280px;
    overflow-y: auto;
}

FWIW on my mobile device your long dropdown does have a scroll bar.

@jayhesselberth jayhesselberth added the front end 🌷 General HTML, CSS, and JS issues label Jul 12, 2024
jayhesselberth added a commit that referenced this issue Jul 12, 2024
@jayhesselberth
Copy link
Collaborator

It's a a little hard to test these changes with the pkgdown website. Could you install this branch and rebuild your site locally?

pak::pak("r-lib/pkgdown@issue-2712")

@jayhesselberth jayhesselberth linked a pull request Jul 13, 2024 that will close this issue
@hadley
Copy link
Member

hadley commented Jul 13, 2024

IMO this already looks ok, and the real solution is to add some hierarchy to your articles.

@TylerSagendorf
Copy link
Author

It's a a little hard to test these changes with the pkgdown website. Could you install this branch and rebuild your site locally?

pak::pak("r-lib/pkgdown@issue-2712")

It doesn't seem to have added a scroll bar. Was the .dropdown-menu class used for the articles dropdown? It seems like it was only defined.

@TylerSagendorf
Copy link
Author

IMO this already looks ok, and the real solution is to add some hierarchy to your articles.

Hierarchy = combining related articles? In hindsight, it probably would have been better to organize the articles by manuscript figure. Unfortunately, with the manuscript being published, I do not currently have the time or resources to spend on making major changes to the package (especially since no one else appears to be using it...). I will at least ensure that future R packages like it will not repeat the same mistakes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
front end 🌷 General HTML, CSS, and JS issues
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants