shadcn.io is not affiliated with official shadcn/ui
Status Workflow Comments Block for Svelte
A ticket moves through Open, Triaged, In progress, Resolved and Closed using only the moves a rules table allows, with a note required to resolve and a timed history of every move.
Installation
Overview
Keep a ticket's life honest, with this status workflow comment block for Svelte with Ark UI. A compact header names the pipeline. The frame opens with the ticket (its id, a Badge with its state and the words), then a pipeline of five states marked Done, Current or Later with the current one carrying aria-current. Under it the four other states are buttons: the main forward move is the one primary Shine Button (Move to In progress), and a move the rules table does not allow stays in place as an aria-disabled outline Button that explains why when you press it or focus it. Resolving needs a one-line note in an Input, and a Closed ticket can be reopened. Every move is written into a history in a held scroll region with a fixed time, and a polite status line names it. It is built from Shine Button, Button, Input, Field, Badge and Guides, with CSS only. For bug trackers, support tickets and any record with a lifecycle.
FAQ
How do I change the states and the rules?
Edit STATES for the pipeline and RULES, a list that says which states each one may move to; the first target is the main move and gets the primary button. The labels (Move to, Back to, Reopen), the refusals and the pipeline marks are all worked out from those two lists.
How does the note requirement work?
Moving to Resolved checks for a note. With an empty one the move is refused, the problem appears under the field and focus goes to it. The note is written into the history entry and cleared once the move succeeds. Add more guards in move the same way, for example requiring an assignee before In progress.
Why are refused moves buttons and not hidden?
So the layout never shifts and the reason is discoverable. They use aria-disabled rather than disabled, which keeps them focusable; each carries a description with the reason, and pressing one shows it in the problem line and the status.
What stays local?
The state and the history live in the page and the times are a fixed step after a typed moment. To make it real, send the move from move, validate the transition on the server against the same rules table, return the stored history entry with its real time, and keep the client table only as a hint.
Is it accessible?
The pipeline is an ordered list with the current state marked by aria-current and a word, state is never shown by colour alone, and the note field has a visible label with its problem tied by aria-describedby. Moves are announced in the polite status line and focus returns to the main button after each one.