marcusolsson / obsidian-projects

Plain text project planning in Obsidian

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

m-beau opened this issue · comments

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.

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?

Done!

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

  • If various data types are detected in a given column, and by default in general, fallback to 'miscellaneous' (with its own icon, e.g. one denoting binary data in general, 0s and 1s). Miscellaneous would support, text, links, images, dates, tags.
  • If all the fields are filled with strings, set the column data type to 'text'
  • If all the fields with links, to 'link'
  • same for dates, images etc
    Expliciting the data type of the column as above would allow the user to manually enforce either. For instance, one might want to make links non-clickable for aesthetic reasons and enforce the field 'text'. Or one might want to auto-extract dates from strings such as '2022-10-02' by switching from text to date (this requires fancy date formatting in the background).

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.