Repository navigation
fix(folksonomy): show use counts in property suggestions - #646
Conversation
Add an optional count to autocomplete suggestions and render it in parentheses after the label, so the key selected and matched is still the bare property name. The folksonomy editor passes the count it already receives from /keys. Fixes openfoodfacts#243
|
@rishiraj38 is attempting to deploy a commit to the openfoodfacts Team on Vercel. A member of the Team first needs to authorize it. |
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (4)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughAutocomplete suggestions now support optional usage counts. Folksonomy key suggestions pass their counts to the autocomplete component, which displays defined counts in parentheses. A new test checks suggestions with counts, including zero, and suggestions without counts. ChangesSuggestion count display
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~8 minutes Change: Bug fix · Severity of issue fixed: Low Suggested reviewers: Merge Risk: ⚪ Minimal · up to Property suggestions can show usage counts without changing the selected property key. No material merge-blocking risk is evident. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
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. A rabbit sees counts by each name, Comment |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
LGTM! @teolemon merge if it is also ok with you |
|
Thanks for the review. |
|
yes, it looks good to me, thank you @rishiraj38 👍 |
What
is_original (1), which helps pick between similar keys.AutocompleteSuggestiongets an optionalcountfield thatautocomplete-inputrenders in parentheses after the label. The count is not part oflabel, so filtering, exact matching and the selected value still use the bare key.countit already receives from/keys.autocomplete-inputrendering the count.This follows the review on #449 (count as a field on the suggestion object, no separate map, not baked into the label) and keeps the scope to the suggestions from the issue.
Screenshot
Before / after, typing
originin the new property field:Fixes bug(s)
Summary by CodeRabbit