feat(collections): sorting, empty state, and cached annotation scores on browse page#797
Open
vcnainala wants to merge 3 commits into
Open
feat(collections): sorting, empty state, and cached annotation scores on browse page#797vcnainala wants to merge 3 commits into
vcnainala wants to merge 3 commits into
Conversation
Introduce scopePublished on Collection and a published() factory state so public browse logic and tests can reuse a single visibility rule.
Add CollectionAnnotationScores helper with flexible cache and invalidate it when coconut:cache refreshes collection widget counts.
…browse Extend the public collections page with multi-field sort (asc/desc toggle), default release-date ordering, search empty state with clear action, and feature tests for published filtering and sort behaviour.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## development #797 +/- ##
================================================
+ Coverage 6.14% 7.21% +1.06%
- Complexity 1736 1752 +16
================================================
Files 227 228 +1
Lines 8945 9012 +67
================================================
+ Hits 550 650 +100
+ Misses 8395 8362 -33 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
scopePublishedonCollectionand apublished()factory state for consistent public visibility rules.CollectionAnnotationScoresto cache per-collection averageannotation_levelfor sort performance; cache is cleared whencoconut:cacheruns./collectionsbrowse UX:sortBy+dirURL params; default: release date, newest first)Test plan
php artisan test --filter=CollectionListTest(7 tests)/collectionsand verify default sort (release date, descending)php artisan coconut:cachein staging/productionResolves
Closes #578