joplin-plugin-tag-navigator 2.7.3 → 2.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -84,7 +84,12 @@ After installing the plugin, check the commands listed under `Tag Navigator` in
84
84
 
85
85
  ## Tips
86
86
 
87
+ ### Getting Started
87
88
  - [Troubleshooting](#troubleshooting)
89
+ - [Saved queries](#saved-queries)
90
+ - [Keyboard shortcuts](#keyboard-shortcuts)
91
+
92
+ ### Working with Tags
88
93
  - [Custom tag definitions](#custom-tag-definitions)
89
94
  - [Tag inheritance](#tag-inheritance)
90
95
  - [Date tags](#date-tags)
@@ -92,15 +97,17 @@ After installing the plugin, check the commands listed under `Tag Navigator` in
92
97
  - [Tag ranges](#tag-ranges)
93
98
  - [Tag values](#tag-values)
94
99
  - [Front matter tags](#front-matter-tags)
95
- - [Saved queries](#saved-queries)
100
+
101
+ ### Views & Display
96
102
  - [Table views](#table-views)
97
103
  - [Kanban views](#kanban-views)
98
104
  - [Filtering results](#filtering-results)
99
105
  - [Context expansion](#context-expansion)
100
- - [Inline TODOs](#inline-todos)
101
106
  - [Colour tags](#colour-tags)
102
107
  - [Styling inline tags](#styling-inline-tags)
103
- - [Keyboard shortcuts](#keyboard-shortcuts)
108
+
109
+ ### Advanced
110
+ - [Inline TODOs](#inline-todos)
104
111
  - [Converting Joplin tags](#converting-joplin-tags)
105
112
 
106
113
  ### Troubleshooting
@@ -110,12 +117,20 @@ After installing the plugin, check the commands listed under `Tag Navigator` in
110
117
  ### Custom tag definitions
111
118
 
112
119
  - The definition of a "tag" can be adjusted with user-defined regular expressions (see the advanced setting `Tag regex`).
113
- - Example: Every word in the text may be defined as a tag using a custom regex such as `[A-Za-z0-9]+[\w]*`.
114
120
  - You may also define an exclusion rule to ignore certain tags (see the advanced setting `Exclude regex`).
115
- - Example: Numeric (`#123`) or hexanumeric (`#C0FF1E`) tags can be filtered using an exclusion regex such as `#(\d+|[a-fA-F0-9]{6})$`.
121
+
122
+ <details>
123
+ <summary>Regex examples</summary>
124
+
125
+ - **Custom tag regex**: Every word in the text may be defined as a tag using a custom regex such as `[A-Za-z0-9]+[\w]*`.
126
+ - **Exclusion regex**: Numeric (`#123`) or hexanumeric (`#C0FF1E`) tags can be filtered using an exclusion regex such as `#(\d+|[a-fA-F0-9]{6})$`.
127
+
128
+ </details>
116
129
 
117
130
  ### Tag inheritance
118
131
 
132
+ > **TL;DR:** Tags automatically apply to child content via indentation, headings, or note-level inheritance.
133
+
119
134
  - Tag inheritance allows tags to be automatically applied to related content based on document structure, making it easier to organize and find information without manually tagging every line.
120
135
  - When the `Tag inheritance` setting is enabled (by default), tags are automatically inherited in three ways:
121
136
  1. **Outline/indentation inheritance**: Tags are inherited from parent items to their children based on indentation levels.
@@ -128,6 +143,8 @@ After installing the plugin, check the commands listed under `Tag Navigator` in
128
143
 
129
144
  ### Date tags
130
145
 
146
+ > **TL;DR:** Use `#today`, `#week`, `#month` for dynamic dates. Add arithmetic like `#today+7`.
147
+
131
148
  Date tags provide flexible ways to work with dates in your notes, supporting both relative dates that update automatically and absolute dates that remain fixed.
132
149
 
133
150
  #### Relative date tags
@@ -176,20 +193,26 @@ Date tags provide flexible ways to work with dates in your notes, supporting bot
176
193
 
177
194
  ### Tag ranges
178
195
 
196
+ > **TL;DR:** Search tag ranges with `#min -> #max`. Use `*` wildcard for prefix/suffix matching.
197
+
179
198
  - Tag ranges can be used to search for a range of tags, according to their lexicographic order.
180
199
  - Example: `#2024/07 -> #2024/08` will search for all tags starting with `#2024/07` and up to `#2024/08` (inclusive, i.e., returning two months).
200
+ - Note: Non-wildcard ranges require both min and max values to avoid unexpected matches across different tag types.
181
201
  - You may also use ranges with the `*` wildcard to search for tags starting with a certain prefix or ending with a suffix.
182
202
  - Example: `#prefix* ->` will search for all tags starting with `#prefix`.
183
- - Example: `*suffix ->` will search for all tags ending with `suffix`.
203
+ - Example: `-> *suffix` will search for all tags ending with `suffix`.
204
+ - Wildcard ranges can be open-ended (only min or max specified).
184
205
  - Tag ranges can be inserted using the "Tag range" input boxes, or by right-clicking on a tag in the query area, and selecting `Edit query`.
185
206
  - Example: Edit a tag or tag range and type `#prefix* ->` to search for all tags starting with `#prefix`.
186
207
  - If you type only `#prefix`, the query will be converted to a standard tag search (matching only the tag `#prefix`).
187
208
  - Tag ranges can be used to search for tags by today's date.
188
- - Example: `#today ->` will search for all tags starting with `#today`.
209
+ - Example: `#today -> #today+7` will search for all tags from today up to a week from now (inclusive).
189
210
  - Example: `#today -> #today+1` will search for all tags starting with `#today` and up to `#today+1` (inclusive, i.e., returning two days).
190
211
 
191
212
  ### Tag values
192
213
 
214
+ > **TL;DR:** Use `#tag=value` to assign values. Unlike nested tags, values don't clutter the tag list.
215
+
193
216
  Tag values are a bit similar to nested tags as multiple parts of the tag are treated separately, but are distinct from them as explained below.
194
217
 
195
218
  - Nested tags like `#parent/child` are shown as two separate tags in panels: `#parent` and `#parent/child`.
@@ -203,8 +226,13 @@ Tag values are a bit similar to nested tags as multiple parts of the tag are tre
203
226
 
204
227
  ### Front matter tags
205
228
 
229
+ > **TL;DR:** YAML front matter fields are converted to inline tags automatically.
230
+
206
231
  For example, the following YAML front matter, when inserted at the top of the note:
207
232
 
233
+ <details>
234
+ <summary>View YAML front matter example</summary>
235
+
208
236
  ```yaml
209
237
  ---
210
238
  nested: tag with spaces
@@ -227,12 +255,22 @@ will be converted to the following inline tags and values:
227
255
  #frontmatter
228
256
  ```
229
257
 
258
+ </details>
259
+
230
260
  These tags will be accessible in the search panel / notes / tables like standard inline tags. The last tag is `#frontmatter` and is used to indicate that the tags were extracted from the front matter section of the note.
231
261
 
232
262
  ### Saved queries
233
263
 
264
+ > **TL;DR:** Save search configurations as JSON. Press `Save` on the panel, or edit manually. Switch between queries using the dropdown.
265
+
234
266
  Saved queries allow you to store search configurations in notes and reuse them across devices. They are JSON objects that define search parameters and display options. The easiest way to save a query in the current note is to press the `Save` button on the panel (see the [demo](#saved-search-queries)), but they can also be edited manually.
235
267
 
268
+ #### Loading saved queries
269
+
270
+ - A dropdown in the search panel lists all notes containing saved queries, allowing you to quickly switch between them.
271
+ - When you navigate to a note with a saved query, it is automatically loaded into the search panel.
272
+ - To disable automatic loading (for a static panel that only updates via explicit query selection), turn off the setting `Search: Auto-load saved queries from notes`.
273
+
236
274
  #### Basic structure
237
275
 
238
276
  ```json
@@ -282,6 +320,7 @@ Saved queries allow you to store search configurations in notes and reuse them a
282
320
  - `"heading"`: Group by heading
283
321
  - `"consecutive"`: Group adjacent lines
284
322
  - `"item"`: Split by item
323
+ - To change the global grouping, right-click on a note title in the search panel. Saved queries can override this with their own `resultGrouping` property.
285
324
  - **`includeCols`**: (Table view only) Comma-separated list of columns to display
286
325
  - Can include: note properties, tags, "modified", "created" timestamps
287
326
  - Use to slice, sort, or add specific columns
@@ -290,6 +329,9 @@ Saved queries allow you to store search configurations in notes and reuse them a
290
329
 
291
330
  #### Complete example
292
331
 
332
+ <details>
333
+ <summary>View complete JSON example</summary>
334
+
293
335
  ```json
294
336
  {
295
337
  "query": [
@@ -323,6 +365,8 @@ Saved queries allow you to store search configurations in notes and reuse them a
323
365
 
324
366
  This example searches for paragraphs that have both `#artist` AND `#album` tags, OR paragraphs with `#single` tag, then filters results containing "rock" anywhere in the text, and displays them in a table sorted by year (ascending) then by artist (descending).
325
367
 
368
+ </details>
369
+
326
370
  ### Table views
327
371
 
328
372
  - To enable table view, start by [saving a query](#saved-queries). Next, select `Tools --> Tag Navigator --> Toggle search results display in note` (or the corresponding toolbar button) until the saved query shows the property `"displayInNote": "table"` and a table appears.
@@ -357,6 +401,9 @@ This example searches for paragraphs that have both `#artist` AND `#album` tags,
357
401
  ### Filtering results
358
402
 
359
403
  - Text entered in the results filter (on the panel or in a saved query) can be used to search within title of the notes, their notebook name / path, or the content of the displayed results.
404
+ - Filtering behaviour depends on the result grouping mode (right-click a note title on the panel to change):
405
+ - **Group by heading** (default): Shows/hides entire sections based on whether they contain matching content.
406
+ - **Split by item**: Shows/hides individual items, useful for filtering specific tasks like `"- [ ]"`.
360
407
  - To gain more control over filtering by notebook, you may enable the setting `Search: Extract the full notebook path`.
361
408
  - Example: Limit results to a notebook that appears in the top level by searching for `|/topNotebook`.
362
409
  - Example: Search for `topNotebook/childNotebook` to show only results from childNotebook.
@@ -375,12 +422,18 @@ Context expansion lets you reveal surrounding lines around search results to see
375
422
  - When fully expanded, click **↓** to collapse back to the original view.
376
423
  - The expanded context is dimmed to help distinguish it from the core matched lines.
377
424
  - Configure the number of lines revealed per click in the setting `Search: Context expansion (show surrounding lines)`. Set to 0 to disable.
425
+ - **Panel sections**: Show/hide panel sections (search query, tag list, tag range, note mentions, result filter) by right-clicking anywhere on the panel.
378
426
 
379
427
  ### Inline TODOs
380
428
 
381
- - Filter results by pending tasks (`"- [ ]"`) or ones done (`"- [x]"`).
429
+ - Filter results by pending tasks (`"- [ ]"`) or ones done (`"- [x]"`). For individual task filtering, use "Split by item" grouping (right-click a note title on the panel).
382
430
  - Sort results by tags to reflect their priority (see [custom sorting options](#advanced-options)).
383
- - Add support for [additional tags](https://github.com/CalebJohn/joplin-inline-todo?tab=readme-ov-file#confluence-style) for @mentions, +projects and //due-dates using a custom tag regex such as `(?<=^|\s)([#@+]|\/\/)([^\s#@'",.()\[\]:;\?\\]+)`.
431
+ <details>
432
+ <summary>Custom regex for @mentions, +projects, //due-dates</summary>
433
+
434
+ - Add support for [additional tags](https://github.com/CalebJohn/joplin-inline-todo?tab=readme-ov-file#metalist-style) for @mentions, +projects and //due-dates using a custom tag regex such as `(?<=^|\s)([#@+]|\/\/)([^\s#@'",.()\[\]:;\?\\]+)`.
435
+
436
+ </details>
384
437
  - Supported additional checkbox styles (inspired by `[x]it!`).
385
438
  - Set any of them to done by clicking the checkbox in the search panel.
386
439
 
@@ -391,9 +444,14 @@ Context expansion lets you reveal surrounding lines around search results to see
391
444
  ![checkbox commands](img/checkboxes-commands.png)
392
445
 
393
446
  - You may increase the checkbox size on smaller screens by setting `Search: Panel style` with the CSS `.itags-search-checkbox { width: 18px; height: 18px; font-size: 18px }` (adjust as needed).
394
- - Furthermore, every checkbox in the text (even ones that are not tagged by any inline #tag) may be defined as a tag using a custom regex such as `(?<=^|\s)(#([^\s#'",.()\[\]:;\?\\]+)|(\-\s\[[x\s@\?!~]\]))`.
447
+ <details>
448
+ <summary>Custom regex for treating checkboxes as tags</summary>
449
+
450
+ - Every checkbox in the text (even ones that are not tagged by any inline #tag) may be defined as a tag using a custom regex such as `(?<=^|\s)(#([^\s#'",.()\[\]:;\?\\]+)|(\-\s\[[x\s@\?!~]\]))`.
395
451
  - You may then use queries to search for tag-tasks based on their state (`- [ ]`, `- [x]`, `- [@]`, ...).
396
452
 
453
+ </details>
454
+
397
455
  ### Colour tags
398
456
 
399
457
  - Colour tags can be used to highlight results in the search panel, e.g., according to their priority.
@@ -410,7 +468,10 @@ Context expansion lets you reveal surrounding lines around search results to see
410
468
 
411
469
  ### Styling inline tags
412
470
 
413
- The Markdown preview pane and the Tag Navigator search panel wrap every matched tag in the class `itags-search-renderedTag` and, when the token starts with `#`, `@`, `+`, `//`, or any other character, add `itags-search-renderedTag--hash`, `--at`, `--plus`, `--slash`, `--<other char>`. You may modify their appearance in `userstyle.css` (for Markdown preview), or in the `Search: Panel style` setting (for the plugin's search panel). For example:
471
+ The Markdown preview pane and the Tag Navigator search panel wrap every matched tag in the class `itags-search-renderedTag` and, when the token starts with `#`, `@`, `+`, `//`, or any other character, add `itags-search-renderedTag--hash`, `--at`, `--plus`, `--slash`, `--<other char>`. You may modify their appearance in `userstyle.css` (for Markdown preview), or in the `Search: Panel style` setting (for the plugin's search panel).
472
+
473
+ <details>
474
+ <summary>CSS example for tag styling</summary>
414
475
 
415
476
  ```css
416
477
  /* optional: specify different sub-styles for each type of tag */
@@ -431,6 +492,8 @@ The Markdown preview pane and the Tag Navigator search panel wrap every matched
431
492
  }
432
493
  ```
433
494
 
495
+ </details>
496
+
434
497
  For the Markdown editor see Rich Markdown in the [Companion plugins](#companion-plugins) section.
435
498
 
436
499
  ### Keyboard shortcuts
@@ -482,21 +545,27 @@ For the Markdown editor see Rich Markdown in the [Companion plugins](#companion-
482
545
  - The excellent [Inline Tags](https://github.com/roman-r-m/joplin-inline-tags-plugin) plugin can autocomplete tags while typing.
483
546
  - Use [YesYouKan](https://github.com/joplin/plugin-yesyoukan) to visualize kanban views generated by Tag Navigator as interactive kanban boards.
484
547
  - You can highlight tags in the Markdown editor using [Rich Markdown](https://github.com/CalebJohn/joplin-rich-markdown) (version ≥ 0.14).
485
- - In `Joplin settings --> Rich Markdown --> Advanced Settings --> Custom classes JSON` enter:
486
- ```
487
- [{"name": "rm-tag", "regex": "(?<=^|\\s)#([^\\s#'\",.()\\[\\]:;\\?\\\\]+)"}]
488
- ```
489
- - In `Joplin settings --> Appearance --> Custom stylesheet for Joplin-wide app styles` add the following to the style sheet:
490
- ```
491
- div.CodeMirror .cm-rm-tag {
492
- background-color: #7698b3;
493
- color: white !important;
494
- padding: 0em 2px;
495
- border-radius: 5px;
496
- display: inline;
497
- }
498
- ```
499
- - On the mobile app, since it is impossible to edit the stylesheet, one could install this [Rich Markdown fork](https://github.com/alondmnt/joplin-rich-markdown/releases/tag/v0.15-mobile-style-v4) (with predefined support for tags and checkboxes) or instead define the name of the tag class to be `"name": "searchMatch"`. This will use the same highlighting style as Joplin search results.
548
+
549
+ <details>
550
+ <summary>Rich Markdown setup instructions</summary>
551
+
552
+ - In `Joplin settings --> Rich Markdown --> Advanced Settings --> Custom classes JSON` enter:
553
+ ```
554
+ [{"name": "rm-tag", "regex": "(?<=^|\\s)#([^\\s#'\",.()\\[\\]:;\\?\\\\]+)"}]
555
+ ```
556
+ - In `Joplin settings --> Appearance --> Custom stylesheet for Joplin-wide app styles` add the following to the style sheet:
557
+ ```
558
+ div.CodeMirror .cm-rm-tag {
559
+ background-color: #7698b3;
560
+ color: white !important;
561
+ padding: 0em 2px;
562
+ border-radius: 5px;
563
+ display: inline;
564
+ }
565
+ ```
566
+ - On the mobile app, since it is impossible to edit the stylesheet, one could install this [Rich Markdown fork](https://github.com/alondmnt/joplin-rich-markdown/releases/tag/v0.15-mobile-style-v4) (with predefined support for tags and checkboxes) or instead define the name of the tag class to be `"name": "searchMatch"`. This will use the same highlighting style as Joplin search results.
567
+
568
+ </details>
500
569
 
501
570
  ## Motivation
502
571
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "joplin-plugin-tag-navigator",
3
- "version": "2.7.3",
3
+ "version": "2.8.0",
4
4
  "scripts": {
5
5
  "dist": "webpack --env joplin-plugin-config=buildMain && webpack --env joplin-plugin-config=buildExtraScripts && webpack --env joplin-plugin-config=createArchive",
6
6
  "prepare": "npm run dist",
@@ -6,7 +6,7 @@
6
6
  "desktop",
7
7
  "mobile"
8
8
  ],
9
- "version": "2.7.3",
9
+ "version": "2.8.0",
10
10
  "name": "Inline Tag Navigator",
11
11
  "description": "Type inline tags or frontmatter in the note editor. View your tagged paragraphs and tasks / TODOs in a search panel, or in a generated note / kanban. Build a table view / database from notes and tags. Convert between Obsidian tags and Joplin tags.",
12
12
  "author": "Alon Diament",
@@ -24,6 +24,6 @@
24
24
  ],
25
25
  "screenshots": [],
26
26
  "icons": {},
27
- "_publish_hash": "sha256:622bf8902bb438f84f5d5646c753109bb593645baa2bc5b6ad643f0533cde7e6",
28
- "_publish_commit": "main:c18a6f026f379e4a89661d96672e2c1075ccdcc6"
27
+ "_publish_hash": "sha256:1d782497553a684a46e1f4d649bab293093cb305a05ad1eae5b0b6e70bf6fe69",
28
+ "_publish_commit": "main:271b27c93be4c63f0e14ef494b7a806b8161c7c5"
29
29
  }