Filters for note body, not just backlinks

Is the plugin flow I sent, essentially what you’d want it to do?

  1. Click toolbar
  2. Brings up UI
  3. UI will list every tag that is linked to on the page
  4. If you click the tag, it will turn gray or something
  5. There will be a button for apply filter
  6. Click the button to filter out blocks that link to the “grayed” tag(s)

Not exactly. Let’s say I have a page of recipes marked with the following tags: [[apples]], [[pumpkins]], [[pies]], and [[stews]]

If I click on [[pies]] I wouldn’t want to “filter out” pies, as you suggest in 6, but I would want to filter out everything else (i.e. [[stews]]). In another workflow I would want to filter “for” [[apples]] while filtering “out” [[stews]] at the same time. All this is currently possible in the backlinks filter, and in the in-page filter on Roam (and Dynalist), but for some reason not yet possible in Logseq.

I personally don’t think this should be a plugin but see it as an essential built-in feature. However, perhaps a good plugin could eventually be made part of the default code?

@Aryan I should note that the use-case that most closely resembles your suggested workflow relates to hiding “DONE” task items, and there is already a plugin for this: “Wide Eyed.” What is needed for other workflows is something much more robust and flexible.

Folks, consider voting on this request too:

https://discuss.logseq.com/t/block-level-graph-view/6303

Till the time this feature is launched, is there any workaround to achieve the same outcome? I have recently switched from Roam where I had a dedicated Tasks page, which has now become an infinitely long page on LogSeq.

Sure, I think one reason the developers haven’t made this a priority is that Logseq has two powerful query syntaxes: basic and advanced. The basic syntax is easy enough to learn (see the documentation) and can often accomplish the same thing. I just feel it is a bit much to have to write a query every time you want to accomplish a task that could be more quickly done with a filter… For more on advanced queries, I recommend asking for help in the Discord channel devoted to queries. People there are very helpful.

1 Like

I am already using a query, but there is no way to edit inside query results, right? For example, if I have to add another task to my ‘todo’ I need to go to my original block (which contains all done items as well) and only then reflects in the cleaner query view.

You can switch query results between regular view and table view. If it is regular view you can edit directly. But yes, you can only edit that block, if you want to add another block that isn’t shown in the query you have to navigate back - but this would be the same with filters as well.

Thanks for the quick response. Here’s a screenshot of my query result (in regular view). I am trying to add another item in the todo list but it doesn’t allow me to (unless I add it as a sub-bullet). Am I missing something or is this the expected behaviour?

(A funny way I discovered though is to add a sub-bullet and then drag it to make it a bullet, but just checking if there’s a cleaner way)

This is the expected behavior. It would be the same with a filter though. Any item not in the query or filter would not show up. However, there are some plugins in marketplace that make it easy to generate TODO items in your journal from any page or view, they might help you.

The query Idea sounds good but if I am trying to recall a very specific piece of information really quick it would be easier for me to click the filter button and filter by tag in the main page boddy liek I do on roam.

I feel liek the use case for query is for persistent filtering.

1 Like

I agree. This feature is a priority for me, but I am just speculating why it wasn’t built in from the beginning like in Roam.

5 Likes

What Logseq lacks for me as a user who switched from Roam. It’s the lack of filters in the sidebar, “unlinked referances” and the whole page. I’ve used them quite often. It would be great if these types of filters were in Logseq, and the Link button in “unlinked referances” would also be great if it was added. :slightly_smiling_face:

2 Likes
  1. If you shift-click the tag, all blocks with references to it will dissapear (on that page)
    If you just click the tag, all blocks WITHOUT references to it will disappear, so only those with the tag will remain.

I too think it’s simple, and Roam does it simply too, so it could be a good example (it’s what I’ve described above, but you could see it working like we want)

Thank you!

I’ve never used Roam, but seeing the powerful filter in the linked references section in Logseq made me wonder why it wasn’t built into the page contents itself, too.

If you regularly move stuff from the reference section to the page itself, Logseq becomes less and less powerful.

So, adding my total support for this as a core feature.

+1 for maybe combining the “on-page filter” with an “on-page instant seach” as you suggested here.

But even without the search feature, an on-page filter would be a great improvement already.

This feature alone makes me wait to abandon Roam for good. I am surprised that this has not been implemented in the first place, let alone after people asked for it.

As Luhmann explains here, this basic feature can be quite important for our workflows, and there should be minimal development effort required to realize, since it has already been developed for backlinks. We just ask you to put it in another place.

4 Likes

+1 on that this would be a very good feature. Being able to take a long page and filter out all but certian tags like #comment, #extract

There is. There is a plugin called Style Carousel.
Default setting gives you a button that filters out any blocks that are DONE.
But in the config file you can set it up to hide stuff tagged with any tag you’d like.
I created a “hide” tag. Usually that is enough for my needs, as I do rarely need to filter out multiple tags.

That is only filtering out however. Not sure if this could be turned into “only show tagged with x” filtering (by that I actually mean: it’s probably impossible or if it is, you basically end up rewriting that extension). But apparently the developer has done most of the work it would take to implement Roam-like on-page filtering in Logseq, because he has the “hiding blocks on the page based on their tags” checked.

I am too wondering, why it hasn´t been implemented yet. Seems like an easy thing to do for the developer or some plug-in builders (at least from my very user-based view).

Bump

1 Like