feat(release-notes): Group changelog entries by year with collapsible option 👌 - #877
feat(release-notes): Group changelog entries by year with collapsible option 👌#877petsto wants to merge 4 commits into
Conversation
… sections Replaces the flat list of all release notes with year-based collapsible groups. The current year (derived at build time) is expanded by default; all prior years are collapsed, dramatically reducing initial page length. Key changes: - New ReleaseNoteYearGroup component wraps each year's entries in a native <details>/<summary> element with a chevron that rotates on open/close - Year title stays at full opacity while the group is expanded (group-open Tailwind variant on the <details> element) - Release count badge sits right-aligned next to the chevron - First release item in each group has its top margin removed - Twilight (in-progress) builds are pinned to the top of the current year group rather than rendered above all year groups - navigateToVersion (version picker modal) now opens the parent year group before scrolling to the target version
|
Now that I'm reviewing it again, we can also not have a grouping option for the year we are currently in and only have grouping options for previous years, so it would work a little bit more like an Archive. But with current approach we keep a consistent UI and have an easy-to-place spot for the totals badge on the right |
| const versionEl = document.getElementById(version) | ||
|
|
||
| const parentYearGroup = versionEl?.closest('details.year-group') as HTMLDetailsElement | null | ||
| if (parentYearGroup) parentYearGroup.open = true | ||
|
|
There was a problem hiding this comment.
What is this supposed to do btw?
There was a problem hiding this comment.
The use case here ... when someone is choosing and older version from the "Navigate to version" button, we have to make sure that on the page we're expanding a group that might be collapsed.
For example:
- Use open old version list to navigate
- Wants to open a version from 2024
- We expand the group
- We then navigate to it with the native
/#{version}
I hope this makes sense 😅
- Remove redundant `|| undefined` from open attribute; Astro omits false boolean attrs natively - Guard release count badge render when notes.length is 0 - Drop manual ::marker and ::-webkit-details-marker CSS rules; Tailwind's list-none on <summary> already handles both - Replace broken keyframe animation with transition + @starting-style so the enter animation fires on every open, not just initial page render - Add explanatory comment with MDN and video links for @starting-style - Add comment clarifying why navigateToVersion opens the parent year group
taroj1205
left a comment
There was a problem hiding this comment.
sorry i think i forgot to actually submit this review...
| * @starting-style defines the initial state an element transitions FROM | ||
| * when it first becomes visible (e.g. display: none → block). | ||
| * Without it, CSS transitions are ignored on first paint since there is no prior state. | ||
| * Learn more: | ||
| * MDN — https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/At-rules/@starting-style | ||
| * Video — https://www.youtube.com/watch?v=vmDEHAzj2XE | ||
| */ |
CleanShot.2026-02-21.at.18.56.20.2.mp4
The why
I've noticed a couple of times when reviewing the Changelog page that it was always a bit strange to see all entries from different years on one big long page 😅. This update helps us clean up the UI a bit, while still giving people the option to review old version notes whenever they'd like.
The changes
Replaces the flat list of all release notes with year-based collapsible groups. The current year (derived at build time) is expanded by default; all prior years are collapsed, dramatically reducing initial page length. Without any changes to how Astro build the page or how it works with existing content.
Key changes:
<details>/<summary>element with a chevron that rotates on open/close<details>element)