feat(kb): one-vote rating UI (reflect + toggle the user's vote) #77
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/kb-rating-toggle-client"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Client half of the per-user rating change (server: PR #120). Makes the article thumbs reflect and toggle the signed-in user vote instead of blindly incrementing.
my_vote: Option<String>to the clientKbArticleFeedbackmodel.GET /kb/articles/{id}/vote(counts + the caller my_vote), via an unconditional use_resource (rules-of-hooks safe), into sharedrating+my_votesignals so both OverflowActions-rendered copies stay in sync.Depends on server PR #120 (toggle endpoints + GET /vote + my_vote). Needs a gate run.
Match the new per-user vote API: seed the thumbs state from GET /kb/articles/{id}/vote on load, highlight the user current vote, and update counts + my_vote from the toggle response on click. The active thumb is styled (green up / red down); clicking the active one clears it, the other switches. Shares one counts + my_vote signal across the two OverflowActions-rendered copies. Adds my_vote to the client feedback model. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>