-
-
Notifications
You must be signed in to change notification settings - Fork 140
feat: add "Least downloaded" and "Least recently updated" sort options #581
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
2 Skipped Deployments
|
| const normalizedSort: SortOption = | ||
| rawSort === 'downloads' | ||
| ? 'downloads-desc' | ||
| : rawSort === 'updated' | ||
| ? 'updated-desc' | ||
| : (rawSort ?? 'downloads-desc') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Backwards compatibility
Lunaria Status Overview🌕 This pull request will trigger status changes. Learn moreBy default, every PR changing files present in the Lunaria configuration's You can change this by adding one of the keywords present in the Tracked Files
Warnings reference
|
There was a problem hiding this 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/updatedtodownloads-desc/updated-descfor clarity - Added new ascending sort options:
downloads-ascandupdated-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) |
|
@wojtekmaj I was just noticing earlier today that I didn't apply my package list results UX revamp to the |
That sounds even better to me! Feel free to scrap this PR. |
This PR adds two new sort options: - Least downloaded - Least recently updated Disclaimer: AI generated translations (GPT 5.2 used)
3d90272 to
f61c699
Compare
Co-authored-by: Max Duval <hi@mxdvl.com>
|
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) |
This PR adds two new sort options:
Disclaimer: AI generated translations (GPT 5.2 used)