diff --git a/docs/How To/Make a query user interface.md b/docs/How To/Make a query user interface.md index f34c9b7aee..841d2d6d37 100644 --- a/docs/How To/Make a query user interface.md +++ b/docs/How To/Make a query user interface.md @@ -24,6 +24,12 @@ We can combine: - enable or disable other search features, such as nested tasks, short mode, backlink and buttons, - and allow arbitrary extra instructions to be added: + + ![Meta Bind widgets to edit Query File Defaults](../images/query-file-defaults-meta-bind-controls.png) Meta Bind widgets to edit Query File Defaults @@ -39,6 +45,7 @@ Follow these steps, which assume you have already [turned off Obsidian's Restric ```md +toolbar: `INPUT[toggle:TQ_show_toolbar]` short mode: `INPUT[toggle:TQ_short_mode]` tree: `INPUT[toggle:TQ_show_tree]` tags: `INPUT[toggle:TQ_show_tags]` diff --git a/docs/Queries/Query File Defaults.md b/docs/Queries/Query File Defaults.md index d9207d6ee5..f797d77fe3 100644 --- a/docs/Queries/Query File Defaults.md +++ b/docs/Queries/Query File Defaults.md @@ -193,6 +193,7 @@ TQ_show_scheduled_date: TQ_show_start_date: TQ_show_tags: TQ_show_task_count: +TQ_show_toolbar: TQ_show_tree: TQ_show_urgency: --- @@ -237,6 +238,7 @@ The `type` values are explained in the [Property types](https://help.obsidian.md "TQ_show_start_date": "checkbox", "TQ_show_tags": "checkbox", "TQ_show_task_count": "checkbox", + "TQ_show_toolbar": "checkbox", "TQ_show_tree": "checkbox", "TQ_show_urgency": "checkbox" } diff --git a/docs/What is New/Changelog.md b/docs/What is New/Changelog.md index 6a70f7a6a2..fc8d952901 100644 --- a/docs/What is New/Changelog.md +++ b/docs/What is New/Changelog.md @@ -14,7 +14,7 @@ _In recent [Tasks releases](https://github.com/obsidian-tasks-group/obsidian-tas - X.Y.Z: - Add [[Status Types#ON_HOLD|ON_HOLD]] status type. - - Add 'Copy results' button: an initial implementation, which is not yet documented. + - Add toolbar containing a 'Filter by description' box and 'Copy results' button: these are not yet documented. - 7.22.0: - Fix [[Recurring Tasks#Priority of Dates|priority of dates in recurring tasks]] when using [[Recurring Tasks#Remove scheduled date on recurrence|Remove scheduled date on recurrence]]. - Update the [[Obsidian Properties#How does Tasks interpret Obsidian Properties?|table of examples]] to show how to use properties with nested data and object serialisation. diff --git a/docs/images/query-file-defaults-meta-bind-controls.png b/docs/images/query-file-defaults-meta-bind-controls.png index aa592d0d3b..95dcb3cb6d 100644 Binary files a/docs/images/query-file-defaults-meta-bind-controls.png and b/docs/images/query-file-defaults-meta-bind-controls.png differ diff --git a/resources/sample_vaults/Tasks-Demo/.obsidian/types.json b/resources/sample_vaults/Tasks-Demo/.obsidian/types.json index ba56949ac6..b7841af463 100644 --- a/resources/sample_vaults/Tasks-Demo/.obsidian/types.json +++ b/resources/sample_vaults/Tasks-Demo/.obsidian/types.json @@ -38,6 +38,7 @@ "TQ_show_tags": "checkbox", "TQ_show_task_count": "checkbox", "TQ_show_tree": "checkbox", - "TQ_show_urgency": "checkbox" + "TQ_show_urgency": "checkbox", + "TQ_show_toolbar": "checkbox" } } \ No newline at end of file diff --git a/resources/sample_vaults/Tasks-Demo/Manual Testing/Frontmatter/Placeholder examples to capture in tests and docs.md b/resources/sample_vaults/Tasks-Demo/Manual Testing/Frontmatter/Placeholder examples to capture in tests and docs.md index 40ca3c0b09..051e947d8e 100644 --- a/resources/sample_vaults/Tasks-Demo/Manual Testing/Frontmatter/Placeholder examples to capture in tests and docs.md +++ b/resources/sample_vaults/Tasks-Demo/Manual Testing/Frontmatter/Placeholder examples to capture in tests and docs.md @@ -6,7 +6,7 @@ TQ_extra_instructions: |- # sort by done date # ignore global query TQ_short_mode: false -TQ_show_backlink: true +TQ_show_backlink: false TQ_show_cancelled_date: true TQ_show_created_date: true TQ_show_depends_on: true @@ -21,9 +21,10 @@ TQ_show_recurrence_rule: true TQ_show_scheduled_date: true TQ_show_start_date: true TQ_show_tags: true -TQ_show_task_count: true +TQ_show_task_count: false +TQ_show_toolbar: true TQ_show_tree: true -TQ_show_urgency: true +TQ_show_urgency: false TQ_sort_by: - description TQ_group_by: @@ -39,6 +40,7 @@ TQ_group_by: +toolbar: `INPUT[toggle:TQ_show_toolbar]` short mode: `INPUT[toggle:TQ_short_mode]` tree: `INPUT[toggle:TQ_show_tree]` tags: `INPUT[toggle:TQ_show_tags]` diff --git a/resources/sample_vaults/Tasks-Demo/Test Data/query_file_defaults_all_options_false.md b/resources/sample_vaults/Tasks-Demo/Test Data/query_file_defaults_all_options_false.md index 6231bac820..2974899431 100644 --- a/resources/sample_vaults/Tasks-Demo/Test Data/query_file_defaults_all_options_false.md +++ b/resources/sample_vaults/Tasks-Demo/Test Data/query_file_defaults_all_options_false.md @@ -20,6 +20,7 @@ TQ_show_scheduled_date: false TQ_show_start_date: false TQ_show_tags: false TQ_show_task_count: false +TQ_show_toolbar: false TQ_show_tree: false TQ_show_urgency: false --- diff --git a/resources/sample_vaults/Tasks-Demo/Test Data/query_file_defaults_all_options_null.md b/resources/sample_vaults/Tasks-Demo/Test Data/query_file_defaults_all_options_null.md index d8b1d59c50..ba3c341f4b 100644 --- a/resources/sample_vaults/Tasks-Demo/Test Data/query_file_defaults_all_options_null.md +++ b/resources/sample_vaults/Tasks-Demo/Test Data/query_file_defaults_all_options_null.md @@ -18,6 +18,7 @@ TQ_show_scheduled_date: TQ_show_start_date: TQ_show_tags: TQ_show_task_count: +TQ_show_toolbar: TQ_show_tree: TQ_show_urgency: --- diff --git a/resources/sample_vaults/Tasks-Demo/Test Data/query_file_defaults_all_options_true.md b/resources/sample_vaults/Tasks-Demo/Test Data/query_file_defaults_all_options_true.md index 770b19b222..4111099021 100644 --- a/resources/sample_vaults/Tasks-Demo/Test Data/query_file_defaults_all_options_true.md +++ b/resources/sample_vaults/Tasks-Demo/Test Data/query_file_defaults_all_options_true.md @@ -20,6 +20,7 @@ TQ_show_scheduled_date: true TQ_show_start_date: true TQ_show_tags: true TQ_show_task_count: true +TQ_show_toolbar: true TQ_show_tree: true TQ_show_urgency: true --- diff --git a/src/Query/QueryFileDefaults.ts b/src/Query/QueryFileDefaults.ts index 699c560fb4..300180d5b5 100644 --- a/src/Query/QueryFileDefaults.ts +++ b/src/Query/QueryFileDefaults.ts @@ -8,10 +8,31 @@ enum Handler { AddValue = 'addValue', } +// Steps for adding a new property to Query File Defaults: +// 1. Add the new value to queryProperties below. +// 2. Add it to metaBindPluginWidgets() below +// 3. Build the plugin and add it to the test vault: resources/sample_vaults/Tasks-Demo/ +// 4. Open the test vault in Obsidian +// 5. Open each of these files, and run the 'Tasks: Add all Query File Defaults properties' command, +// and set its value to be consistent with the existing properties: +// - Test Data/query_file_defaults_all_options_false.md +// - Test Data/query_file_defaults_all_options_null.md +// - Test Data/query_file_defaults_all_options_true.md +// 6. Sort the properties in each file in alphabetical order +// 7. Run the 'Tasks: Add all Query File Defaults properties' command, to update query_file_defaults_all_options_*.json +// 8. Run the tests, to update all inline snapshots and approved files. +// 9. Run mdsnippets to update the docs and sample vault - or let the GitHub Action do it after merging to main + // Note: This file is excluded from SonarCloud duplication-checks, // as the duplication here provides clarity. // Instructions are listed in the order that items are displayed in Tasks search results const queryProperties = [ + { + name: 'TQ_show_toolbar', + type: 'checkbox', + display: 'toolbar', + handler: Handler.ShowAndHide, + }, { name: 'TQ_explain', type: 'checkbox', @@ -201,11 +222,14 @@ export class QueryFileDefaults { /** * Return text that creates MetaBind widgets for users to edit query file defaults. + * + * This is used to generate content in the user documentation. */ public metaBindPluginWidgets() { // This is initially hard-coded, though I intend to machine-generate it eventually. // Its text is embedded in the test vault and in the user guide. return ` +toolbar: \`INPUT[toggle:TQ_show_toolbar]\` short mode: \`INPUT[toggle:TQ_short_mode]\` tree: \`INPUT[toggle:TQ_show_tree]\` tags: \`INPUT[toggle:TQ_show_tags]\` diff --git a/tests/DocumentationSamples/DefaultsDocs/DocsSamplesForDefaults.test.DocsSamplesForDefaults_fake-types.json.approved.json b/tests/DocumentationSamples/DefaultsDocs/DocsSamplesForDefaults.test.DocsSamplesForDefaults_fake-types.json.approved.json index de3cde5159..a60357ea48 100644 --- a/tests/DocumentationSamples/DefaultsDocs/DocsSamplesForDefaults.test.DocsSamplesForDefaults_fake-types.json.approved.json +++ b/tests/DocumentationSamples/DefaultsDocs/DocsSamplesForDefaults.test.DocsSamplesForDefaults_fake-types.json.approved.json @@ -19,6 +19,7 @@ "TQ_show_start_date": "checkbox", "TQ_show_tags": "checkbox", "TQ_show_task_count": "checkbox", + "TQ_show_toolbar": "checkbox", "TQ_show_tree": "checkbox", "TQ_show_urgency": "checkbox" } diff --git a/tests/DocumentationSamples/DefaultsDocs/DocsSamplesForDefaults.test.DocsSamplesForDefaults_meta-bind-widgets-include.approved.md b/tests/DocumentationSamples/DefaultsDocs/DocsSamplesForDefaults.test.DocsSamplesForDefaults_meta-bind-widgets-include.approved.md index 29c306fd7d..4963b486cb 100644 --- a/tests/DocumentationSamples/DefaultsDocs/DocsSamplesForDefaults.test.DocsSamplesForDefaults_meta-bind-widgets-include.approved.md +++ b/tests/DocumentationSamples/DefaultsDocs/DocsSamplesForDefaults.test.DocsSamplesForDefaults_meta-bind-widgets-include.approved.md @@ -1,6 +1,7 @@ +toolbar: `INPUT[toggle:TQ_show_toolbar]` short mode: `INPUT[toggle:TQ_short_mode]` tree: `INPUT[toggle:TQ_show_tree]` tags: `INPUT[toggle:TQ_show_tags]` diff --git a/tests/DocumentationSamples/DefaultsDocs/DocsSamplesForDefaults.test.DocsSamplesForDefaults_meta-bind-widgets-snippet.approved.md b/tests/DocumentationSamples/DefaultsDocs/DocsSamplesForDefaults.test.DocsSamplesForDefaults_meta-bind-widgets-snippet.approved.md index 93110a3330..2946edf1bc 100644 --- a/tests/DocumentationSamples/DefaultsDocs/DocsSamplesForDefaults.test.DocsSamplesForDefaults_meta-bind-widgets-snippet.approved.md +++ b/tests/DocumentationSamples/DefaultsDocs/DocsSamplesForDefaults.test.DocsSamplesForDefaults_meta-bind-widgets-snippet.approved.md @@ -1,4 +1,5 @@ +toolbar: `INPUT[toggle:TQ_show_toolbar]` short mode: `INPUT[toggle:TQ_short_mode]` tree: `INPUT[toggle:TQ_show_tree]` tags: `INPUT[toggle:TQ_show_tags]` diff --git a/tests/DocumentationSamples/DefaultsDocs/DocsSamplesForDefaults.test.DocsSamplesForDefaults_supported-properties-empty.approved.yaml b/tests/DocumentationSamples/DefaultsDocs/DocsSamplesForDefaults.test.DocsSamplesForDefaults_supported-properties-empty.approved.yaml index 0d4b602a12..93d49e6d3c 100644 --- a/tests/DocumentationSamples/DefaultsDocs/DocsSamplesForDefaults.test.DocsSamplesForDefaults_supported-properties-empty.approved.yaml +++ b/tests/DocumentationSamples/DefaultsDocs/DocsSamplesForDefaults.test.DocsSamplesForDefaults_supported-properties-empty.approved.yaml @@ -18,6 +18,7 @@ TQ_show_scheduled_date: TQ_show_start_date: TQ_show_tags: TQ_show_task_count: +TQ_show_toolbar: TQ_show_tree: TQ_show_urgency: --- diff --git a/tests/DocumentationSamples/DefaultsDocs/DocsSamplesForDefaults.test.DocsSamplesForDefaults_supported-properties-full.approved.yaml b/tests/DocumentationSamples/DefaultsDocs/DocsSamplesForDefaults.test.DocsSamplesForDefaults_supported-properties-full.approved.yaml index 8eb23fcc38..efb29c5cb0 100644 --- a/tests/DocumentationSamples/DefaultsDocs/DocsSamplesForDefaults.test.DocsSamplesForDefaults_supported-properties-full.approved.yaml +++ b/tests/DocumentationSamples/DefaultsDocs/DocsSamplesForDefaults.test.DocsSamplesForDefaults_supported-properties-full.approved.yaml @@ -20,6 +20,7 @@ TQ_show_scheduled_date: true TQ_show_start_date: true TQ_show_tags: true TQ_show_task_count: true +TQ_show_toolbar: true TQ_show_tree: true TQ_show_urgency: true --- diff --git a/tests/Obsidian/__test_data__/query_file_defaults_all_options_false.json b/tests/Obsidian/__test_data__/query_file_defaults_all_options_false.json index eaef2ad1bd..1e963485f7 100644 --- a/tests/Obsidian/__test_data__/query_file_defaults_all_options_false.json +++ b/tests/Obsidian/__test_data__/query_file_defaults_all_options_false.json @@ -20,6 +20,7 @@ "TQ_show_start_date": false, "TQ_show_tags": false, "TQ_show_task_count": false, + "TQ_show_toolbar": false, "TQ_show_tree": false, "TQ_show_urgency": false }, @@ -27,8 +28,8 @@ "frontmatterPosition": { "end": { "col": 3, - "line": 24, - "offset": 585 + "line": 25, + "offset": 608 }, "start": { "col": 0, @@ -43,30 +44,30 @@ "position": { "end": { "col": 39, - "line": 26, - "offset": 626 + "line": 27, + "offset": 649 }, "start": { "col": 0, - "line": 26, - "offset": 587 + "line": 27, + "offset": 610 } } } ], "listItems": [ { - "parent": -28, + "parent": -29, "position": { "end": { "col": 59, - "line": 28, - "offset": 687 + "line": 29, + "offset": 710 }, "start": { "col": 0, - "line": 28, - "offset": 628 + "line": 29, + "offset": 651 } }, "task": " " @@ -77,8 +78,8 @@ "position": { "end": { "col": 3, - "line": 24, - "offset": 585 + "line": 25, + "offset": 608 }, "start": { "col": 0, @@ -92,13 +93,13 @@ "position": { "end": { "col": 39, - "line": 26, - "offset": 626 + "line": 27, + "offset": 649 }, "start": { "col": 0, - "line": 26, - "offset": 587 + "line": 27, + "offset": 610 } }, "type": "heading" @@ -107,13 +108,13 @@ "position": { "end": { "col": 59, - "line": 28, - "offset": 687 + "line": 29, + "offset": 710 }, "start": { "col": 0, - "line": 28, - "offset": 628 + "line": 29, + "offset": 651 } }, "type": "list" @@ -124,20 +125,20 @@ "position": { "end": { "col": 11, - "line": 28, - "offset": 639 + "line": 29, + "offset": 662 }, "start": { "col": 6, - "line": 28, - "offset": 634 + "line": 29, + "offset": 657 } }, "tag": "#task" } ] }, - "fileContents": "---\nTQ_explain: false\nTQ_extra_instructions: |-\n # press shift-return to add new lines\n not done\nTQ_short_mode: false\nTQ_show_backlink: false\nTQ_show_cancelled_date: false\nTQ_show_created_date: false\nTQ_show_depends_on: false\nTQ_show_done_date: false\nTQ_show_due_date: false\nTQ_show_edit_button: false\nTQ_show_id: false\nTQ_show_on_completion: false\nTQ_show_postpone_button: false\nTQ_show_priority: false\nTQ_show_recurrence_rule: false\nTQ_show_scheduled_date: false\nTQ_show_start_date: false\nTQ_show_tags: false\nTQ_show_task_count: false\nTQ_show_tree: false\nTQ_show_urgency: false\n---\n\n# query_file_defaults_all_options_false\n\n- [ ] #task Task in 'query_file_defaults_all_options_false'\n", + "fileContents": "---\nTQ_explain: false\nTQ_extra_instructions: |-\n # press shift-return to add new lines\n not done\nTQ_short_mode: false\nTQ_show_backlink: false\nTQ_show_cancelled_date: false\nTQ_show_created_date: false\nTQ_show_depends_on: false\nTQ_show_done_date: false\nTQ_show_due_date: false\nTQ_show_edit_button: false\nTQ_show_id: false\nTQ_show_on_completion: false\nTQ_show_postpone_button: false\nTQ_show_priority: false\nTQ_show_recurrence_rule: false\nTQ_show_scheduled_date: false\nTQ_show_start_date: false\nTQ_show_tags: false\nTQ_show_task_count: false\nTQ_show_toolbar: false\nTQ_show_tree: false\nTQ_show_urgency: false\n---\n\n# query_file_defaults_all_options_false\n\n- [ ] #task Task in 'query_file_defaults_all_options_false'\n", "filePath": "Test Data/query_file_defaults_all_options_false.md", "getAllTags": [ "#task" diff --git a/tests/Obsidian/__test_data__/query_file_defaults_all_options_null.json b/tests/Obsidian/__test_data__/query_file_defaults_all_options_null.json index 50a26eef47..5e978acb79 100644 --- a/tests/Obsidian/__test_data__/query_file_defaults_all_options_null.json +++ b/tests/Obsidian/__test_data__/query_file_defaults_all_options_null.json @@ -20,6 +20,7 @@ "TQ_show_start_date": null, "TQ_show_tags": null, "TQ_show_task_count": null, + "TQ_show_toolbar": null, "TQ_show_tree": null, "TQ_show_urgency": null }, @@ -27,8 +28,8 @@ "frontmatterPosition": { "end": { "col": 3, - "line": 22, - "offset": 411 + "line": 23, + "offset": 428 }, "start": { "col": 0, @@ -43,30 +44,30 @@ "position": { "end": { "col": 38, - "line": 24, - "offset": 451 + "line": 25, + "offset": 468 }, "start": { "col": 0, - "line": 24, - "offset": 413 + "line": 25, + "offset": 430 } } } ], "listItems": [ { - "parent": -26, + "parent": -27, "position": { "end": { "col": 58, - "line": 26, - "offset": 511 + "line": 27, + "offset": 528 }, "start": { "col": 0, - "line": 26, - "offset": 453 + "line": 27, + "offset": 470 } }, "task": " " @@ -77,8 +78,8 @@ "position": { "end": { "col": 3, - "line": 22, - "offset": 411 + "line": 23, + "offset": 428 }, "start": { "col": 0, @@ -92,13 +93,13 @@ "position": { "end": { "col": 38, - "line": 24, - "offset": 451 + "line": 25, + "offset": 468 }, "start": { "col": 0, - "line": 24, - "offset": 413 + "line": 25, + "offset": 430 } }, "type": "heading" @@ -107,13 +108,13 @@ "position": { "end": { "col": 58, - "line": 26, - "offset": 511 + "line": 27, + "offset": 528 }, "start": { "col": 0, - "line": 26, - "offset": 453 + "line": 27, + "offset": 470 } }, "type": "list" @@ -124,20 +125,20 @@ "position": { "end": { "col": 11, - "line": 26, - "offset": 464 + "line": 27, + "offset": 481 }, "start": { "col": 6, - "line": 26, - "offset": 459 + "line": 27, + "offset": 476 } }, "tag": "#task" } ] }, - "fileContents": "---\nTQ_explain:\nTQ_extra_instructions:\nTQ_short_mode:\nTQ_show_backlink:\nTQ_show_cancelled_date:\nTQ_show_created_date:\nTQ_show_depends_on:\nTQ_show_done_date:\nTQ_show_due_date:\nTQ_show_edit_button:\nTQ_show_id:\nTQ_show_on_completion:\nTQ_show_postpone_button:\nTQ_show_priority:\nTQ_show_recurrence_rule:\nTQ_show_scheduled_date:\nTQ_show_start_date:\nTQ_show_tags:\nTQ_show_task_count:\nTQ_show_tree:\nTQ_show_urgency:\n---\n\n# query_file_defaults_all_options_null\n\n- [ ] #task Task in 'query_file_defaults_all_options_null'\n", + "fileContents": "---\nTQ_explain:\nTQ_extra_instructions:\nTQ_short_mode:\nTQ_show_backlink:\nTQ_show_cancelled_date:\nTQ_show_created_date:\nTQ_show_depends_on:\nTQ_show_done_date:\nTQ_show_due_date:\nTQ_show_edit_button:\nTQ_show_id:\nTQ_show_on_completion:\nTQ_show_postpone_button:\nTQ_show_priority:\nTQ_show_recurrence_rule:\nTQ_show_scheduled_date:\nTQ_show_start_date:\nTQ_show_tags:\nTQ_show_task_count:\nTQ_show_toolbar:\nTQ_show_tree:\nTQ_show_urgency:\n---\n\n# query_file_defaults_all_options_null\n\n- [ ] #task Task in 'query_file_defaults_all_options_null'\n", "filePath": "Test Data/query_file_defaults_all_options_null.md", "getAllTags": [ "#task" diff --git a/tests/Obsidian/__test_data__/query_file_defaults_all_options_true.json b/tests/Obsidian/__test_data__/query_file_defaults_all_options_true.json index 2fea9b3c73..567497c1f3 100644 --- a/tests/Obsidian/__test_data__/query_file_defaults_all_options_true.json +++ b/tests/Obsidian/__test_data__/query_file_defaults_all_options_true.json @@ -20,6 +20,7 @@ "TQ_show_start_date": true, "TQ_show_tags": true, "TQ_show_task_count": true, + "TQ_show_toolbar": true, "TQ_show_tree": true, "TQ_show_urgency": true }, @@ -27,8 +28,8 @@ "frontmatterPosition": { "end": { "col": 3, - "line": 24, - "offset": 565 + "line": 25, + "offset": 587 }, "start": { "col": 0, @@ -43,30 +44,30 @@ "position": { "end": { "col": 38, - "line": 26, - "offset": 605 + "line": 27, + "offset": 627 }, "start": { "col": 0, - "line": 26, - "offset": 567 + "line": 27, + "offset": 589 } } } ], "listItems": [ { - "parent": -28, + "parent": -29, "position": { "end": { "col": 58, - "line": 28, - "offset": 665 + "line": 29, + "offset": 687 }, "start": { "col": 0, - "line": 28, - "offset": 607 + "line": 29, + "offset": 629 } }, "task": " " @@ -77,8 +78,8 @@ "position": { "end": { "col": 3, - "line": 24, - "offset": 565 + "line": 25, + "offset": 587 }, "start": { "col": 0, @@ -92,13 +93,13 @@ "position": { "end": { "col": 38, - "line": 26, - "offset": 605 + "line": 27, + "offset": 627 }, "start": { "col": 0, - "line": 26, - "offset": 567 + "line": 27, + "offset": 589 } }, "type": "heading" @@ -107,13 +108,13 @@ "position": { "end": { "col": 58, - "line": 28, - "offset": 665 + "line": 29, + "offset": 687 }, "start": { "col": 0, - "line": 28, - "offset": 607 + "line": 29, + "offset": 629 } }, "type": "list" @@ -124,20 +125,20 @@ "position": { "end": { "col": 11, - "line": 28, - "offset": 618 + "line": 29, + "offset": 640 }, "start": { "col": 6, - "line": 28, - "offset": 613 + "line": 29, + "offset": 635 } }, "tag": "#task" } ] }, - "fileContents": "---\nTQ_explain: true\nTQ_extra_instructions: |-\n # press shift-return to add new lines\n not done\nTQ_short_mode: true\nTQ_show_backlink: true\nTQ_show_cancelled_date: true\nTQ_show_created_date: true\nTQ_show_depends_on: true\nTQ_show_done_date: true\nTQ_show_due_date: true\nTQ_show_edit_button: true\nTQ_show_id: true\nTQ_show_on_completion: true\nTQ_show_postpone_button: true\nTQ_show_priority: true\nTQ_show_recurrence_rule: true\nTQ_show_scheduled_date: true\nTQ_show_start_date: true\nTQ_show_tags: true\nTQ_show_task_count: true\nTQ_show_tree: true\nTQ_show_urgency: true\n---\n\n# query_file_defaults_all_options_true\n\n- [ ] #task Task in 'query_file_defaults_all_options_true'\n", + "fileContents": "---\nTQ_explain: true\nTQ_extra_instructions: |-\n # press shift-return to add new lines\n not done\nTQ_short_mode: true\nTQ_show_backlink: true\nTQ_show_cancelled_date: true\nTQ_show_created_date: true\nTQ_show_depends_on: true\nTQ_show_done_date: true\nTQ_show_due_date: true\nTQ_show_edit_button: true\nTQ_show_id: true\nTQ_show_on_completion: true\nTQ_show_postpone_button: true\nTQ_show_priority: true\nTQ_show_recurrence_rule: true\nTQ_show_scheduled_date: true\nTQ_show_start_date: true\nTQ_show_tags: true\nTQ_show_task_count: true\nTQ_show_toolbar: true\nTQ_show_tree: true\nTQ_show_urgency: true\n---\n\n# query_file_defaults_all_options_true\n\n- [ ] #task Task in 'query_file_defaults_all_options_true'\n", "filePath": "Test Data/query_file_defaults_all_options_true.md", "getAllTags": [ "#task" diff --git a/tests/Query/QueryFileDefaults.test.ts b/tests/Query/QueryFileDefaults.test.ts index 7976996180..1137c7a66c 100644 --- a/tests/Query/QueryFileDefaults.test.ts +++ b/tests/Query/QueryFileDefaults.test.ts @@ -21,6 +21,7 @@ describe('QueryFileDefaults', () => { const names = new QueryFileDefaults().allPropertyNames(); expect(names).toMatchInlineSnapshot(` [ + "TQ_show_toolbar", "TQ_explain", "TQ_short_mode", "TQ_show_tree", @@ -69,6 +70,7 @@ describe('QueryFileDefaults', () => { "TQ_show_start_date", "TQ_show_tags", "TQ_show_task_count", + "TQ_show_toolbar", "TQ_show_tree", "TQ_show_urgency", ] @@ -85,7 +87,8 @@ describe('QueryFileDefaults', () => { it('should generate instructions - all values false', () => { expect(generateQueryFileDefaultsSource('query_file_defaults_all_options_false')).toMatchInlineSnapshot(` - "full mode + "hide toolbar + full mode hide tree hide tags hide id @@ -111,7 +114,8 @@ describe('QueryFileDefaults', () => { it('should generate instructions - all values true', () => { expect(generateQueryFileDefaultsSource('query_file_defaults_all_options_true')).toMatchInlineSnapshot(` - "explain + "show toolbar + explain short mode show tree show tags diff --git a/tests/Query/QueryRendererHelper.test.ts b/tests/Query/QueryRendererHelper.test.ts index 977aec6844..39e6d62d3c 100644 --- a/tests/Query/QueryRendererHelper.test.ts +++ b/tests/Query/QueryRendererHelper.test.ts @@ -71,6 +71,8 @@ describe('explain', () => { not done + show toolbar + short mode show tree