Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added snap-in-surface docs #39

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions fern/docs/pages/references/snap-in-surfaces.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
This section explores how to create a custom user interface using snap-kit and DevRev.

## Defining the surfaces with the API
JanDebelak1 marked this conversation as resolved.
Show resolved Hide resolved

TODO
API definition and explanation how to add an snap-in to a given surface.
Explanation of how to enable handling of snapkit-action.execute to return diffrent snapkits depending on the context from where the call has been made (issue id for example)

## Accessing created snap-in surfaces

After installing and enabling a snap-in on issues, it can be accessed through a button that appears on issue details. Note that the button only appears if there's at least one snap-in defined as accessible from issues.

![snap-in-surface-button](https://github.com/starlightknown/blender-portfolio/assets/74637789/78a6d46a-13bd-4310-964e-00492e4ef86d)

Clicking on the snap-in button shows a list of all possible snap-in after which clicking on one of the options opens an modal

### Display modal

By default the snapkit defined in the main snap-in is shown, but in the case `snapkit-action.execute` support for showing diffrent snapkits depending on the context was added a call is made and the custom snapkit is shown instead.

![snap-in-surface-modal](https://github.com/starlightknown/blender-portfolio/assets/74637789/65274552-6317-4af9-b04b-c03a651eb412)


2 changes: 2 additions & 0 deletions fern/versions/public.yml
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,8 @@ navigation:
path: ../docs/pages/references/hooks.mdx
- page: Snapkit
path: ../docs/pages/references/snapkit.mdx
- page: Snap-in surfaces
path: ../docs/pages/references/snap-in-surfaces.mdx
- page: Snap-in resources
slug: snap-in-resources
path: ../docs/pages/references/snap-in-resources.mdx
Expand Down
Loading