marcusolsson/obsidian-projects

Allow properties/columns of type "Link" to be used as the 'status' of board views.

Closed this issue · 8 comments

m-beau commented

What would you like to be added?

Currently, only columns of data type 'Text' can be used to serve as a grouping variable to generate a board view. I would like to be able to make boards whose columns have links as grouping variables (an internal link to a note (a Map Of Content), in my case).

Why is this needed?

This will allow to subsitute mere passive column titles by clickable links to map of contents (for instance, 'To Do' might be a note with rich content, backlinks etc instead of a simple title).

As I mentioned in #315, text fields will eventually support links. When they do, I'm not sure there's enough value in a dedicated Link field type.

I'm thinking this issue won't be needed once #315 is implemented. WDYT?

m-beau commented

I gave an opinion in #315 directly: link

Cheers for your work!

Try out the new option for rich text formatting in 1.9.0, which renders links in text fields. It might solve your problem.

m-beau commented

Now, fields with a mixture of single links and list of 2 links (such as "Notes: [[Note 1]], [[Note 2]]" for some rows and "Notes: [[Note 1]]" for others) are not handled anymore: single links are displayed properly, but lists of links lead to a blank cell.

Furthermore, it is still not possible to use a 'link' column as the 'status' of board views, the columns are not listed as options in the dropdown menu of the board view.

(By the way, all my tests are done in dataview-query mode, not folder-query mode :) )

Thanks!

Are you able to share your dataview query (and maybe a screenshot)?

m-beau commented

Sure (apologies for the french):

TABLE
picture as "Picture", MOCs AS "Catégorie"
FROM #recette
WHERE file.name != "Recette template"

Leads to this table view (all empty rows of 'Catégorie' should actually have two links, [[link1]], [[link2]], and the 'Picture' view should contain images):
Screenshot from 2023-01-05 16-48-49

And this board view (clicking on 'status' does not have any effect, there is no dropdown menu):
Screenshot from 2023-01-05 16-49-01

And this gallery view, where 'Picture' is set as the cover:
Screenshot from 2023-01-05 16-50-45

m-beau commented

If I may, my goal is to create a board view where the sorting variable is 'Catégorie', and display the 'Picture' as a cover, like I used to on Notion:
Screenshot from 2023-01-05 16-53-50

The closest I got to was with the 'groupby' parameter of dataview:
Screenshot from 2023-01-05 16-54-34

(by the way, this is the dataviewjs query I used:

let groups = dv.pages("#recette").where(p => p.file.name != "Recette template").groupBy(p => p.MOCs)

for (let group of groups.sort(p => p.key, 'asc')) {
	dv.header(4, group.key);
	dv.table(
		["", ""],
		group.rows
			.sort(k => k.file.mtime, 'desc')
			.map(k => [k.file.link, k["picture"]])
		)
}

)

Thank you, that's helpful! The rich text support is only available for front matter at the moment, but I'm working on the Dataview support.