Allow in:all to be the default search

Continuing the discussion from Surface in:all as an option in the Advanced Search UI:

It turns out that this is not easily done! Hence a new feature request.

In our instance, which utilises group inboxes quite a bit, it is quite common to want to include messages in search. Prepending in:all to a search achieves this, but isn’t something that can be easily taught to users.

Thanks to the wonderful recent work by @zogstrip, this is now possible via the UI. While this is brilliant for our power users, our noob users will take a while to find it, forget to use it, etc etc.

I’d love to have a way to make it the default search for my users (and me!).

2 Likes

Hmm… perhaps you could use JavaScript to add in:all to the search box?

I’ve had a go with some JavaScript, but that is quite beyond me and my dumb AI support it seems. Any suggestions?

Hmm… what about something like:

document.addEventListener("DOMContentLoaded", () => {
  if (window.location == "/search") {
    const searchBar = document.getElementById("someId");
    searchBar.value = "in:all";
  }
});

This is from the top of my head; I don’t have my laptop as I’m on vacation.

The better solution is to use api.onPageChange of the plugin API, but this may still work.