Beispiele
Support-Konsole
Eine Support-Ticket-Oberfläche: Status und zuständige Person oben, der Verlauf in der Mitte und darunter ein Antwortfeld mit gespeicherten Antworten.
Vorschau
SUP-2481
PendingOlivia Martin, opened June 18, 2027. First reply due in four hours.
Checkout fails with a 402 since we rotated our card. The saved card still shows the old expiry.
Thanks, looking at the payment logs now. Which last four digits should the new card show?
<bs:bsui-stack direction="column" gap="4" align="stretch">
<bs:bsui-stack direction="row" gap="3" align="center" justify="space-between">
<bs:bsui-stack direction="column" gap="1">
<bs:bsui-stack direction="row" gap="2" align="center">
<bs:bsui-text content="SUP-2481" variant="title" tag="h3" />
<bs:bsui-badge label="Pending" variant="warning" />
</bs:bsui-stack>
<bs:bsui-text content="Olivia Martin, opened June 18, 2027. First reply due in four hours." variant="muted" />
</bs:bsui-stack>
<bs:bsui-select name="ticket_assignee" defaultValue="sofia" placeholder="Assignee">
<bs:bsui-select-trigger />
<bs:bsui-select-popup>
<bs:bsui-select-option value="sofia" label="Sofia Davis" />
<bs:bsui-select-option value="jackson" label="Jackson Lee" />
<bs:bsui-select-option value="none" label="Unassigned" />
</bs:bsui-select-popup>
</bs:bsui-select>
</bs:bsui-stack>
<bs:bsui-card>
<bs:bsui-card-content>
<bs:bsui-stack direction="column" gap="3" align="stretch">
<bs:bsui-stack direction="column" gap="1" align="stretch">
<bs:bsui-text content="Olivia Martin" variant="label" tag="span" />
<bs:bsui-text content="June 18, 09:41" variant="caption" tag="span" />
<bs:bsui-text content="Checkout fails with a 402 since we rotated our card. The saved card still shows the old expiry." variant="body" tag="p" />
</bs:bsui-stack>
<bs:bsui-separator />
<bs:bsui-stack direction="column" gap="1" align="stretch">
<bs:bsui-text content="Sofia Davis" variant="label" tag="span" />
<bs:bsui-text content="June 18, 10:02" variant="caption" tag="span" />
<bs:bsui-text content="Thanks, looking at the payment logs now. Which last four digits should the new card show?" variant="body" tag="p" />
</bs:bsui-stack>
</bs:bsui-stack>
</bs:bsui-card-content>
</bs:bsui-card>
<bs:bsui-card>
<bs:bsui-card-content>
<bs:bsui-stack direction="column" gap="3" align="stretch">
<bs:bsui-textarea name="reply" rows="3" placeholder="Write a reply..." />
<bs:bsui-stack direction="row" gap="3" align="center" justify="space-between">
<bs:bsui-select name="saved_reply" placeholder="Insert a saved reply">
<bs:bsui-select-trigger />
<bs:bsui-select-popup>
<bs:bsui-select-option value="refund" label="Refund policy" />
<bs:bsui-select-option value="reset" label="Password reset steps" />
<bs:bsui-select-option value="escalate" label="Escalate to billing" />
</bs:bsui-select-popup>
</bs:bsui-select>
<bs:bsui-stack direction="row" gap="2" align="center">
<bs:bsui-button label="Add internal note" variant="outline" />
<bs:bsui-button label="Send reply" variant="default" />
</bs:bsui-stack>
</bs:bsui-stack>
</bs:bsui-stack>
</bs:bsui-card-content>
</bs:bsui-card>
</bs:bsui-stack>Funktionsweise
Die Auswahl der zuständigen Person und das Statusabzeichen lesen aus einem gemeinsamen Ticket-Store. Bei Auswahl einer gespeicherten Antwort fügt eine context-Aktion deren Vorlage in das Textfeld ein. „Senden“ hängt die Antwort an den Verlauf an und aktualisiert den Ticketstatus im State. Die Notizaktion speichert die Notiz, ohne den Kunden zu benachrichtigen.
Jedes Verhalten auf dieser Seite wird von der WordPress Interactivity API gesteuert: Jede Komponente registriert ihren eigenen Store, initialisiert ihren Zustand in einem serverseitig gerenderten Kontext und verknüpft Ereignisse über Direktiven im obigen Markup. Es gibt keine seitenspezifische JavaScript.