v1.31.0 — Votes and feedback messages with no sign-in

1.31.0Новая функцияDenis Povarov

A click on the ▲ box of a feedback post casts a vote with no account, and a second click withdraws it. This works on your hosted portal's feedback board and roadmap, and on your own site. On the portal, the same click used to open the sign-in page.

A portal vote cast under an account before this release shows as not voted, and a click on it adds a second vote.

Votes on your own site

FeedbackVoteButton from @kookee/react/feedback/client goes into the renderVotes prop of the feedback and roadmap components. It needs @kookee/react and @kookee/sdk 1.23.0. Without React, kookee.feedback.vote() or POST /v1/feedback/:id/vote casts the vote.

A browser has one vote per post on each site, under a random id it keeps in localStorage. A site with its own accounts passes an opaque visitorId, so votes follow a person across devices. Votes don't count against the monthly API quota.

Nothing verifies the id, so someone who clears their browser storage can vote again. The API takes 30 new votes an hour from one address on one post, and 100,000 visitor votes per project.

A message form on your own page

FeedbackForm is the form from the widget's Feedback tab, for a page or a dialog of your own. It takes a category, a message and an optional email, with no account. The message waits on the Feedback page under From the widget, and reaches the board only if a team member adds it.

Posting to the board and commenting still happen on the portal, signed in.

Vote buttons in the starters' roadmaps

The roadmaps in the Next.js, Vite React, TanStack Start and Astro starters have the vote button.

Подробнее