docs: Highlight new examples in the gallery#3999
Conversation
It's difficult to notice them otherwise since there are so many examples
To draw more attention to new gallery examples
|
Awesomeness😎🤩👏 |
|
Very nice @joelostblom! Just to flag a related effort: vega/vega-datasets#776 builds a meta-dataset cross-referencing ~400 examples across the Vega, Vega-Lite, and Altair galleries, mapping each to its datasets, categories, and descriptions. The motivation is similar — examples are a huge resource but hard to see as a whole. Having them indexed opens up things like spotting coverage gaps (which features lack gallery examples?), identifying where new datasets could better showcase capabilities, and giving tools a way to surface relevant examples in context. For Vega and Vega-Lite the ingestion is straightforward — structured JSON indexes and specs that can be walked mechanically. Altair is the trickiest leg since I don't believe there's a structured index of examples: it discovers examples by listing |
|
Thank you @dsmedia! It's been exciting to also watch all the great work you have been doing with vega-datasets package and repo to get them into such good shape! It seems like vega/vega-datasets#776 is another intriguing step in that direction and it will be cool to see some visualizations of that gallery metadata as per the different scenarios you have imagined. I replied in more detail over in that PR. |
|
Looks great! Quick question, how do you decide what counts as "recently added"? Based on date? |
|
For what is recently added, I manually checked which examples were added in the last two years that looked especially cool. I don't think we need a strict cutoff but can choose to have some up there for longer if we think they are especially neat and would be instructive for readers. As for the background shadow/blur, I was thinking that it makes the new examples stand out from the rest, but maybe that is not needed now that we have a separate section on top for recently added and also the "new" pill. I will try applying the shadow to everything and seeing how it looks |
|
Looks great! |


When we have new gallery examples contributed, I think it's unfortunate that they get lost/buried in the many other examples on the gallery page. This PR adds support for a
# :new:tag in gallery example files, which is then translated into some CSS highlighting effects plus added to a section on top of the docs called "Recently Added":New examples are also present in their respective categorical sections, where they are highlighted further with a (NEW) pill/tag:
I'm hoping this can draw more attention to the new examples and think it can be especially impactful since our gallery page is one of the most frequently visited in the docs. For now, I chose to highlight a few neat newish examples that have been contributed somewhat recently.