blacksmithgu / obsidian-dataview

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

Expandable table #1070

Open sascha-andres opened 2 years ago

sascha-andres commented 2 years ago

Is your feature request related to a problem? Please describe.

I'd like to be able to have an overview/detail like table.

Describe the solution you'd like Show only a defined number of columns and an expand button showing additional columns on click. Alternatively I can imagine a popup showing the o

Describe alternatives you've considered Links to detail pages, but navigation gets complex soon

AB1908 commented 2 years ago

Would wrapping it in callouts help as a workaround?

blacksmithgu commented 2 years ago

I think this is best implemented as a dataview extension, as part of the new general UI extensions API I am mulling over.

sascha-andres commented 2 years ago

Would wrapping it in callouts help as a workaround?

I looked at callouts, and while they are interesting they make less sense if you have a large list of data (coming from MetaData of files in one folder). Thanks for the hint though, have to take a deeper look at callouts

panahi commented 2 years ago

Would wrapping it in callouts help as a workaround?

I have a similar usecase (although my lists will always be short, so callouts are perfect for me). I have it working well for a tasklist that I've filtered into several groups via dataviewjs: image

However, I'm having trouble getting everything I want to work. What I'm trying to do is have a list of tasks, and a button for each line that runs a command I've written.

Specifically the complications are:

  1. If I use dv.table or dv.markdownTable it renders very poorly in the callout, but the button works fine via button's createButton
  2. If I use dv.paragraph or dv.view I can easily create the appearance I want, but have to then make my own buttons and/or manage my own eventhandlers

Is there an easier path that I'm missing? I think I prefer the experience of #1 since I'd rather deal with a UI that isn't quite what I want vs relying on even more hacky javascript I've written.

AB1908 commented 2 years ago

Does this help? https://github.com/blacksmithgu/obsidian-dataview/discussions/1430#discussioncomment-3731847

You're right that it's painful to write but you can write a generic view.js that you can reuse everywhere. Blacksmithgu has a lot on his plate and this isn't that high in the priority list, in my understanding.