forked from obsidian-tasks-group/obsidian-tasks
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge commit 'ff1216477242401139fee2031b28ebec9422334c' into sytone/i…
…ssue666
- Loading branch information
Showing
23 changed files
with
1,226 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<!--- Provide a general summary of your changes in the Title above --> | ||
|
||
## Description | ||
<!--- Describe your changes in detail --> | ||
|
||
## Motivation and Context | ||
<!--- Why is this change required? What problem does it solve? --> | ||
<!--- If it fixes an open issue, please link to the issue here. --> | ||
|
||
## How has this been tested? | ||
<!--- Please describe in detail how you tested your changes. --> | ||
<!--- Include details of your testing environment, tests ran to see how --> | ||
<!--- your change affects other areas of the code, etc. --> | ||
|
||
## Screenshots (if appropriate): | ||
|
||
## Types of changes | ||
<!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: --> | ||
- [ ] Bug fix (non-breaking change which fixes an issue) | ||
- [ ] New feature (non-breaking change which adds functionality) | ||
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) | ||
|
||
## Checklist: | ||
<!--- Go over all the following points, and put an `x` in all the boxes that apply. --> | ||
<!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> | ||
- [ ] My code follows the code style of this project and passes `yarn run lint`. | ||
- [ ] My change requires a change to the documentation. | ||
- [ ] I have updated the documentation accordingly. | ||
- [ ] My change has adequate Unit Test coverage. | ||
|
||
By creating a Pull Request you agree to our [Code of Conduct](https://github.com/schemar/obsidian-tasks/blob/main/CODE_OF_CONDUCT.md). For further guidance on contributing please see [contributing guide](https://github.com/schemar/obsidian-tasks/blob/main/CONTRIBUTING.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
--- | ||
layout: default | ||
title: Comments | ||
nav_order: 5 | ||
nav_order: 6 | ||
parent: Queries | ||
has_toc: false | ||
--- | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,110 @@ | ||
--- | ||
layout: default | ||
title: Grouping | ||
nav_order: 3 | ||
parent: Queries | ||
--- | ||
|
||
# Grouping | ||
{: .no_toc } | ||
|
||
<details open markdown="block"> | ||
<summary> | ||
Table of contents | ||
</summary> | ||
{: .text-delta } | ||
1. TOC | ||
{:toc} | ||
</details> | ||
|
||
--- | ||
|
||
## Basics | ||
|
||
By default, Tasks displays tasks in a single list. | ||
|
||
To divide the matching tasks up with headings, you can add `group by` lines to the query. | ||
|
||
### Available grouping properties | ||
|
||
You can group by the following properties: | ||
|
||
File locations: | ||
|
||
1. `path` (the path to the file that contains the task, that is, the folder and the filename) | ||
1. `folder` (the folder to the file that contains the task, which will be `/` for files in root of the vault) | ||
1. `filename` (the filename of the file that contains the task, without the `.md` extension) | ||
* Note that tasks from different notes with the same file name will be grouped together in the same group. | ||
|
||
File contents: | ||
|
||
1. `backlink` (the text that would be shown in the task's backlink, combining the task's file name and heading, but with no link added) | ||
1. `heading` (the heading preceding the task, or `(No heading)` if there are no headings in the file) | ||
|
||
Task properties: | ||
|
||
1. `status` (Done or Todo, which is capitalized for visibility in the headings) | ||
* Note that the Done group is displayed before the Todo group, | ||
which differs from the Sorting ordering of this property. | ||
|
||
### Multiple groups | ||
|
||
You can add multiple `group by` query options, each on an extra line. | ||
This will create nested groups. | ||
The first group has the highest priority. | ||
|
||
Each subsequent `group by` will generate a new heading-level within the existing grouping: | ||
|
||
- First `group by` is displayed as `h4` headings | ||
- Second `group by` is displayed as `h5` headings | ||
- Third and subsequent `group by` are displayed as `h6` headings | ||
|
||
See the [screenshots below](#screenshots) for how this looks in practice. | ||
|
||
<div class="code-example" markdown="1"> | ||
Info | ||
{: .label .label-blue } | ||
Headings are displayed in case-sensitive alphabetical order, not the original order. | ||
|
||
--- | ||
|
||
Info | ||
{: .label .label-blue } | ||
The order of operations ensures that grouping does not modify which tasks are displayed, for example when the `limit` option is used: | ||
|
||
1. all the filter instructions are run | ||
1. then any sorting instructions are run | ||
1. then any `limit` instructions are run | ||
1. then finally any grouping instructions are run | ||
|
||
</div> | ||
|
||
|
||
--- | ||
|
||
## Screenshots | ||
|
||
### Before | ||
|
||
Here is an example Tasks result, without any `group by` commands: | ||
|
||
![Tasks Ungrouped](https://github.com/schemar/obsidian-tasks/raw/main/resources/screenshots/tasks_ungrouped.png) | ||
Tasks not grouped. | ||
|
||
### After | ||
|
||
And here is what this might look like, when grouped by folder, filename and heading: | ||
|
||
![Tasks Grouped](https://github.com/schemar/obsidian-tasks/raw/main/resources/screenshots/tasks_grouped.png) | ||
Tasks grouped. | ||
|
||
--- | ||
|
||
## Examples | ||
|
||
```tasks | ||
not done | ||
group by folder | ||
group by filename | ||
group by heading | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
--- | ||
layout: default | ||
title: Layout | ||
nav_order: 3 | ||
nav_order: 4 | ||
parent: Queries | ||
--- | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
--- | ||
layout: default | ||
title: Limiting | ||
nav_order: 4 | ||
nav_order: 5 | ||
parent: Queries | ||
has_toc: false | ||
--- | ||
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.