Skip to content

Commit 93ab4dd

Browse files
authored
feat: Add new priorities: highest and lowest (#1943)
* feat: added new priorities: highest and lowest * fixed suggestor unit tests * review changes: fixed priority numbers, changed highest icon * fixed highest priority emoji to a star in a box * fixed edit task modal styling * fixed highest priority emoji to final one * added documentation * review changes: fixed css snippet * review changes: fixed | symbol disappearing in quick reference docs * review changes: fixed edit task view
1 parent 3156647 commit 93ab4dd

28 files changed

+226
-44
lines changed

docs/Advanced/Quickadd.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Task with due date only:
3131

3232
Task with priority and reminder date and due date:
3333

34-
`#task {{VALUE:task name}} ⏰ {{VDATE:reminder date and time,YYYY-MM-DD HH:mm}} {{VALUE:⏫,🔼,🔽, }} 📅 {{VDATE:due date,YYYY-MM-DD}}`
34+
`#task {{VALUE:task name}} ⏰ {{VDATE:reminder date and time,YYYY-MM-DD HH:mm}} {{VALUE:🔺,⏫,🔼,🔽,⏬️, }} 📅 {{VDATE:due date,YYYY-MM-DD}}`
3535

3636
<video controls width="100%">
3737
<source src="https://user-images.githubusercontent.com/38974541/143468599-ae598f7d-cc84-4fc9-8293-eae72cf81f8a.mov" />

docs/Advanced/Styling.md

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ The generic classes are:
8080

8181
In addition to the generic classes, there are [**data attributes**](https://developer.mozilla.org/en-US/docs/Learn/HTML/Howto/Use_data_attributes) that represent the content of the various task components.
8282

83-
A **priority data attributes** named `data-task-priority` represents the specific priority of a class. It can be `high`, `medium`, `low` or `normal`.
83+
A **priority data attributes** named `data-task-priority` represents the specific priority of a class. It can be `highest`, `high`, `medium`, `low`, `lowest` or `normal`.
8484
The `normal` value is special: it is added as a default to a task's upper `task-list-item` even if there is no priority field set for that task.
8585

8686
A **date attribute** represents a due, created, start, scheduled or done date in a format relative to the current date.
@@ -200,6 +200,11 @@ The following rules remove the Tasks priority emoticon and render the tasks' che
200200

201201
<!-- snippet: resources/sample_vaults/Tasks-Demo/.obsidian/snippets/tasks-plugin-priority-as-checkbox-color.css -->
202202
```css
203+
.task-list-item[data-task-priority="highest"] input[type=checkbox] {
204+
box-shadow: 0px 0px 2px 2px var(--color-purple);
205+
border-color: var(--color-purple);
206+
}
207+
203208
.task-list-item[data-task-priority="high"] input[type=checkbox] {
204209
box-shadow: 0px 0px 2px 2px var(--color-red);
205210
border-color: var(--color-red);
@@ -220,6 +225,11 @@ The following rules remove the Tasks priority emoticon and render the tasks' che
220225
border-color: var(--color-cyan);
221226
}
222227

228+
.task-list-item[data-task-priority="lowest"] input[type=checkbox] {
229+
box-shadow: 0px 0px 2px 2px var(--color-green);
230+
border-color: var(--color-green);
231+
}
232+
223233
/* This part removes the regular priority emoticon */
224234
span.task-priority {
225235
display: none;
@@ -457,6 +467,11 @@ span.tasks-list-text {
457467
}
458468

459469
/* Represent tasks' priority with colorful round checkboxes instead of the priority emoticons */
470+
.task-list-item[data-task-priority="highest"] input[type=checkbox] {
471+
box-shadow: 0px 0px 2px 2px var(--color-purple);
472+
border-color: var(--color-purple);
473+
}
474+
460475
.task-list-item[data-task-priority="high"] input[type=checkbox] {
461476
box-shadow: 0px 0px 2px 2px var(--color-red);
462477
border-color: var(--color-red);
@@ -477,6 +492,11 @@ span.tasks-list-text {
477492
border-color: var(--color-cyan);
478493
}
479494

495+
.task-list-item[data-task-priority="lowest"] input[type=checkbox] {
496+
box-shadow: 0px 0px 2px 2px var(--color-green);
497+
border-color: var(--color-green);
498+
}
499+
480500
/* This part removes the regular priority emoticon */
481501
span.task-priority {
482502
display: none;

docs/Advanced/Urgency.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,11 @@ The scores are as follows:
5858
<td><code>0.0</code></td>
5959
</tr>
6060
<tr>
61-
<td rowspan="4">Priority</td>
61+
<td rowspan="6">Priority</td>
62+
<td>Highest</td>
63+
<td><code>9.0</code></td>
64+
</tr>
65+
<tr>
6266
<td>High</td>
6367
<td><code>6.0</code></td>
6468
</tr>
@@ -73,6 +77,10 @@ The scores are as follows:
7377
<tr>
7478
<td>Low</td>
7579
<td><code>0.0</code></td>
80+
</tr>
81+
<tr>
82+
<td>Lowest</td>
83+
<td><code>-0.6</code></td>
7684
</tr>
7785
<tr>
7886
<td rowspan="3">Scheduled</td>

docs/Getting Started/Auto-Suggest.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,9 +174,11 @@ Similarly, you can type some fraction of the word `start` (of whatever length is
174174
| Searchable Text | Text that is added |
175175
| ----------------------------- | -------------------------- |
176176
|| \<new line> |
177+
| 🔺 highest priority | 🔺 |
177178
| ⏫ high priority ||
178179
| 🔼 medium priority | 🔼 |
179180
| 🔽 low priority | 🔽 |
181+
| ⏬️ lowest priority | ⏬️ |
180182
| 🔁 recurring (repeat) | 🔁 |
181183
| every | 🔁 every |
182184
| every day | 🔁 every day |

docs/Getting Started/Priority.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,12 @@ publish: true
99
Tasks can have a priority.
1010
In order to specify the priority of a task, you can append one of the "priority signifiers", shown here in decreasing order of priority:
1111

12-
1. ⏫ for high priority
13-
2. 🔼 for medium priority
14-
3. use no signifier to indicate no priority
15-
4. 🔽 for low priority
12+
1. 🔺 for highest priority
13+
2. ⏫ for high priority
14+
3. 🔼 for medium priority
15+
4. use no signifier to indicate no priority
16+
5. 🔽 for low priority
17+
6. ⏬️ for lowest priority
1618

1719
If a task has no priority at all, it is considered between low and medium priority.
1820
This means that the priority of 🔽 low tasks is considered lower than the priority of tasks without any specific priority.
@@ -35,7 +37,7 @@ Instead of adding the emoji manually, you can:
3537

3638
The following instructions use the priority signifiers in tasks.
3739

38-
- `priority is (above, below)? (low, none, medium, high)`
40+
- `priority is (above, below)? (lowest, low, none, medium, high, highest)`
3941
- [[Filters#Priority|Documentation]]
4042
- `sort by priority`
4143
- [[Sorting#Basics|Documentation]]

docs/Queries/Filters.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -454,14 +454,16 @@ For example:
454454
455455
### Priority
456456
457-
- `priority is (above|below|not)? (low|none|medium|high)`
457+
- `priority is (above|below|not)? (lowest|low|none|medium|high|highest)`
458458
459459
The available priorities are (from high to low):
460460
461-
1. ⏫ for high priority
462-
2. 🔼 for medium priority
463-
3. use no signifier to indicate no priority (searched for with 'none')
464-
4. 🔽 for low priority
461+
1. 🔺 for highest priority
462+
2. ⏫ for high priority
463+
3. 🔼 for medium priority
464+
4. use no signifier to indicate no priority (searched for with 'none')
465+
5. 🔽 for low priority
466+
6. ⏬️ for lowest priority
465467
466468
For more information, see [[Priority|Priorities]].
467469

docs/Queries/Grouping.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,12 @@ For more information, including adding your own customised statuses, see [[Statu
7777

7878
1. `priority`
7979
- The priority of the task, namely one of:
80+
- `Priority 0: Highest`
8081
- `Priority 1: High`
8182
- `Priority 2: Medium`
8283
- `Priority 3: None`
8384
- `Priority 4: Low`
85+
- `Priority 5: Lowest`
8486
1. `urgency` ([[Urgency|urgency]])
8587
- Currently, the groups run from the lowest urgency to highest.
8688
- You can reverse this with `group by urgency reverse`.

docs/Quick Reference.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ This table summarizes the filters and other options available inside a `tasks` b
2525
| `is recurring`<br>`is not recurring` | `sort by recurring` | `group by recurring` | |
2626
| `recurrence (includes, does not include) <string>`<br>`recurrence (regex matches, regex does not match) /regex/i` | | `group by recurrence` | `hide recurrence rule` |
2727
| **[[Filters#Priority\|Priority]]** and **[[Urgency\|urgency]]** | | | |
28-
| `priority is (above, below, not)? (low, none, medium, high)` | `sort by priority` | `group by priority` | `hide priority` |
28+
| `priority is (above, below, not)? (lowest, low, none, medium, high, highest)` | `sort by priority` | `group by priority` | `hide priority` |
2929
| | `sort by urgency` | `group by urgency` | `show urgency` |
3030
| **[[Filters#Filters for File Properties\|File properties]]** | | | |
3131
| `path (includes, does not include) <path>`<br>`path (regex matches, regex does not match) /regex/i` | `sort by path` | `group by path` | |

docs/Reference/Task Formats/Dataview Format.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,10 +105,12 @@ For more information, see [[Dates]].
105105
> These names were chosen for use in Tasks, and are not known to dataview. They can of course be searched in dataview.
106106
107107
```markdown
108+
- [ ] #task Lowest priority [priority:: lowest]
108109
- [ ] #task Low priority [priority:: low]
109110
- [ ] #task Normal priority
110111
- [ ] #task Medium priority [priority:: medium]
111112
- [ ] #task High priority [priority:: high]
113+
- [ ] #task Highest priority [priority:: highest]
112114
```
113115

114116
For more information, see [[Priority]].

docs/Reference/Task Formats/Tasks Emoji Format.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,12 @@ For more information, see [[Dates]].
2323
## Tasks Emoji Format for Priorities
2424

2525
```markdown
26+
- [ ] #task Lowest priority ⏬️
2627
- [ ] #task Low priority 🔽
2728
- [ ] #task Normal priority
2829
- [ ] #task Medium priority 🔼
2930
- [ ] #task High priority ⏫
31+
- [ ] #task Highest priority 🔺
3032
```
3133

3234
For more information, see [[Priority]].

0 commit comments

Comments
 (0)