Open-blocks level and collapsed block threshold for advanced query output

In the current version 0.6.6 of Logseq, the child blocks of an advanced query output are always fully collapsed. The state of the parent block in the query output can be controlled by the :collapsed? true statement, but we don’t have any control on the child blocks.

So, in line with the options we get for the linked references, eg.

:ref/default-open-blocks-level 3
:ref/linked-references-collapsed-threshold 10

A similar option that sets the open-blocks-level or collapsed-threshold can be given for the advanced query output in the config.edn file, that will give up more control on how the query outputs are displayed on the page.


A possible use case: Self populating pages

In my workflow, I add all relevant tags to a block as a block-property, eg. meeting, task, project-name etc., which all reside on a single Logbook or Daily journal page, and then the project pages are self-populated through advance queries looking for a particular project/tag combination. This greatly simplifies the workflow, as there is not need to manually put block references or embeds in the project pages, and just based on the tag, a block can automatically appear in multiple locations!

You can see that, in this scenario having all the blocks of the query output always fully collapsed can be a big pain-point :slight_smile: So having the functionality of collapsed-block threshold would be a great help, as we can set it to show only till level 1 or 2, thus avoiding loading large pages and at the same time show enough information to make the page useful.

I would very much like to have something like this. For the default queries that show up in my home journal page I only want to see the first level of each hit. As far as I know the current settings only have options for completely collapsing the query itself or not, but no ability to specify open-blocks-level?

1 Like

Hey, did you ever figure out a solution to this? I also want my queries to list only TODOs without nested bullets under TODOs

I use a CSS hack.

#today-queries .custom-query .block-children-container {
    display: none;