-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from rbennett00:rbennett00/issue5
Don't show 'sleeping' projects in dropdown
- Loading branch information
Showing
8 changed files
with
140 additions
and
35 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
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,50 @@ | ||
--- | ||
up: | ||
- "[[Welcome]]" | ||
in: | ||
- "[[Collections]]" | ||
created: 2024-02-09 | ||
tags: | ||
- map/view | ||
--- | ||
|
||
This page uses DataviewJS to list all of the projects/efforts in the 'Efforts' folder, grouped by Area (using the area property in the project template), sorted by rank. The first codeblock is more complex because it puts each Area in a callout. If you don't care about that and just want a basic Dataview-style look, you can use the second codeblock instead (just remove the double-% above and below it). I'm still exploring ways to render the top version more elegantly, but am running into some weirness with dataviewjs and tables. | ||
|
||
%% | ||
```dataviewjs | ||
var temp='\n> |Effort|Rank|Status|\n> |--|--|--|'; | ||
for (let group of dv.pages('"Efforts"').groupBy(p => p.area)) { | ||
for (let row of group.rows | ||
.sort(k => k.rank, 'desc') | ||
.map(k => ["[[" + k.file.name + "]]", k.rank, k.project_status])) { | ||
temp +=('\n> |' + row[0] + ' | ' + row[1] + ' | ' + row[2] + '|') | ||
} | ||
let mkdw = '> [!globe]+ ### ' + group.key + temp; | ||
dv.span(mkdw); | ||
temp='\n> |Effort|Rank|Status|\n> |--|--|--|'; | ||
} | ||
``` | ||
%% | ||
|
||
|
||
```dataviewjs | ||
function drawCallout(header, entries) { | ||
header = ">" + header + "\n><p style='height:0px; padding: 0px; margin: 0px;'>"; | ||
let id = (Math.random() + 1).toString(36).substring(14); | ||
let target = `span.dataview.rbennett${id} span div.callout`; | ||
dv.span(header, { cls: `dataview rbennett${id}` }); | ||
let div = document.querySelectorAll(target + " div.callout-content")[0]; | ||
//dv.api.taskList(tasks, false, div, dv.component); | ||
dv.api.table(["Effort","Rank","Status"], entries, div, dv.component); | ||
} | ||
for (let group of dv.pages('"Efforts"').groupBy(p => p.area)) { | ||
drawCallout("[!globe]+ " + group.key, group.rows.sort(k => k.rank, 'desc').map(k => [k.file.link, k.rank, k.project_status])); | ||
} | ||
``` | ||
|
||
|
||
|
||
Back to `= this.up` |
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
49 changes: 49 additions & 0 deletions
49
projects-tasks-demo/Efforts/Get some new flair/Get some new flair.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
--- | ||
up: | ||
- "[[Efforts]]" | ||
project: Get some new flair | ||
created: 2024-02-15 | ||
start_date: 2024-02-15 | ||
project_status: 💤 Sleeping | ||
area: TGI Fridays | ||
dependencies: | ||
product: | ||
stakeholders: | ||
project_team: | ||
tags: | ||
rank: | ||
type: project | ||
template_version: "1.1" | ||
--- | ||
# Project Goals | ||
- x | ||
- y | ||
- z | ||
# Notes | ||
|
||
--- | ||
|
||
> [!multi-column] | ||
>> [!todo]+ Tasks | ||
>> ``` tasks | ||
>> not done | ||
>> description includes 📋[[Get some new flair]] | ||
>> sort by due | ||
>> group by priority | ||
>> short mode | ||
>>``` | ||
> | ||
>>[!hint]+ Meetings | ||
>> ``` dataview | ||
>> list | ||
>> from "Calendar/Meetings" | ||
>> where contains(project, this.file.link) | ||
>> sort meeting_date desc | ||
>> ``` | ||
> | ||
>> [!summary]+ Documents | ||
>> - | ||
>> - | ||
--- | ||
Back to `= this.up` |
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