Skip to content

Commit 1024076

Browse files
docs: document palette search filters (#791)
1 parent 410a592 commit 1024076

7 files changed

Lines changed: 117 additions & 39 deletions

File tree

docs/website/.vitepress/config.mts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@ export default defineConfig({
121121
items: [
122122
{ text: 'Overview', link: '/documentation/' },
123123
{ text: 'Command Palette', link: '/documentation/command-palette' },
124+
{ text: 'Search', link: '/documentation/search' },
124125
{ text: 'Storage', link: '/documentation/storage' },
125126
{ text: 'Sync', link: '/documentation/sync' },
126127
{ text: 'Imports', link: '/documentation/imports' },
@@ -138,7 +139,6 @@ export default defineConfig({
138139
{ text: 'Library', link: '/documentation/code/library' },
139140
{ text: 'Folders', link: '/documentation/code/folders' },
140141
{ text: 'Tags', link: '/documentation/code/tags' },
141-
{ text: 'Search', link: '/documentation/code/search' },
142142
],
143143
},
144144
{
@@ -156,7 +156,6 @@ export default defineConfig({
156156
{ text: 'Mermaid', link: '/documentation/notes/mermaid' },
157157
{ text: 'Mindmap', link: '/documentation/notes/mindmap' },
158158
{ text: 'Presentation', link: '/documentation/notes/presentation' },
159-
{ text: 'Search', link: '/documentation/notes/search' },
160159
],
161160
},
162161
{

docs/website/documentation/code/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ Folders can have a default language, so new snippets inside that folder start wi
5858

5959
### Search
6060

61-
[Search](/documentation/code/search) finds snippets by title or content across your library when you remember part of the code but not where you saved it.
61+
[Search](/documentation/search) finds snippets by title or content and narrows the current folder, tag, or library view when one is selected.
6262

6363
## Editor Tools
6464

docs/website/documentation/code/search.md

Lines changed: 0 additions & 12 deletions
This file was deleted.

docs/website/documentation/command-palette.md

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ The palette searches by title across searchable content:
2626

2727
Search results are ranked with your recent usage, so items you open often move higher over time.
2828

29+
Palette search also supports space scopes. In massCode 5.6 and later, it can also use tag and folder filters. See [Search](/documentation/search#search-from-the-command-palette) for the full search workflow.
30+
2931
## Run Commands
3032

3133
Commands create new content or open app-level actions without switching spaces first.
@@ -51,19 +53,6 @@ Use command mode when you want to run an action instead of opening existing cont
5153

5254
Press <kbd>Esc</kbd> to leave command mode and return to the full palette.
5355

54-
## Search In A Space
55-
56-
Use space mode when you want to search only one part of massCode.
57-
58-
1. Open the palette.
59-
2. Type `@`.
60-
3. Select a space, such as **Code**, **Notes**, or **HTTP**.
61-
4. Type your search query.
62-
63-
You can also type the scope directly, for example `@code auth` or `@notes release`.
64-
65-
Press <kbd>Esc</kbd> to leave the active scope and return to the full palette.
66-
6756
## Create From Search
6857

6958
If a search has no exact match, the palette can create a new item from the query.

docs/website/documentation/index.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ massCode is a free and open source developer workspace for code snippets, markdo
99

1010
Switch between Spaces using the rail on the left side of the app, or use the [Command Palette](/documentation/command-palette) to jump to spaces, content, and actions from the keyboard.
1111

12+
Use [Search](/documentation/search) to narrow the current list in Code, Notes, or HTTP, or to build filtered searches from the Command Palette.
13+
1214
<img :src="withBase('/preview.png')">
1315

1416
## Code

docs/website/documentation/notes/search.md

Lines changed: 0 additions & 11 deletions
This file was deleted.
Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
---
2+
title: Search
3+
description: "Search snippets, notes, HTTP requests, spaces, and commands in massCode with scoped list search and Command Palette filters."
4+
---
5+
6+
# Search
7+
8+
massCode has two search flows:
9+
10+
- Use the search field above a list to narrow the current space.
11+
- Use the Command Palette to search across the app and add filters with the keyboard.
12+
13+
## Search the current list
14+
15+
The search field above a list searches the items in that space:
16+
17+
- Code searches snippets.
18+
- Notes searches notes.
19+
- HTTP searches requests.
20+
21+
Click the search field at the top of the list, or press <kbd>Cmd+F</kbd> on macOS and <kbd>Ctrl+F</kbd> on Windows and Linux.
22+
23+
List search respects the current sidebar context. If you select a folder, tag, or library view first, the search field narrows that selection instead of searching the whole space.
24+
25+
Examples:
26+
27+
- Select a Code tag, then search to find matching snippets inside that tag.
28+
- Select a Notes folder, then search to find matching notes in that folder.
29+
- Open Favorites, Trash, Tasks, Today, or Upcoming in Notes, then search inside that view.
30+
- Select an HTTP folder, then search for matching requests inside that folder.
31+
32+
Clearing the search text keeps the same sidebar selection active.
33+
34+
## Search from the Command Palette
35+
36+
Open the Command Palette with <kbd>Cmd+P</kbd> on macOS or <kbd>Ctrl+P</kbd> on Windows and Linux.
37+
38+
The palette can search:
39+
40+
- snippets
41+
- notes
42+
- HTTP requests
43+
- spaces
44+
- commands
45+
- recently opened items
46+
47+
Results are ranked with recent usage, so items you open often move higher over time.
48+
49+
## Scope the palette to a space
50+
51+
Use `@` to search in one space.
52+
53+
1. Open the palette.
54+
2. Type `@`.
55+
3. Select **Code**, **Notes**, or **HTTP**.
56+
4. Type your search query.
57+
58+
You can also type the scope directly:
59+
60+
- `@code auth`
61+
- `@notes release`
62+
- `@http webhook`
63+
64+
Press <kbd>Esc</kbd> to leave the active scope and return to the full palette.
65+
66+
## Add filters in the palette
67+
68+
<AppVersion text=">=5.6" />
69+
70+
Use filter tokens when you want to narrow Command Palette search by folder or tag.
71+
72+
### Tags
73+
74+
Type `#` to show tag suggestions. Select a tag to add it as a chip.
75+
76+
Examples:
77+
78+
- `@code #vue composable`
79+
- `@notes #backend migration`
80+
81+
Tags are available in Code and Notes.
82+
83+
### Folders
84+
85+
Type `/` to show folder suggestions. Select a folder to add it as a chip.
86+
87+
Examples:
88+
89+
- `@code /Shell docker`
90+
- `@notes /Development backend`
91+
- `@http /Webhooks stripe`
92+
93+
Nested folders can be selected by path, such as `/Work/API`.
94+
95+
## Work with search chips
96+
97+
The palette shows active scope and filters as chips in the input.
98+
99+
- Click the `x` on a chip to remove that scope or filter.
100+
- Press <kbd>Backspace</kbd> in an empty input to remove one chip at a time.
101+
- Removing a filter recalculates the search without clearing the remaining query.
102+
103+
You can combine a space, a folder, a tag, and text query when the combination applies to that space.
104+
105+
Example:
106+
107+
```text
108+
Notes /Development #backend migration
109+
```
110+
111+
This searches Notes for `migration` inside the Development folder with the backend tag.

0 commit comments

Comments
 (0)