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 should retain the settings used for the most recent search #1652

Open
alanfgh opened this issue Aug 23, 2018 · 13 comments · Fixed by #2457
Open

search should retain the settings used for the most recent search #1652

alanfgh opened this issue Aug 23, 2018 · 13 comments · Fixed by #2457
Labels
enhancement Issue that describes a problem that requires a change in the current functionalities of Tatoeba.

Comments

@alanfgh
Copy link
Contributor

alanfgh commented Aug 23, 2018

REQUEST: A search, especially for a logged-in user, should retain all the settings used for the most recent search, except perhaps for the search string itself.

I typically do searches like this:

"Choose all English sentences owned by self-identified natives containing the specified search string that are directly linked to Russian sentences; list them in random order."

or like this:

"Choose all Russian sentences by self-identified natives containing the specified search string that are directly linked to English sentences; list them in random order."

or like the previous query except excluding rather than limiting the results to sentences that are directly linked to English sentences.

While a few of the parameters differ between the searches, a number of the non-default parameters ("owned by a self-identified native", "list in random order") are constant across all of them. I find it annoying to have to set the same settings for each query. I realize that it's possible to set up bookmarks to recurring queries, but this is a pain to do for every type of query on every device on which I might be running them. It seems to me that using the parameters for the last search is a good starting point for a new search.

Even if it turns out that many people want to keep the existing behavior, where default parameters are chosen for all the parameters, I would be happy to have an option that uses the "sticky" behavior instead, and I wouldn't mind having to select it once explicitly.

@trang trang added the enhancement Issue that describes a problem that requires a change in the current functionalities of Tatoeba. label Aug 24, 2018
@jiru
Copy link
Member

jiru commented Aug 29, 2018

A very easy way to solve your problem (but probably not the best) is to add an additional "search" button that would open the search in a new tab or window instead of the current page. This way, you could for example open https://tatoeba.org/sentences/advanced_search, fill the form, click on that new "Advanced search (new tab/window)" button, then change just one criterion and run the search again. This can be achieved with that kind of code. I don’t like this solution however, because it adds yet another element to this already bloated form.

@alanfgh
Copy link
Contributor Author

alanfgh commented Aug 30, 2018

Adding another element to the form wouldn't bother me. What would bother me is the fact that if I didn't already have a window open with the criteria I wanted, I would be forced to specify them, even if I had run the search previously (in a window or tab that I no longer had open). I'd like cookies to remember that I chose "owned by a self-identified native" and "list in random order" last time I ran a search.

In fact, I do very frequently open my searches in new tabs or windows. I can do this with a right-click, so I don't need the form to help me with it.

@ckjpn
Copy link

ckjpn commented Mar 19, 2019

Re: "Choose all English sentences owned by self-identified natives containing the specified search string that are directly linked to Russian sentences; list them in random order."

Temporarily, you can use this.

http://study.aitech.ac.jp/tatoeba/translate/links3.php?f=eng&t=rus

@trang
Copy link
Member

trang commented Aug 4, 2020

@alanfgh We have now the possibility to create search templates from the advanced search form.

For example, here's a search template I just created:
https://tatoeba.org/eng/sentences/advanced_search?query=this+is+an+example&from=eng&to=por&user=&orphans=no&unapproved=no&has_audio=&tags=&list=&native=yes&trans_filter=limit&trans_to=und&trans_link=&trans_user=&trans_orphan=&trans_unapproved=&trans_has_audio=&sort=random&sort_reverse=

You can create such templates with the button "Create a search template" at the bottom of the form.

This isn't exactly what you asked (that is to retain the most recent search), but with such a feature, it might be no longer necessary to retain the most recent search. What do you think?

@trang trang linked a pull request Aug 4, 2020 that will close this issue
@ckjpn
Copy link

ckjpn commented Aug 5, 2020

It would also be useful to add this option at the bottom of the advanced search options that show up on the right side of the page, so members could create a template after a search has been made.

Screen Shot 2020-08-05 at 9 03 42

@ckjpn
Copy link

ckjpn commented Aug 5, 2020

Question: How do you access the saved template(s)?

I created one, then went back to https://tatoeba.org/eng/sentences/advanced_search and couldn't find it.

@trang
Copy link
Member

trang commented Aug 5, 2020

Question: How do you access the saved template(s)?

You have to bookmark the URL. This is not saved in Tatoeba.

@ckjpn
Copy link

ckjpn commented Aug 5, 2020

We've always been able to bookmark URLs, haven't we?
What additional capabilities does this add?

@trang
Copy link
Member

trang commented Aug 7, 2020

The advanced search form couldn't be bookmarked with prefilled values.

You could only bookmark search results, which means that if you wanted to load specific search criteria, you always had to perform a search.

Now it's possible to load search criteria without performing a search.

@alanfgh
Copy link
Contributor Author

alanfgh commented Aug 7, 2020

Unfortunately, the search templates don't help me. I already know how to save search queries on my own, and I use that functionality in Firefox on Windows.

Now it's possible to load search criteria without performing a search.

I would probably want to test out a search anyway if I were going to save it, so this wouldn't offer any advantage.

In my mind, "Create a search template" suggests to me that Tatoeba is going to hold onto it for me, and potentially allow me to use it across devices. If that's not the case, I think the only thing the option would do would confuse people.

In any case, this is getting pretty far away from my original suggestion, which was "keep all parameters from the last query in the next query that I run".

@ckjpn
Copy link

ckjpn commented Aug 8, 2020

I wonder if having this "Create a search template" thing might be more confusing than helpful.
Perhaps, you may want to consider removing it, unless it's going to be updated in some way.

It doesn't really matter to me, but if this were my site, I'd probably delete it, and possibly put in on the back burner for future development.

@trang
Copy link
Member

trang commented Aug 9, 2020

@alanfgh

You mentioned in the original description of this issue:

While a few of the parameters differ between the searches, a number of the non-default parameters ("owned by a self-identified native", "list in random order") are constant across all of them. I find it annoying to have to set the same settings for each query.

This is actually the main problem that the "search template" is attempting to solve. The templates would allow you to save these constant criteria as a bookmark and you would open the bookmark instead of manually re-entering the criteria when you want to perform one of the searches you typically do.

But it seems that this problem was only secondary to you, and what you lacked the most was the possibility to easily share these searches between devices. Is that correct?

If that was the main problem, then I would rename this issue to emphasize more on the need to save the search criteria in a way that the user can more conveniently perform again when switching to another device.

But for this problem, rather than retaining the most recent search, I think best would be to have some way to "favorite" a search. Then the last 5 or 10 favorited searches could be displayed below the form on the advanced search page.

  • If you want to perform a completely new search, you don't have to bother with resetting the form as it would always be blank by default.
  • If you want to perform a frequent search, you scroll down a bit and click on one of the search links that you favorited.
  • If you would sometimes want only to load the search criteria but not perform the search itself (because you want to adjust one criterion before performing the search), then there could be two buttons "Go to search results" and "Load search criteria".

In the meantime, you could perhaps mitigate this problem with other solutions:

  • You can install an add-on to sync your bookmarks between devices. Then you can bookmark your frequent search so that you can access them across different devices.
  • You can also just log in with your Firefox account to Firefox, or Google account to Chrome. Both have bookmark sync features.
  • Or you could save the search links in your profile. When you are on another device, you would visit your own profile and click on the links to load searches that you often perform.

@ckjpn @alanfgh

As for the fact that the "search template" feature is currently misleading, I created another issue: #2501.

@alanfgh
Copy link
Contributor Author

alanfgh commented Aug 9, 2020

I am looking for a way that lets me generate queries with my own default settings as quickly as possible. I'm not married to the idea of repeating the parameters from the last query if there's a better way for me to quickly pull up the query I want. To fill out the picture:

(1) There are several queries that I often perform these days:
(a) Russian to "any" in random order
(b) English to Russian in random order
(c) Hebrew to "any" in random order
(d) English to Hebrew in random order
(e) French to "any" in random order
(f) English to French in random order

(2) I frequently work on Firefox+Windows on a desktop, and Chrome+Android on mobile devices (tablet and phone).

(3) I need to be able to select the query I want quickly.

(4) Due to privacy and other concerns, I don't want to always browse within a Firefox account. Nor do I want to always be logged into Google, especially on Windows. In any case, I have multiple Google accounts.

(5) On Windows, I use Firefox's keyword shortcut feature. This means that, for example, I can produce this bookmarked URL corresponding to search 1a above:

https://tatoeba.org/eng/sentences/search?query=%s&from=rus&to=und&orphans=no&unapproved=no&user=&tags=&list=&has_audio=&trans_filter=limit&trans_to=und&trans_link=&trans_user=&trans_orphan=&trans_unapproved=&trans_has_audio=&sort=random

where "%s" is a placeholder for the search string. Then I can assign the name "tatrtoa" ("Tatoeba Russian to any") to the bookmark. Now, I can type the following into the URL bar:

tatrtoa да

to search for the string "да". I can assign the name "tatetor" to search 1b, "tathtoa" to search 1c, and so on. This works fine for me. It allows me to do the search I want just by typing the query template name followed by the search string.

(6) Unfortunately, on Android, the picture is different. Neither Chrome nor Firefox on Android, as far as I can tell, has a good equivalent to the Firefox-on-Windows keyword shortcut feature, or at least I haven't been able to find one. Chrome does let you define custom "search engines", but I'm not sure whether you could have a different "search engine" for searches 1a, 1b, etc. In any case, I don't think you can pull them up by name; you probably need to pick them from a drop-down list. In any case, I have not gotten this to work well.

As a workaround, on Chrome, I created bookmarks named "tatrtoa", "tatetor", etc., with "%s" (encoded form: "%25s") in place of the search string. Now when I want to do search 1a, I type one of the keywords into the URL bar. I then need to allow the search to complete, which it does without finding any results (because we have no sentences that contain "%s") before doing the search that I want. I also took your suggestion and put links to these six searches into my profile.

Having a feature called "favorite searches" accessible from Tatoeba would definitely help, as long as accessing it didn't take too much time. However, I prefer to think of it as "my saved searches", since I can't mark someone else's search a "favorite" the way I can with someone else's sentence.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Issue that describes a problem that requires a change in the current functionalities of Tatoeba.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants