-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Improve the recording of the search history #9685
Comments
Hello there, Currently being an academic student in the technology & software engineering field, I pursue my first contribution to OSS, and conceive the present issue as an ideal opportunity to start my journey to contributing. Below, my knowledge background, relatively to the issue's software implementation needs.
Getting started with JabRef, I have already overviewed the devs documentation, built from source and run successfully the app. Any further guidelines & directions for the issue's software requirements, appreciated! Thanks in advance, |
@demetres12 Welcome! Thanks for your interest in JabRef. This sounds great already. If you have any questions just ask here |
@Siedlerchr Thank you for the prompt response! I will keep you informed on the progress. |
Hello, Alexandra Stathopoulou |
@Alexandra-Stath These are more like solution suggestions, more than tasks. They can be implemented together, but I think it would be overkill. I say we implement one of them and wait for user feedback. If someone asks for it then we shall provide. In the meantime, you are welcome to check other good first issues; although most of them are assigned. Have a look at the issues and if you find an assigned issue that had no activity for like a month mention me and I'll assign you. |
What?Something else we could take into consideration, relatively to the search recording (this time ui-oriented issue) can be described generally as the addition of a pop-up window, providing info about:
How?So, how i conceive that step-by-step in a simplistic way:
Why?
Thanks in advance for your time. |
Hi @demetres12 Thank you for giving this more thought The pop-up window approach was suggested in a recent PR #9659. The PR was not merged because it was a duplicate. Carl had a few comments about the approach, but nothing that would have prevented merging it. He also suggested using an auto-complete pop-up below the search bar. However, I must point out that the scope of the issue is smaller than you suggest. Of course, you are free to put on more work on this; it will certainly make our users happy, but you don't have to. Thanks again! |
my wrong, didn't check if the issue was referred elsewhere. |
@yenniejunvu @ThiloteE "In principle, yes you can submit a PR for this issue, even though it has been reserved for another student or group of students.". How we define reserved and assigned? Regarding the above situation, I request @Siedlerchr, @HoussemNasri, @koppor comment on the aforementioned situation. Looking forward to seeing your actions. |
@demetres12 I am so sorry about that, for this issue I did not see that you were assigned as I was just perusing good first issues. That is completely my bad. Merging my branches are not necessary / do not require review. I can delete the branch if you would like. As for the PR for #9699, I naively assumed that you guys were not working on it anymore. I kept my PR as a draft and let your partner know that I would not let it be merged unless she was okay with it, but did not get a response. Still, I should not have made that assumption, and for that I apologize. I will no longer work on this current branch, but feel free to take a look at the draft I have so far if you'd like. Again, sorry about that, I will be more aware in the future. |
@yenniejunvu |
Will do. Again, I apologize. Good luck in your uni course. :) Additionally, if you are looking for other good first issues for your class, I recommend the issues where you refactor from a JAXB dependancy to STaX. I believe there are a couple of those issues still open. It is not too difficult once you are familiar with both libraries. |
Thank you @yenniejunvu for your cooperation. I hope this was enough to settle the issues. For context/clarification.
Because I have been cited to support an argument, I want to explain myself. The above and following lines are my (current) personal opinion, which may or may not represent other JabRef maintainers. I will make sure to raise this issue in the next developers call.
|
@ThiloteE |
Taking into account both suggestions, I think that the merge of recorded search queries, while being more reasonal approach, it could return incorrect results. Regarding the attachment of a listener on the focus property, we shall consider the following. The user may interrupt the process of typing in the search box and the focus will be lost, but that doesn't necessarily mean that he won't "come back" and complete the search process. Using the StringSimilarity IsSimilar method, we check if the edit distance between the new search recorded and the older one is less than 4 (based on the METRIC_THRESHOLD variable). CASE A : UNWANTED MERGE There will be one recording for "Dimitriou" and another for "Dimitriadi". So the algorithm checks if there is a similarity between the two of them. Incorrectly,
CASE B : WE NEED MERGE Another example, is if we want to type "Dimitriou", and by mistake we type "Dimt". What we do then is delete of the 't' character and keep going with the rest of the surname.
So, calculating/checking the number of insertions, deletions, and substitutions for transforming a string to another, may be efficient for "h", "he", "hel" etc, but aren't there occasions that will not provide the desired results? ABOUT CASE A ABOUT CASE B My understanding of the improvement of search history storing, is that applying both suggestions could be a way to optimize the recording procedure as there could be many cases that logic errors emerge. @HoussemNasri
|
A. Following the merge recording search queries suggestion,
B. Following the focus listener attachment search queries suggestion,
About testing what I considered to be mirroring properly the issue's resolving is stated below
Any suggestions & directions for my previous comments, appreciated! |
It's a heuristic problem so there are no perfect values, you can play around with different ones and choose the most suitable. Then, you derive a function that given the similarity score and the period between two recordings it can decide whether to replace or add the recording. Also, the similarity threshold doesn't have to be 4, you can use |
So regarding the improvement of recording don't you think that implementing both solutions ( focus lost + (string similarity + close timestamp) would be more appropriate. In case the user, for some reason, leave the search box, edit distance check and timestamp could be another mechanism, ensuring avoidance of not proper recordings. |
In my opinion, if I type Nikola then leave the search box and come back and write Nikolaou, I expect both entries to be recorded. As a general rule, having a missing record is worst than having an extra, just not too much extras as the current behavior. |
devcall: |
As a general advice for newcomers: check out Contributing for a start. Also, guidelines for setting up a local workspace is worth having a look at. Feel free to ask here at GitHub, if you have any issue related questions. If you have questions about how to setup your workspace use JabRef's Gitter chat. Try to open a (draft) pull-request early on, so that people can see you are working on the issue and so that they can see the direction the pull request is heading towards. This way, you will likely receive valuable feedback. |
I played around with this feature locally and I noticed that sometimes if I type the search query slowly enough, some of the prefixes of the query are recorded along the actual query. Not having a search button that starts the search task made it hard to select the correct time to perform the search. Currently, JabRef waits for the search box to be idle for 400ms and then performs the query. This is a good time to show the search results because JabRef will feel more interactive, but not so good for adding the query to the history because the user may be unhappy with the results and continue to modify the query, or he may simply be a slow typist like myself :^)
I gave this some thought and these are a few suggestions:
1. Record query when the search box loses focus
Thinking about the search workflow, it would look something like this:
Looking at the workflow above, it seems best to record the search query after step 4: User selects the entry he/she is searching for a.k.a the search box loses focus.
2. Merge recorded search queries with a certain similarity score that were recorded in a close timestamp
If I want to search for 'hello', in the worst case the search history would record all of the prefixes: 'h', 'he', 'hel', 'hell' and 'hello'. We can develop an algorithm that can understand that all of these queries refer to the same query which is 'hello'. We already have a utility class to calculate the similarity between two strings:
StringSimilarity
, so that's one piece of the problem solved.After a query is recorded the algorithm would loop through the list of the recorded queries and decides if the new query could be an update to an older query. It goes like this:
Originally posted by @HoussemNasri in #9647 (comment)
The text was updated successfully, but these errors were encountered: