-
Notifications
You must be signed in to change notification settings - Fork 336
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 a dependencies page one click away from the homepage? #1333
Comments
For packages that are already on CRAN / BIOC, this information already exists one click away (i.e., the link under "Download from CRAN at"). |
Right! Which makes the feature less useful. However even for those, the dependencies page could look better than the CRAN page: ordering dependencies alphabetically, one line per dependency (to make it easier to count them?), and linking to their pkgdown website when existing instead of their CRAN page. 🙂 |
We could dump I'm not sure where to link to this. A badge doesn't seem appropriate. |
Right, I was thinking it was slightly related to "dev" hence the idea to put it under "Dev status". 😁 (the navbar seems too prominent for such a link?) The dependencies list could make it clear what's on CRAN/what's not and it'd be nice if it merged Remotes with other fields (e.g. if the package imports pkgdown and has r-lib/remotes@vtag in Remotes). The page source could be a direct link to DESCRIPTION on GitHub (like what happens for vignettes/manual pages). |
Maybe this could be based on |
Wanted to bump this idea. It would be quite nice to have something like the below under DependenciesImports
Suggests
|
I was thinking to dump |
I think that the right place to add this is under links, since it seems most related to "browse source code" and "report a bug", now that dev status is only display on the development site. But I'm not sure about the visual treatment on the page itself. We could copy CRAN and do a comma separated list, but that seems like not a lot of content for the whole page. We could do a table but I think there are only two obvious columns: the package name (linked to the website) and the dependency type. I think @JosiahParry's suggesting of bulleted lists is the most compelling, but that's going to create a pretty long page that's fairly low information density. Is there something else that we could display on this page? I've generally gone off the idea of also including the versions actually used to build the page since I don't think that's going to be that useful to that many people, but I could probably be convinced otherwise. I did figure out one thing that we can do that CRAN does not, and that's list all the recursive dependencies. |
I quite like your suggestions, @hadley, particularly the recursive dependencies. I often find myself using Could the lengthy lists be hidden in a collapsable section somewhat like this? repro: library(bslib)
library(shiny)
accordion(
accordion_panel("Dependencies", accordion(
list(
accordion_panel(
"Imports",
tags$ul(tags$li("rlang"), tags$li("vctrs"))
),
accordion_panel(
"Suggests",
tags$ul(tags$li("data.table"))
),
accordion_panel(
"Strong Recursive Dependencies",
tags$ul(
tags$li("httr2"),
tags$li("Rcpp"),
tags$li("cpp11"),
tags$li("stringr")
)
)
)
))
) |
@JosiahParry are you think that would go in the sidebar? |
@hadley, yes, I think so. I could envision something like below but ~ prettier ~. Gif hidden in details Or, alternatively, I could envision a pkgdown page similar to CRAN's package (i.e. rlang) landing page that that has all the package metadata in one location. This would be go nicely well with a package level rd file (I'm thinking of |
When checking out a package via its pkgdown homepage, I often click on the GitHub icon to go open DESCRIPTION and look at the package and external dependencies.
It'd be cool for pkgdown websites to feature a page listing dependencies (linking them like external functions, related to #1234).
The homepage could link to it somehow. Maybe a badge under "Dev status", before other badges, that'd have the text "dependencies".
The text was updated successfully, but these errors were encountered: