Skip to content

Commit f2876d8

Browse files
altafDevRevbc-devrevAtul-Butola
authored
chore: add Snap Components page (#111)
* chore: add Snap Components page * Update snap-components.mdx (#112) * Update snap-components.mdx * removed comments * Apply suggestions from code review Co-authored-by: Atul-Butola <137884145+Atul-Butola@users.noreply.github.com> --------- Co-authored-by: Ben Colborn <117322957+bc-devrev@users.noreply.github.com> Co-authored-by: Atul-Butola <137884145+Atul-Butola@users.noreply.github.com>
1 parent abc8a2c commit f2876d8

File tree

2 files changed

+7
-12
lines changed

2 files changed

+7
-12
lines changed

fern/docs/pages/references/snap-components.mdx

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,13 @@
1-
# Snap Components
2-
31
Snap components enable adding custom UI components defined by snap-kit to the DevRev UI.
42
These components can be used to display data or interact with the user.
53
Snap components are defined in the snap-in manifest file. DevRev UI renders these components based on the defined configuration.
64

75
Each snap-component has the following properties:
86

9-
- `surface` : the surfaces where the snap component can be displayed. Currently, only `issue` is supported. // TODO: Confirm this.
10-
- `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.
11-
<!-- - `snap_kit_body` : the initial body of the snap kit action that will be rendered when the snap component is loaded. -->
12-
13-
<!-- - `initializer` : references a function 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. -->
7+
- `surface` : The surface where the snap component can be displayed.
8+
- `snap_kit_action_name` : The name of the action within the snap kit that is triggered when the snap component's defined action is engaged.
9+
- `snap_kit_body` : The initial body content of the snap kit action that is rendered upon loading the snap component.
10+
- `initializer` : Refers to a function that can be invoked to set up the snap component. This is particularly useful when the component needs to be initialized with server data, depending on the context in which it is being deployed.
1411

1512
```yaml
1613
functions:
@@ -27,7 +24,7 @@ snap_components:
2724
description: Test Case Details
2825
surface: issue
2926
snap_kit_action_name: show_test_cases
30-
<!-- initializer: upgrade_test_function_1 -->
27+
initializer: upgrade_test_function_1
3128
snap_kit_body:
3229
{
3330
"snaps":[]
@@ -104,10 +101,6 @@ interface Event {
104101
}
105102
```
106103

107-
## Screenshots
108-
109-
<!-- ## Example for initializer -->
110-
111104
## List of surfaces
112105

113106
| Surface | Description |

fern/versions/public.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,8 @@ navigation:
197197
path: ../docs/pages/references/hooks.mdx
198198
- page: Snapkit
199199
path: ../docs/pages/references/snapkit.mdx
200+
- page: Snap Components
201+
path: ../docs/pages/references/snap-components.mdx
200202
- page: Snap-in resources
201203
slug: snap-in-resources
202204
path: ../docs/pages/references/snap-in-resources.mdx

0 commit comments

Comments
 (0)