mgmeyers / obsidian-kanban

Create markdown-backed Kanban boards in Obsidian.
https://publish.obsidian.md/kanban/
GNU General Public License v3.0
3.12k stars 176 forks source link

[Bug]: Dataview cannot be rendered in Kanban #550

Open Missionary-OSBS opened 2 years ago

Missionary-OSBS commented 2 years ago

Describe the bug

I use Dataview to display a list for files. I embedded a file with Dataview List in Kanban card and it would appear the list there. Just recently, the list appears blank.

Expected Behavior

It should display embedded file with Dataview List

Steps to reproduce

Step 1: Create a new file with Dataview List Step 2: Embed the file in Kanban card Step 3: See error: The list is blank

Operating system

macOS

AB1908 commented 2 years ago

Duplicate of #345, #467, #85, #148, #321.

Yunike08 commented 2 years ago

Oh yes, please address this soon. Kanban and Dataview working together is amazing!

Bug In my case, I also use Dataview Tables inside my Kanban cards. However, ever since I updated Dataview from 0.4.26 to 0.5.36, all my Dataview content inside the cards are empty. It does mention how many items are inside the table but not the actual content (birthdays, events, story characters, etc.)

The code I use for this example is

Table without ID
link(file.link, Aliases) AS "Name", Description
From #TC/Plot/CList/Character
Where Type = "storyChar"
Sort file.name

03

If I, however, revert Dataview back to 0.4.26, I get back my content.

Expected Behavior (with the additional number of how many items are there in the table) Dataview table can work inside Kanban board. IMG_20220625_221223

That's the status I'm currently in now. I hope they will work together again.

System Mobile user Android v12 Obsidian version 1,2,2 (56)

AB1908 commented 2 years ago

I have a hunch on what's happening here but not the technical expertise to pin down what/why. I hope mgmeyers can find the time to look at this. Dataview recently changed its rendering to be React based FWIW.

kometenstaub commented 2 years ago

I have a hunch on what's happening here but not the technical expertise to pin down what/why. I hope mgmeyers can find the time to look at this. Dataview recently changed its rendering to be React based FWIW.

What is your hunch?

kometenstaub commented 2 years ago

@AB1908 (forgot to tag you above)

AB1908 commented 2 years ago

I assumed it was related to the order of rendering. Dataview renders before the markdown post processor, at least IIRC, which is what may be interfering here. But if this always happened, the embeds should never have worked in the first place.

TL;DR: I have no clue

salievi commented 2 years ago

Bizarrely, it is working some of the time. If I put the Dataview code in a card and hit return, the code doesn't render (usually it just says "Loading" forever. But if I enter the field to edit it again, then close it using the X on the card (not Enter), it renders. Does this imply a solution?

birgittealstrom commented 1 year ago

If I put the Dataview code in a card and hit return, the code doesn't render. But if I enter the field to edit it again, then close it using the X on the card (not Enter), it renders.

I experience exactly the same.

GarrettKaupp commented 1 year ago

Bizarrely, it is working some of the time. If I put the Dataview code in a card and hit return, the code doesn't render (usually it just says "Loading" forever. But if I enter the field to edit it again, then close it using the X on the card (not Enter), it renders. Does this imply a solution?

This is the same behavior I experience with this bug: #591

When I enable "Show relative date" in the settings, it seems to update all cards on the board and display properly sometimes.

Would be awesome if this was working

shafferchance commented 9 months ago

So it seems part of the reason it will work sometimes and not others comes down to if the query is ready when the List formatter runs on the View for this file. Going to see about making a branch on my fork that waits for these to resolves as a first step towards #345. Which in turn would resolve this issue and act as a way to atleast let our swim lanes be populated via metadata. Ideally transitions would also allow for metadata updates in the future but that is out of scope of this issue.

shafferchance commented 9 months ago

Alright, I'm back again, after some more digging found that the data is coming out of renderMarkdown as expected leaving the issue to React State as both technically use React (however this is more for dataviewjs). So we need a way to connect the two instances. Probably a lift upon a new child being added to the KanbanView by Dataview. If we're working with DQL the nice piece is that we can parse it after and push it into the dom returned therefore eliminating the two separate state issues.

shafferchance commented 9 months ago

Upon disabling Mark from inside of the MarkdownRenderer component the dataviewjs query renders correctly.

image Will look into making these work together, hunch here is the cloneNodemethod is not quite working deeply and/or it disconnects the DataviewJsRenderer from its DOM nodes.

shafferchance commented 9 months ago

Re-enabled mark but removed the cloneNode(true) and now things are working as expected.

@mgmeyers Why was a deepClone used here? Would either removing it entirely or creating a handler of a case with cards containing dataviews aren't clone be an acceptable solution?

shafferchance commented 9 months ago

Ah while testing I think I found the purpose of the clone, looks like if I drag and drop a list all the cards content disappears until I refresh.

Kribbage commented 3 months ago

Is the setting for putting tags at the bottom of the card enabled on this board? I noticed that it yanks and removes any tags in my dataview tables if I have that enabled, was going to submit a report about that, unless this is the same thing.

shafferchance commented 3 months ago

I don't it enabled but we can add it to the scope here for sure

2024年5月22日(水) 2:44 Kribby @.***>:

Is the setting for putting tags at the bottom of the card enabled on this board? I noticed that it yanks and removes any tags in my dataview tables if I have that enabled, was going to submit a report about that, unless this is the same thing.

— Reply to this email directly, view it on GitHub https://github.com/mgmeyers/obsidian-kanban/issues/550#issuecomment-2124338965, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA4TUJEJ6244ZDKRKYVKZSTZDRSJRAVCNFSM5YH723RKU5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TEMJSGQZTGOBZGY2Q . You are receiving this because you commented.Message ID: @.***>