-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Show DOI lookup link in citation relations tab #13285
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
base: main
Are you sure you want to change the base?
Conversation
Please fix the failing tests and follow the correct format for the PR description and title (check other prs for reference) |
jabgui/src/main/java/org/jabref/gui/entryeditor/citationrelationtab/CitationRelationsTab.java
Show resolved
Hide resolved
jabgui/src/main/java/org/jabref/gui/entryeditor/citationrelationtab/CitationRelationsTab.java
Show resolved
Hide resolved
jabgui/src/main/java/org/jabref/gui/entryeditor/citationrelationtab/CitationRelationsTab.java
Show resolved
Hide resolved
jabgui/src/main/java/org/jabref/gui/entryeditor/citationrelationtab/CitationRelationsTab.java
Show resolved
Hide resolved
jabgui/src/main/java/org/jabref/gui/entryeditor/citationrelationtab/CitationRelationsTab.java
Show resolved
Hide resolved
jabgui/src/main/java/org/jabref/gui/entryeditor/citationrelationtab/CitationRelationsTab.java
Show resolved
Hide resolved
CHANGELOG.md
Outdated
@@ -1575,6 +1576,7 @@ Note that this project **does not** adhere to [Semantic Versioning](https://semv | |||
- We added the ability to use negation in export filter layouts. [#5138](https://github.com/JabRef/jabref/pull/5138) | |||
- Focus on Name Area instead of 'OK' button whenever user presses 'Add subgroup'. [#6307](https://github.com/JabRef/jabref/issues/6307) | |||
- We changed the behavior of merging that the entry which has "smaller" bibkey will be selected. [#7395](https://github.com/JabRef/jabref/issues/7395) | |||
- we added a new |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
artifact?
@trag-bot didn't find any issues in the code! ✅✨ |
.onSuccess(doiIdentifier -> { | ||
if (doiIdentifier.isPresent()) { | ||
entry.setField(StandardField.DOI, doiIdentifier.get().asString()); | ||
searchForRelations(entry, listView, abortButton, refreshButton, searchType, importButton, progress, shouldRefresh); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you are introducing a recursive cascade here with endless creation of UI elements.
This needs to be done differently.
Extract the background task. put the result in a property. update the view if the property is modified.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -434,13 +444,29 @@ protected void bindToEntry(BibEntry entry) { | |||
*/ | |||
private void searchForRelations(BibEntry entry, CheckListView<CitationRelationItem> listView, Button abortButton, | |||
Button refreshButton, CitationFetcher.SearchType searchType, Button importButton, | |||
ProgressIndicator progress) { | |||
ProgressIndicator progress, boolean shouldRefresh) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
avoid magic booleans. if someone calls searchForRelations(...,...,true), nobody knows what true means. this may be done for simple methods, but for a recursive method self-documenting code is most important.
Closes #13234
This PR enhances the "Citation relations" feature by making the "Look up a DOI and try again." text a clickable hyperlink. On clicking, the text changes to "Looking up DOI...". Based on the lookup result:
If a DOI is found, it is used for citation relations.
If no DOI is found, a notification "No DOI found" is shown and the link resets to its original state.
Steps to test
Add a paper in jabRef entry editor.

Go to citation relations. You will see hyperlink. Click on that hyperlink.
Mandatory checks
CHANGELOG.md
described in a way that is understandable for the average user (if change is visible to the user)