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

Better search #332

Merged
merged 51 commits into from
Nov 27, 2015
Merged

Better search #332

merged 51 commits into from
Nov 27, 2015

Conversation

koppor
Copy link
Member

@koppor koppor commented Nov 13, 2015

This PR is intended to work on the search capability.

It includes #307 and should include #162.

There is an ongoing discussion of features at #104 (comment).

  • concurrency bug as data structures are shared (boolean)
  • documentation update (english)
  • documentation update (german)
  • disable/enable open in new window and global search only when a search has been executed previously
  • Why is "Regex" search enabled by default? I would have expected it to be turned off as default. (I reset my preferences and started a vanilla JabRef".
  • Remove debug output
  • ESC should leave the search and focus the currently selected entry
  • I pressed CTRL+f multiple times. The view changed (behavior due to old JabRef behavior, I would like to have that removed).
  • Further, I cannot switch back from "Filter" to "Float". Have to restart JabRef. Steps: "Float" is activated. Search for a string where you can see the floated area. Switch to "Filter". OK. Switch back to "Float": Nothing happens. After a restart, float works as usual.
  • Preview is broken in combination with the new search. When switching from "Float" to "Fitler" and back: The preview panel constantly updates and the empty area above the entry grows and grows. However, this is a separate issue. --> fixed as this was a larger concurrency issue as a lot of code was NOT executed on the Swing EDT...
  • Search is not aware of currently active groups. Hence, the displayed search results (found x matches) may be strange to the user when no entries are shown at all.
  • When the advanced search is active, the search icon on the left is marked red.
  • CRITICAL Focus is lost from the search window sometimes as the entry editor can grab the focus in some cases. Fixed by removing the set focus upon changing the entry editor tab.

# Conflicts:
#	build.gradle
#	build.xml
#	src/main/java/net/sf/jabref/BasePanel.java
#	src/main/java/net/sf/jabref/EntryEditor.java
#	src/main/java/net/sf/jabref/EntryEditorTab.java
#	src/main/java/net/sf/jabref/JabRefFrame.java
#	src/main/java/net/sf/jabref/JabRefPreferences.java
#	src/main/java/net/sf/jabref/SearchManager2.java
#	src/main/java/net/sf/jabref/autocompleter/AbstractAutoCompleter.java
#	src/main/java/net/sf/jabref/autocompleter/CrossrefAutoCompleter.java
#	src/main/java/net/sf/jabref/autocompleter/DefaultAutoCompleter.java
#	src/main/java/net/sf/jabref/autocompleter/EntireFieldAutoCompleter.java
#	src/main/java/net/sf/jabref/autocompleter/NameFieldAutoCompleter.java
#	src/main/java/net/sf/jabref/gui/AutoCompleteListener.java
#	src/main/java/net/sf/jabref/gui/MainTable.java
#	src/main/java/net/sf/jabref/gui/MainTableSelectionListener.java
Conflicts:
	CHANGELOG
	src/main/java/net/sf/jabref/Globals.java
	src/main/java/net/sf/jabref/JabRefPreferences.java
	src/main/java/net/sf/jabref/exporter/layout/LayoutEntry.java
	src/main/java/net/sf/jabref/gui/BasePanel.java
	src/main/java/net/sf/jabref/gui/IncrementalSearcher.java
	src/main/java/net/sf/jabref/gui/JabRefFrame.java
	src/main/java/net/sf/jabref/gui/PreviewPanel.java
	src/main/java/net/sf/jabref/gui/SearchManager.java
	src/main/java/net/sf/jabref/gui/entryeditor/EntryEditor.java
	src/main/java/net/sf/jabref/gui/entryeditor/EntryEditorTab.java
	src/main/java/net/sf/jabref/gui/fieldeditors/JTextAreaWithHighlighting.java
	src/main/java/net/sf/jabref/logic/autocompleter/AbstractAutoCompleter.java
	src/main/java/net/sf/jabref/logic/autocompleter/AutoCompleter.java
	src/main/java/net/sf/jabref/logic/autocompleter/AutoCompleterFactory.java
Conflicts:
	CHANGELOG
	src/main/java/net/sf/jabref/gui/SearchManager.java
Revert changes resulting from running the code formater of eclipse
… a toolbar using icons for the search options, adding a field stating the search results, search results are shown after each change of the search parameters
…g search window.

TODO: settings menu, some TODOs in the code in which other classes want to listen to search changes.
# Conflicts:
#	CHANGELOG
#	src/main/java/net/sf/jabref/SearchManagerNoGUI.java
#	src/main/java/net/sf/jabref/gui/JabRefFrame.java
#	src/main/java/net/sf/jabref/gui/PreviewPanel.java
#	src/main/java/net/sf/jabref/gui/SearchManager.java
#	src/main/java/net/sf/jabref/gui/entryeditor/EntryEditor.java
#	src/main/java/net/sf/jabref/gui/fieldeditors/TextArea.java
#	src/main/java/net/sf/jabref/gui/fieldeditors/TextField.java
#	src/main/java/net/sf/jabref/logic/search/describer/ContainsAndRegexBasedSearchRuleDescriber.java
#	src/main/java/net/sf/jabref/logic/search/describer/GrammarBasedSearchRuleDescriber.java
#	src/main/java/net/sf/jabref/util/ManageKeywordsAction.java
#	src/main/java/net/sf/jabref/util/Util.java
#	src/test/java/net/sf/jabref/gui/autocompleter/AutoCompleterTest.java
…e EDT thread where it should have been executed. This is probably still an issue at the moment! Nevertheless, this fixes the preview bug. And does cleanup of the PreviewPanel class, fixing additional bugs with it.
@simonharrer
Copy link
Contributor

Fixed all existing issues. Please test it again as this uncovers a lot of issues that are related to the search in other components....

@matthiasgeiger
Copy link
Member

👍

@koppor
Copy link
Member Author

koppor commented Nov 26, 2015

Works good on my site. I don't use groups 😇.

The only thing I noticed is an issue with the key/value-search

I expected

kopp leymann

and

author=kopp author=leymann

To reveal the same results.

However, I have to add an and inbetween:

author=koppor and author=leymann

Maybe, that's a really different issue.

@matthiasgeiger
Copy link
Member

And this is not introduced by this PR ;-)

@simonharrer
Copy link
Contributor

This is why you have to read the HELP file ;) Btw. when hovering over the search query, you get a description what will be searched for.

@koppor
Copy link
Member Author

koppor commented Nov 26, 2015

I like the indication of the advanced search. Possibly, we could use a really different icon? I think, we only use colors for changing the background, not the font itself. If we decide to really change the color, it should be more like black or something. Red is a signal color and is typically used to indicate that something is wrong. See also the highlighting in the box if nothing is found.

Quick rendering proposal: Mirror the glass so that the circle is shown at the upper right corner. Do not change the color at all. Or use one of following icons: torch, eye

@simonharrer
Copy link
Contributor

Changing

  • background looks awful
  • color black: is hard to see the change
  • mirror is too hard to see
  • other icon: torch I could not find in the material design icons. Eye is already used elsewhere.

Hence, I leave it at red for the moment.

@koppor
Copy link
Member Author

koppor commented Nov 26, 2015

Permalinks did not work here. Damn it, I can't find the torch here again. Will try later on again and send a screenshot ;)

…it lost and put into the entry editor field. This is extremely annoying.
@koppor
Copy link
Member Author

koppor commented Nov 26, 2015

The name I meant was "flashlight". Sorry.

If that doesn't work out, please try color rgb(102, 255, 255)

grabbed_20151126-181814

@simonharrer
Copy link
Contributor

Your suggested color would also be ok. I do not like it when the icon changes. This is confusing.

@simonharrer
Copy link
Contributor

I think we can merge this in. The problem by combining group selection and search is a much bigger effort which at the moment there is not time for. The current improvements should be good enough. Search is on my machine (i7, 8gb ram, ssd) very very fast, even with a 6800-entry-bibtex-file it is still usable with only short wait times. The problem is not the search itself, but the GUI updates associated with it. This may be optimized later on if an issue arises.

@koppor
Copy link
Member Author

koppor commented Nov 27, 2015

LGTM 👍

matthiasgeiger added a commit that referenced this pull request Nov 27, 2015
@matthiasgeiger matthiasgeiger merged commit 446a593 into master Nov 27, 2015
@stefan-kolb stefan-kolb deleted the uisearchhistory branch November 27, 2015 13:24
@koppor koppor added the search label Nov 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants