Feature boards
Ideas with votes, statuses and comments on your own site with mode="board": who may post, what readers see and the board's events.
A feature board is a list of ideas from your users: they post an idea, vote for the ones they want, follow an idea to hear when it ships, and comment. You set each idea's status (open, planned, in progress, shipped or declined) with a note, and reply as the makers. The same board runs on your own site with the element and on its own page on OneStar.
Install#
Create a board under Feedback in OneStar, publish it and add your site to its allowed sites, as for a form. Then put the element where the board should show, with mode="board":
<script src="https://embed.onestar.sh/v1/loader.js" async></script>
<onestar-feedback form="f_hemsz66yupbd76d2" mode="board" user-token="TOKEN_FROM_YOUR_SERVER"></onestar-feedback>The loader fetches the board's own script, about 12 KB gzipped, only when the element comes near the viewport. A page that shows forms and no board never loads it. The board takes your form's theme tokens, so Theming applies as it is.
Who may post and vote#
Each board says who may post and who may vote, in its Settings in OneStar:
- Your signed in users. Sign a short lived token on your server and set it with
user-tokenoronestar.identify(token), exactly as for a form (Signed in users). This is how people post and vote from your site. - OneStar accounts, on the board's page at onestar.sh only.
- People without an account, on the board's page at onestar.sh only, after a quick check that they are a person. Your site cannot run that check, so on your site a board that wants it shows its sign in line instead.
A reader the board does not take sees the board's sign in line in place of the post form, and votes say the same. Everyone can read the ideas.
What readers see#
- Ideas pinned first, then by votes or newest, with a status filter when the board shows statuses.
- Each idea with its comments, the history of its status with your notes, and its votes split by how people voted: with a OneStar account, signed in to your product, or without an account. Votes are counted raw, one per person.
- A post form that lists similar ideas while the title is typed, so a reader can vote instead of posting a duplicate.
- Your replies with a Maker badge, and "Run by the makers of" your product when you connected its store account or added it as your own.
- How many posts were removed and why ("3 removed as spam, 1 as personal data"), how many you held back, merged or are still being checked. You can remove a post only for a listed reason, and the count stays on the board.
A new post on a board others read waits for a check before it shows, and the reader is told "Thanks. It shows once it has been checked." A board only you read (a suggestion box) takes posts at once and shows none of them to readers.
Events#
The element fires two board events beside the ones every form fires (Events and errors):
| Event | Fires when | detail |
|---|---|---|
onestar:posted | An idea or comment was posted. state is held while it waits to be checked, else live. | { form, id, state } |
onestar:voted | A vote was cast or taken back. votes is the idea's count now. | { form, id, voted, votes } |
const board = document.querySelector('onestar-feedback[mode="board"]');
board.addEventListener("onestar:posted", (e) => {
if (e.detail.state === "held") console.log("Waiting for the check", e.detail.id);
});
board.addEventListener("onestar:voted", (e) => console.log(e.detail.id, e.detail.votes));id is the post's public id, the one in the board page's address. onestar:error with identity_required fires when a reader tries to post or vote and the board does not take them, and with origin_refused when your site is not in the board's allowed sites.
Limits#
Titles run 3 to 120 characters and details up to 5,000. Posts, votes and reports are limited per address, per person and per board, so a burst from one place is refused with a short message. Ideas and comments count toward your monthly answers; votes, follows and reports do not.