marcusolsson / obsidian-projects

Plain text project planning in Obsidian
Apache License 2.0
1.48k stars 60 forks source link

Support of heterogeneous data types in a given property/column. #315

Open m-beau opened 1 year ago

m-beau commented 1 year ago

What would you like to be added?

1) In particular, being able to make internal links or images be respectively clickable and visible in Text columns (it works with dataview tables!)

2) Related but not similar: manually enforce the data type of a given column. For instance, enforcing the conversion of a Links column in a Text column (similarly to what can be done in Notion or even obsidian-database-plugin).

Why is this needed?

Sometimes, a given property can have several data types. For instance, a mixture of internal links, images and text. Currently, when this happens, the column data type falls back to 'Text' and the links become unclickable and the images invisible.

marcusolsson commented 1 year ago

Both of your suggestions are definitely coming! To be honest, I'm not super happy with the Link field type at the moment.

Since it's two different features however, would you mind extracting one of them into its own issue so that we can track them separately?

m-beau commented 1 year ago

Done!

I am not sure of what the best implementation might be, but maybe something like the following:

OR

Always support diverse data types in the background, and rather name the data type of columns purely based on their meta-type (multi-select, single-select, formula...), not caring at all whether the elements returned by these meta types are strings, images, links, tags... And the 'status' field of the board views would require the column meta-type to be 'single select', very much like Notion.

scottbolte commented 7 months ago

Rather than create a new feature request, I have two use cases for this one:

  1. If the property's value is an internal link please make it clickable. For example, in the frontmatter I have parent: "[[Obsidian MOC]]". In each project view (e.g., Table, Board) I currently see the simple text "[[Obsidian MOC]]". Even if the enclosing square brackets are still shown for clarity, or perhaps to allow direct editing, having the contents to be a clickable link would be very handy.

  2. A variation on use case 1 is when the frontmatter property is actually a list of links. I use depends on: [...] and then refer to other project tasks ala [[Project A]] and [[Project B]]. Would be nice if in a project views each note's presentation of depends on could have multiple links, each clickable and each on their own line.

Acylation commented 7 months ago

Hi @scottbolte , for these cases you mentioned, you can try richText formatting. This can be found in Table view column drop-down. Once enabled for text/list fields, the internal links should be recognized and parsed to be clickable. Feel free to ask if there are something still unclear.

scottbolte commented 7 months ago

Thank you @Acylation, richText formatting is the feature I did not know I needed!

Enabling richText works great for singular values in the Table, Gallery and Board views. It also works for a list of links, but only in the Table view. In the other views the links still retain the [[...]], are not clickable, and are shown in red (see below). Unless I'm missing something, that's a bug. Do you want me to open a bug report?

image