Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Search entry filter helpers #761

Closed
bertob opened this issue Jan 31, 2024 · 8 comments · Fixed by #962
Closed

Search entry filter helpers #761

bertob opened this issue Jan 31, 2024 · 8 comments · Fixed by #962
Labels
enhancement New feature or request
Milestone

Comments

@bertob
Copy link
Contributor

bertob commented Jan 31, 2024

I often find myself wanting to search for a thing I bookmarked or starred, but there's no way to search just those, and the general "post" search is too broad to be useful most of the time. It'd be great if it was possible to either search individual views (e.g. with a search icon in the headerbar), or alternatively, having a more sophisticated filtering in the search view (e.g. a way to filter for things like "my bookmarks", "posts by $USER", "my own posts", and so on).

@bertob bertob changed the title Allow searching in specific views More fine-grained search Jan 31, 2024
@GeopJr
Copy link
Owner

GeopJr commented Jan 31, 2024

I'd say the options are:

  1. search on what's already in memory
  2. wait for mastodon to improve their filters (Support for is:bookmark operator mastodon/mastodon#27155)

  1. I think we've discussed this before but the gist is that all timeline APIs are pagination-based. Say we want to search the active user's bookmarks, we'd have to paginate forever until we get all posts and then search in them (well, we'd search while paginating). This might be ok if the user has like 100 bookmarked posts but when you get to thousands it's very spammy to the instance (and maybe memory intense if we keep them in memory for a while for follow-up searches). What can be done is search on what's already in memory or what's visible
  2. Mastodon does have a filter that has a wider scope but includes bookmarks, in:library. It will return posts that are in your bookmarks, favorites etc. The linked suggestion is for bookmarks only

image

@bertob
Copy link
Contributor Author

bertob commented Jan 31, 2024

Maybe this library thing could be good enough for now, e.g. as a fourth option in the Search view? Does it include my own posts as well or only favorites/bookmarks?

@GeopJr
Copy link
Owner

GeopJr commented Jan 31, 2024

Does it include my own posts as well or only favorites/bookmarks?

It should but you can also pass from:tbernard

Maybe this library thing could be good enough for now, e.g. as a fourth option in the Search view?

Not sure. You'll probably discover that it might be missing some of your posts. That's due to elasticsearch and indexing. Elasticsearch is heavy and many instances don't have it enabled or haven't indexed everything. It might be possible to check if the current instance has elasticsearch enabled but other details might not be available so I'm not sure if it should be very prominent in Tuba. What about a button that opens a dialog with more details and a cheatsheet?

@GeopJr
Copy link
Owner

GeopJr commented Jan 31, 2024

The web client displays them but doesn't really explain what they do

image

@bertob
Copy link
Contributor Author

bertob commented Jan 31, 2024

Oh nice, yeah if we just had GUI support (i.e. exposing which filters there are, autocomplete for users, date chooser for dates, etc.) for those features in the search view it'd cover the described use cases I think.

@GeopJr GeopJr added the enhancement New feature or request label Jan 31, 2024
@GeopJr GeopJr changed the title More fine-grained search Search entry filter helpers Jan 31, 2024
@nekohayo
Copy link

nekohayo commented Feb 29, 2024

Until there is a Nautilus-like filtering UI with widgets to make this easy, how about using a GtkTooltip (or a cheatsheet popover widget from a clickable icon in the GtkEntry, maybe) to give the user hints and examples of valid search syntax? We do this in GTG for the quick-add entry field simply using a tooltip, but we also had the idea to use a popover widget for the searchentry that has more complex syntax: getting-things-gnome/gtg#725

Even if you have a set of filter widgets eventually, it would still be great to keep the self-documenting UI cheatsheets to let the user know about the freeform syntax that can be used in the search field. Even if I could read about it on some website or help page, I can never remember it; it should be right there in the UI.

@GeopJr
Copy link
Owner

GeopJr commented Mar 6, 2024

I was thinking something similar to twitter's advanced search as a start and we can then iterate later (autocomplete, widgets in entry...):

Screencast.from.2024-03-06.14-54-18.webm

Since filter support depends on the instance, it will be transparent and fill the search entry (and do the search) rather than do a search in the background with the filters without showing them to the user

@GeopJr GeopJr added this to the 0.8.0 milestone May 29, 2024
@GeopJr
Copy link
Owner

GeopJr commented May 30, 2024

PRed on #962

I'm not super fond of it tbh.

  • It can read already written queries and populate the dialog from it
  • The banner is wordy but needed. AFAIK, only Mastodon supports these filters and only if they have full text search enabled (which is heavy and expensive so most smaller instances don't have it enabled. AFAIK, non-admins cannot know if it is so I cannot show it conditionally)
  • The invert filter (-is:reply) tip should also be noted somewhere, not sure if that's the best place. It's a bit hard to transform it into GUI because it's 3 states: invert, none, enabled (-is:reply vs nothing vs is:reply)

image

Screenshot from 2024-05-30 04-53-59
Screenshot from 2024-05-30 04-54-14
Screenshot from 2024-05-30 04-54-23

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants