Skip to content

Commit 68c1914

Browse files
authored
Merge pull request #197 from jahn96/documentation
Update features section in documentation
2 parents 6d7f7a1 + 70ec498 commit 68c1914

File tree

9 files changed

+54
-21
lines changed

9 files changed

+54
-21
lines changed
163 KB
Loading

Design/Code Snippet Menu.png

107 KB
Loading

Design/code_snippet_menu.png

-23.7 KB
Binary file not shown.

Design/copy_snippet.png

10.5 KB
Loading

Design/delete snippet.png

25.7 KB
Loading

Design/download_snippets.png

11 KB
Loading

Design/download_snippets_box.png

28.9 KB
Loading

docs/user/features.rst

Lines changed: 53 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,73 @@
11
Features
22
========
33

4+
Code Snippet Explorer
5+
---------------------
6+
7+
On the left side bar of the JupyterLab, you can click the snippet icon (</>) to open/close the code snippet explorer that contains all the saved snippets as below.
8+
You can scroll/resize code snippet explorer, order the snippets with drag and drop, and manage and search the snippets efficiently.
9+
.. image:: ../../Design/Code Snippet Extension Panel.png
10+
:align: center
11+
412
Creation of a New Snippet
513
-------------------------
614

15+
There are several ways to create a new snippet.
16+
1. Highlight lines of code and right click (or use keyboard shortcut (cmd-shift-A or ctrl-shift-A)) to save the code as a snippet. Or, you can select cell(s) and right click (or use keyboard shortcut (cmd-shift-A or ctrl-shift-A)) to save content as a snippet. Then, you will see the "Save As Code Snippet" option in JupyterLab context menu as below:
717
.. image:: ../../Design/right_click.png
18+
:align: center
19+
Then, clicking the option will open the dialog as below where you can input name, description, language, tags, and codes of a snippet.
820
.. image:: ../../Design/code_snippet_input_dialog.png
9-
10-
- Right click (or use keyboard shortcut (cmd-shift-A or ctrl-shift-A)) and save highlighted lines of code
11-
- Drag cell into panel to save
12-
- Select cell(s) and right click to save content as snippet
13-
- Select cell(s) and use keyboard shortcut (cmd-shift-A or ctrl-shift-A) to save content as snippet
14-
21+
:align:center
22+
2. More easily, just drag notebook cell(s) to the code snippet explorer on the left to create a new snippet. It will also open the dialog as above for your inputs.
1523
.. image:: ../../Design/create_from_scratch.png
16-
- Plus button to create a new snippet from scratch
24+
:align:center
25+
26+
3. Hit the plus button next to the search bar (refer to `Search of Code Snippets`_) to create a new snippet if you want to create a snippet not from the notebook cell.
1727

1828
Use of Code Snippets
1929
--------------------
2030

21-
.. image:: ../../Design/code_snippet_menu.png
22-
- Copy, Insert, Edit, Download, Delete snippet
23-
- Drag snippet into any JupyterLab workspace
31+
Click the three dots or right click anywhere on the snippet you want to use. It will open code snippet menu as below to insert, copy, edit, download, or delete the snippet.
32+
.. image:: ../../Design/Code Snippet Menu.png
33+
:align:center
34+
35+
Insert
36+
^^^^^^
37+
Click the insert option to insert. It will warn you if the language is different from the kernel langauge.
38+
Additionally, on hover with six dots on the left (refer to `Search of Code Snippets`_), drag snippet into any JupyterLab workspace to insert the snippet!
39+
40+
Copy
41+
^^^^
42+
Click the copy option to copy. It will create a message on the bottom right corner as below.
43+
.. image:: ../../Design/copy_snippet.png
44+
:align:center
45+
46+
Edit
47+
^^^^
48+
Edit the saved snippets by clicking the edit option. It will open a code snippet editor as below.
49+
.. image:: ../../Design/code_snippet_edit.png
50+
:align:center
51+
52+
Download
53+
^^^^^^^^
54+
Download snippets and share them with others by clicking the download option. It will open a box as below to input **relative path** to download the snippets.
55+
.. image:: ../../Design/download_snippets_box.png
56+
:align:center
57+
58+
Delete
59+
^^^^^^
60+
Delete snippets by clicking delete option. It will open a warning box as below.
61+
.. image:: ../../Design/delete snippet.png
62+
:align:center
2463

2564
Search of Code Snippets
2665
-----------------------
2766

67+
With the filter box as below, **search** snippets with name, language, and code with search bar or **filter** them with language/filter tags!
2868
.. image:: ../../Design/code_snippet_filter_box.png
29-
- Scrollable/resizable snippet explorer panel displaying snippets
30-
- Move snippet within snippet explorer
31-
- Search bar for snippets
32-
- Filter tags for snippets
69+
:align:center
3370

71+
Furthermore, hover over snippets to see the preview of each snippet.
3472
.. image:: ../../Design/code_snippet_preview.png
35-
- Snippet preview (on the side)
36-
37-
Edit of Existing Code Snippets
38-
------------------------------
39-
40-
.. image:: ../../Design/code_snippet_edit.png
41-
- Code Snippet Editor
73+
:align:center

docs/user/transition.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,7 @@ Search and Tag Update
151151

152152
**NOTE 1**: Snippet tags function on an OR basis, as in when the "data analytics" tag and the "import statements" tag are selected together,
153153
the panel displays any tags that are tagged as import statements OR tagged as "data analytics."
154+
154155
ex) Snippet tags selected together:
155156

156157
.. image:: ../../Design/smallSnippetTagsSelected.png

0 commit comments

Comments
 (0)