Skip to content

Commit 43a5a1b

Browse files
committed
Init docs for snap-components
1 parent de38821 commit 43a5a1b

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
Snap components enable adding custom UI components defined by snap-kit to the DevRev UI.
2+
These components can be used to display data or interact with the user.
3+
Snap components are defined in the snap-in manifest file. DevRev UI renders these components based on the defined configuration.
4+
5+
Each snap-component has the following properties:
6+
- `surface` : the surfaces where the snap component can be displayed. Currently, only `issue` is supported. // TODO: Confirm this.
7+
- `snap_kit_action_name` : the name of the snap kit action that will be triggered when the action defined in the snap-kit of the snap component is interacted with.
8+
- `snap_kit_body` : the initial body of the snap kit action that will be rendered when the snap component is loaded.
9+
- `initializer` : references a snap-kit action that can be called to initialize the snap component. This is useful when the snap component needs to be initialized with data from the server based on the context where it is being initialized.
10+
11+
12+
```
13+
snap_kit_actions:
14+
- name: show_test_cases
15+
function: show_test_cases_or_runs
16+
17+
snap_components:
18+
- name: show_test_cases
19+
display_name: Test Case Details
20+
description: Test Case Details
21+
surface: issue
22+
snap_kit_action_name: show_test_cases
23+
snap_kit_body:
24+
{
25+
"snaps":[]
26+
}
27+
28+
```

0 commit comments

Comments
 (0)