Rule editor
Components: Page, PageHeader, PageToolbar, PageContent, Table, SearchInput, Drawer, Stepper
+17 more
Field, Input, Select, Checkbox, CheckboxGroup, HttpMethod, CodeEditorRoot, CodeEditorContent, CodeSnippetRoot, InlineCodeSnippet, RadioGroup, Radio, Attribute, Badge, Alert, Button, Toaster
A custom rules page whose "Create rule" button opens a create drawer: four steps take the user from where the rule applies to what it does, with a review before anything is saved.
What it shows
- A Resource list page behind the drawer, with
HttpMethod,InlineCodeSnippetandBadgecells. - A four-step
Stepperdrawer from Create and edit forms. - Scope:
Input, aSelectfor the host and aCheckboxGroupof methods. - Condition: a
CodeEditorwith YAML highlighting, shown again as a read-onlyCodeSnippeton review. - Action:
RadioGroup variant='card'for block or monitor. - Review:
Attributerows and a section as in the Detail drawer. - Errors after a submit attempt and a toast after create, from Feedback toasts.
Examples
The rules list. Press "Create rule" to open the drawer and walk Scope, Condition, Action and Review; press "Create rule" on Review with gaps to see the drawer jump back to the first invalid step.
The custom rules list. "Create rule" opens a four-step Stepper drawer: Scope (a host
Select, a path and a CheckboxGroup of methods), Condition (a YAML CodeEditor), Action
(RadioGroup variant='card') and Review (Attribute rows and a read-only CodeSnippet).
Steps never block; "Create rule" on Review jumps back to the first invalid step, or closes the
drawer, adds the row and shows a toast.
The rules request still in flight: skeleton rows, with "Create rule" still available.
The rules request is still in flight: the table shows skeleton rows while "Create rule" stays available.
Related
- Create and edit forms
- Resource list page
- Detail drawer
- Confirmation dialogs: guard a dirty drawer on close.
- Feedback toasts