nothingislost / obsidian-query-control

An experimental Obsidian plugin that adds controls to embedded queries
MIT License
278 stars 16 forks source link

Show more context isn't expanding #21

Open daxmonson opened 1 year ago

daxmonson commented 1 year ago

I've written a query and have embedded it in a note. With query control set to always show additional query result context enabled, I still have to individually click the arrows to the right of each query to show more context. Also the show more context option above all the queries doesn't do anything (all the other options like sorting work).

Any ideas here? Thanks for this great little project, it should be a core feature.

mretier commented 11 months ago

Same issue here

nothingislost commented 11 months ago

Sorry folks, I can't replicate this. Can you either of you provide more detail on how to replicate or maybe a video or screenshots?

mretier commented 11 months ago

Sure. My query looks for all entries with a given heading datestamp and I'd like it to also show what is below that heading all the way up to the next heading.

here is my query:

```query
content: "#### 2023-08-28"
collapsed: false
context: true 

However, it only displays the headings themselves. There is no difference between context: true and context: false. I also tried querying for section and block to no avail.

query

nothingislost commented 11 months ago

Ah, this is a long standing limitation of the native Obsidian search. Show more context really only works well with bullet hierarchies. It doesn't support heading context.

https://github.com/ivan-lednev/better-search-views by @ivan-lednev provides improvements to how heading context is returned

daxmonson commented 11 months ago

That makes sense. I was using it for headings with non-bulleted hierarchies. Have been using better search view for getting more context after headings, but it solves a different use case for me than this plugin. Thanks for the response.

mretier commented 11 months ago

thanks for pointing this out. I found a way to work around this using regex queries. Thanks for the great plugin