Skip to content

Conversation

@wojtekmaj
Copy link
Contributor

This PR adds two new sort options:

  • Least downloaded
  • Least recently updated

Disclaimer: AI generated translations (GPT 5.2 used)

Copilot AI review requested due to automatic review settings January 31, 2026 23:37
@vercel
Copy link

vercel bot commented Jan 31, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
npmx.dev Ready Ready Preview, Comment Feb 1, 2026 0:26am
2 Skipped Deployments
Project Deployment Actions Updated (UTC)
docs.npmx.dev Ignored Ignored Preview Feb 1, 2026 0:26am
npmx-lunaria Ignored Ignored Feb 1, 2026 0:26am

Request Review

Comment on lines +49 to +54
const normalizedSort: SortOption =
rawSort === 'downloads'
? 'downloads-desc'
: rawSort === 'updated'
? 'updated-desc'
: (rawSort ?? 'downloads-desc')
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Backwards compatibility

@vercel vercel bot temporarily deployed to Preview – docs.npmx.dev January 31, 2026 23:38 Inactive
@github-actions
Copy link

github-actions bot commented Jan 31, 2026

Lunaria Status Overview

🌕 This pull request will trigger status changes.

Learn more

By default, every PR changing files present in the Lunaria configuration's files property will be considered and trigger status changes accordingly.

You can change this by adding one of the keywords present in the ignoreKeywords property in your Lunaria configuration file in the PR's title (ignoring all files) or by including a tracker directive in the merged commit's description.

Tracked Files

File Note
lunaria/files/ar-EG.json Localization changed, will be marked as complete. 🔄️
lunaria/files/de-DE.json Localization changed, will be marked as complete. 🔄️
lunaria/files/en-US.json Source changed, localizations will be marked as outdated.
lunaria/files/es-419.json Localization changed, will be marked as complete. 🔄️
lunaria/files/es-ES.json Localization changed, will be marked as complete. 🔄️
lunaria/files/fr-FR.json Localization changed, will be marked as complete. 🔄️
lunaria/files/hu-HU.json Localization changed, will be marked as complete. 🔄️
lunaria/files/id-ID.json Localization changed, will be marked as complete. 🔄️
lunaria/files/it-IT.json Localization changed, will be marked as complete. 🔄️
lunaria/files/ja-JP.json Localization changed, will be marked as complete. 🔄️
lunaria/files/ne-NP.json Localization changed, will be marked as complete. 🔄️
lunaria/files/pl-PL.json Localization changed, will be marked as complete. 🔄️
lunaria/files/pt-BR.json Localization changed, will be marked as complete. 🔄️
lunaria/files/ru-RU.json Localization changed, will be marked as complete. 🔄️
lunaria/files/uk-UA.json Localization changed, will be marked as complete. 🔄️
lunaria/files/zh-CN.json Localization changed, will be marked as complete. 🔄️
Warnings reference
Icon Description
🔄️ The source for this localization has been updated since the creation of this pull request, make sure all changes in the source have been applied.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds two new sort options for package listings: "Least downloaded" and "Least recently updated". The changes rename existing sort options from simple names (downloads, updated) to more explicit directional names (downloads-desc, downloads-asc, updated-desc, updated-asc) and maintain backward compatibility by normalizing legacy URL parameters.

Changes:

  • Renamed sort option keys from downloads/updated to downloads-desc/updated-desc for clarity
  • Added new ascending sort options: downloads-asc and updated-asc
  • Updated translations across 29 locale files to reflect the new sort option naming scheme
  • Implemented backward compatibility for legacy URL parameters

Reviewed changes

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

File Description
app/pages/~[username]/index.vue Updated sort logic to use new naming scheme, added backward compatibility normalization, and implemented ascending sort handlers
app/components/PackageListControls.vue Updated SortOption type and sort options array to include new ascending options with updated translation keys
i18n/locales/*.json Updated translation keys for sort options from downloads/updated to downloads_desc/downloads_asc/updated_desc/updated_asc
lunaria/files/*.json Updated translation keys for sort options to match the new naming scheme (mirrors i18n/locales changes)

@serhalp
Copy link
Collaborator

serhalp commented Jan 31, 2026

@wojtekmaj I was just noticing earlier today that I didn't apply my package list results UX revamp to the /~:user page, only to /search results and /@:org. I wonder if a cleaner and more complete solution here would be to port the /@:org changes to the /~:user page? you'd get all these sorts, filters, table view, etc.

@wojtekmaj
Copy link
Contributor Author

@wojtekmaj I was just noticing earlier today that I didn't apply my package list results UX revamp to the /~:user page, only to /search results and /@:org. I wonder if a cleaner and more complete solution here would be to port the /@:org changes to the /~:user page? you'd get all these sorts, filters, table view, etc.

That sounds even better to me! Feel free to scrap this PR.

wojtekmaj and others added 3 commits February 1, 2026 01:05
This PR adds two new sort options:
- Least downloaded
- Least recently updated

Disclaimer: AI generated translations (GPT 5.2 used)
Co-authored-by: Max Duval <hi@mxdvl.com>
@danielroe
Copy link
Member

btw, I think we should avoid using AI-generated translations - we have the infrastructure set up for people to do the translation, but they won't get pinged to improve it if we auto-gen translations

(we could look at a stopgap-mechanism if we had a way to flag: 'this key is translated but needs human review', but maybe do that in another PR)

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.

4 participants