Skip to content

feat: sort icons on the website by release date and last update - #96

Merged
Snailedlt merged 1 commit into
masterfrom
feat/website-sort
Oct 25, 2026
Merged

Snailedlt merged 1 commit into
masterfrom
feat/website-sort

Conversation

@Snailedlt

Copy link
Copy Markdown
Owner

Adds a Sort by dropdown to the website, next to the search box: Sort by name (default), Newest first (the release an icon first shipped in) and Recently updated (the release of its last real change). Hovering an icon shows e.g. "Released in v2.10.0 (2021-02-23), last updated in v2.16.0 (2024-02-05)".

Data: .github/scripts/generate_icon_history.js writes devicon-history.json from git history.

  • Released = the first v* tag whose tree contains icons/<name>/. Includes the old v1.0 … v2.7 tags.
  • Updated = the release containing the icon's last commit, ignoring build: commits (they only re-optimize SVGs) and bulk commits touching more than 5 icons (e.g. the 2021 SVGO optimization).
  • Timestamps are UTC, so releases made on the same day still sort correctly. The file is ~74 KB, one icon per line.

Release job: the file is regenerated right before npm version, with the upcoming version passed in, and committed as chore: update icon history for vX.Y.Z. Icons first shipped in a release therefore get that release's version, and the tag includes the file.

Website: loads devicon-history.json next to devicon.json. If a release doesn't have it (all current ones), the dropdown stays hidden and nothing changes.

Tested:

  • Generator against the repo history: all 581 icons covered, ~2 s. html5/python → v1.0 (2014), react → v2.1, recent test icons → their fork releases.
  • The real docs/index.html in jsdom with a local server: 581 icons. Each sort option reorders the grid (e.g. newest first → playbutton, newicon, testicon, …), works together with search, tooltip shown. Without the history file the dropdown is hidden.

This is a feature, not an icon PR, so the check-bot doesn't label it. Labelled release: minor by hand.

🤖 Generated with Claude Code

- generate_icon_history.js writes devicon-history.json: per icon, the
  first release containing it and the release of its last real change
  (ignoring build commits and commits touching more than 5 icons).
- The release job regenerates it right before tagging, so icons first
  shipped in a release get that release's version.
- docs/: a 'Sort by' dropdown (name / newest first / recently updated)
  and a tooltip with the release info; hidden when a release has no
  history file.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Snailedlt Snailedlt added the release: minor Triggers a minor version bump on next release label Oct 25, 2026
@Snailedlt
Snailedlt merged commit fe22ec7 into master Oct 25, 2026
4 checks passed
@Snailedlt
Snailedlt deleted the feat/website-sort branch October 25, 2026 23:05
Snailedlt added a commit that referenced this pull request Nov 1, 2026
Icon history (website sort by release date / last update) is a website
feature, not part of the trunk migration. This takes it out of master
(reverts #96 and removes the generated `devicon-history.json`). It comes
back as its own PR after the migration: see the stacked PR.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release: minor Triggers a minor version bump on next release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant