pkgdown icon indicating copy to clipboard operation
pkgdown copied to clipboard

More support for lifecycle badges in reference index?

Open maelle opened this issue 2 years ago • 4 comments

When a Rd page has a lifecycle badge such as https://tidyr.tidyverse.org/reference/spread.html should it be detected and stored with the rest of the Rd info to e.g. provide helpers to build the reference index?

maelle avatar Jun 13 '22 13:06 maelle

Just wanted to add that I encountered one project where badges were used as titles to achieve this. I'm not sure if it was intended, since it also clobbers the actual titles for their docs. Regardless, it was super cool to see the lifecycle status so prominently displayed at a glance across the whole package.

Screenshot of what it looks like in case the page gets updated: image

I'd love to see this developed into a more central part of pkgdown. It's so much easier to quickly gauge the state of the package export surface.

dgkf-roche avatar Nov 07 '23 16:11 dgkf-roche

I like @dgkf-roche's idea of making the badges visible on the reference index. Or, if not the badges, something based on the badge, an alert of some kind using colors from the boostrap theme?

maelle avatar Feb 19 '24 09:02 maelle

Yeah, this would be really nice.

hadley avatar Apr 12 '24 14:04 hadley

If we turn this on by default, we'll need to either provide an explicit opt-out, or some way to select some badges that you don't want to display. The tidyverse convention is to only label packages that have a different lifecycle stage to the package as a whole, but not everyone follows this convention, and it might be a bit busy if every function gets a label.

hadley avatar Apr 24 '24 13:04 hadley

OTOH this would encourage people to follow our style 😄

hadley avatar May 23 '24 22:05 hadley