-
-
Notifications
You must be signed in to change notification settings - Fork 256
Smart collections #2136
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
Smart collections #2136
Conversation
Running Code Quality on PRs by uploading data to Trunk will soon be removed. You can still run checks on your PRs using trunk-action - see the migration guide for more information. |
☂️ Python Coverage
Overall Coverage
New FilesNo new covered files... Modified Files
|
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 introduces smart collections functionality - a new type of collection that dynamically filters games based on saved filter criteria rather than manually curated ROM lists. Smart collections complement the existing regular and virtual collections by allowing users to create collections that automatically update as games are added or metadata changes.
- Adds smart collections with dynamic ROM filtering based on saved criteria
- Refactors collection components to support multiple collection types using a unified architecture
- Updates the UI to display smart collections alongside regular and virtual collections with proper routing
Reviewed Changes
Copilot reviewed 68 out of 73 changed files in this pull request and generated 9 comments.
Show a summary per file
File | Description |
---|---|
backend/models/collection.py |
Adds SmartCollection model with filter criteria and dynamic ROM fetching |
backend/endpoints/collections.py |
Implements CRUD operations for smart collections |
backend/handler/database/collections_handler.py |
Adds database operations for smart collections |
frontend/src/stores/collections.ts |
Updates collections store to handle smart collections |
frontend/src/views/Gallery/Collection/ |
Creates unified collection view architecture with BaseCollection component |
frontend/src/components/common/Collection/ |
Updates collection components to support multiple collection types |
frontend/src/locales/ |
Adds translations for smart collection UI elements |
Files not reviewed (4)
- frontend/src/generated/index.ts: Language not supported
- frontend/src/generated/models/CollectionSchema.ts: Language not supported
- frontend/src/generated/models/SmartCollectionSchema.ts: Language not supported
- frontend/src/generated/models/VirtualCollectionSchema.ts: Language not supported
Description
Explain the changes or enhancements you are proposing with this pull request.
This PR introduces
SmartCollections
, a new type of collection who's roms are populated by a preset collection of filters. Users create smart collections from the search page, filtering down their games until they a set of filters they want, which are stored on the model as JSON.For performance reasons, member roms are calculated at access time, meaning the actual list of roms (and rom count) are only updated whenever the collection content is accessed. While this isn't optimal, it allows us to create many collections without pre-computing membership and slowing down db calls.
Checklist
Please check all that apply.
Screenshots