Skip to content

Better extension order strategy - #23

Merged
cyanzhong merged 1 commit into
mainfrom
develop
Aug 18, 2026
Merged

Better extension order strategy#23
cyanzhong merged 1 commit into
mainfrom
develop

Conversation

@cyanzhong

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the generated extension gallery’s sorting so entries appear in a “Discover”-style order (featured first, then newest/updated, then natural name ordering), and adds test coverage for the ordering behavior.

Changes:

  • Introduce a shared compareEntries comparator to sort gallery entries by featured status, relevant date, and then name/id.
  • Use Intl.Collator with numeric comparison for human-friendly name sorting (e.g., “Theme 2” before “Theme 10”).
  • Add a new unit test asserting the gallery ordering.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
test/gallery.test.mjs Adds a regression test covering the expected “Discover” ordering in the rendered HTML.
scripts/lib/gallery.mjs Implements the new entry ordering strategy via a reusable comparator and updates gallery sorting to use it.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread test/gallery.test.mjs Outdated
Comment thread scripts/lib/gallery.mjs Outdated

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.

@cyanzhong
cyanzhong merged commit cdc6d75 into main Aug 18, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants