shadcn.io is not affiliated with official shadcn/ui
Merchant Dashboard Reviews Block for Solid
What is waiting for a reply at a ceramics studio: three worked-out cells (awaiting, replied this month, average rating) beside the queue of reviews that need an answer, each with an inline reply field and Send.
Installation
Overview
A reply queue for Solid with Ark UI, for Cloisterwell, a fictional ceramics studio. A compact header says replies are public, so they should be polite and specific, and that a one-star review deserves an answer as much as a five-star one. Behind a divider, three cells share hairlines at the start: reviews awaiting a reply, replies this month and the average rating of all twelve reviews, with the counts rolling in SlidingNumber. At the end is the queue of the four reviews still waiting, oldest first, each with the reviewer, the stars, the text and an inline reply field with a Send button. Sending takes the review out of the queue, lowers "awaiting", raises "replied" and moves focus to the next reply field, with a polite line saying so. Every figure is worked out from the typed reviews. It's built from Input, Button, Avatar, Rating and Sliding Number. On a phone the three cells sit in a row above the queue.
FAQ
Where do the three numbers come from?
From AWAITING (the reviews still to answer) and ANSWERED (the star ratings of the eight already answered this month). "Awaiting" is the queue's length now; "Replied this month" is eight plus the replies you send; the average is every rating of all twelve reviews, to one decimal by whole-number maths, and doesn't change when you reply. Change the arrays and every figure follows.
Does Send send anything?
No. It removes the review from the queue on this page and the line says "Nothing is published in this demo"; a reload starts afresh. Send stays off until the field has text, and pressing Enter in the field sends too. To make it real, post the review's id and the text from the send handler.
Where does focus go after a reply?
To the next review's reply field, or, when the queue is empty, to the polite status line. The row you replied to is gone, so focus would otherwise fall back to the page. The empty state reads "Every review has a reply".
Why the reminder that replies are public?
A reply sits under the review for everyone to read, so the header asks for polite and specific ones and says low ratings deserve the same answer as high ones. The queue is oldest first, not worst first, so a critical review is not left to the bottom.