blacksmithgu / obsidian-dataview

A data index and query language over Markdown files, for https://obsidian.md/.
https://blacksmithgu.github.io/obsidian-dataview/
MIT License
7k stars 409 forks source link

Inline Field array collapsing in Preview Mode #2199

Open jpfieber opened 9 months ago

jpfieber commented 9 months ago

What happened?

I'm using tasks to record my workout stats, and the tasks include inline fields. One of them is an array of workout sets:

- [f] (type:: Squat) @ (weight:: 150)lbs = (sets:: 8,8,8)

The task displays as it should in Reading mode: [ ] Squat @ 150lbs = 8,8,8 But the sets collapse in Live Preview mode: [ ] Squat @ 150lbs = 8

This doesn't seem like a desirable behavior. Bug?

DQL

No response

JS

No response

Dataview Version

0.5.64

Obsidian Version

1.5.3

OS

Windows

I-Pch commented 9 months ago

I could repro and it seems that in LP, only the last value in the list of sets is actually displayed.

E.g.:

- [f] (type:: Squat) @ (weight:: 150)lbs = (sets:: 8,1,3)

... is rendered, in Live Preview, as:

sets

And in Reading as:

Sets - Reading

As a workaround, maybe you could use something like :

- [f] (type:: Squat) @ (weight:: 150)lbs = (sets:: 8), (sets:: 8), (sets:: 8)

It's a bit redundant but it shouldn't change (I think 🤔) how Dataview sees those 3 sets (i.e.: as a list) while being displayed "as such" in LP 😊

3 sets
jpfieber commented 9 months ago

Thanks, that does seem to work as a workaround! It is a bit ugly though, so I hope the bug is able to be squashed!