feat(ui): show sort badge when user explicitly sets sort option#37
Conversation
Display the sort-filter badge whenever the user explicitly sets a sort option, even if it's the default (name, ascending). Previously, the badge was hidden for the default sort, which was confusing. - Add sortExplicitlySetAtom to track user interaction - Show badge only after user explicitly sets sort option - Hide badge when user removes sort - Reset flag on state reset
WalkthroughA new boolean atom Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (2)
🧰 Additional context used📓 Path-based instructions (2)**/*.{ts,tsx,js,jsx}📄 CodeRabbit inference engine (.cursorrules)
Files:
**/*.{ts,tsx}📄 CodeRabbit inference engine (.cursorrules)
Files:
🧬 Code graph analysis (1)src/components/ImageGridSortFilter.tsx (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
🔇 Additional comments (3)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## dev #37 +/- ##
=======================================
Coverage 94.31% 94.31%
=======================================
Files 19 19
Lines 3043 3045 +2
Branches 441 441
=======================================
+ Hits 2870 2872 +2
Misses 173 173
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Fixes #36
Display the sort-filter badge whenever the user explicitly sets a sort option, even if it's the default (name, ascending). Previously, the badge was hidden for the default sort, which was confusing for users.
Changes
sortExplicitlySetAtomto track when user explicitly sets a sort optionBehavior
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.