-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Restart search button in citation-relation panel should bypass the cache #14764
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
PR Compliance Guide 🔍Below is a summary of compliance checks for this PR:
Compliance status legend🟢 - Fully Compliant🟡 - Partial Compliant 🔴 - Not Compliant ⚪ - Requires Further Human Verification 🏷️ - Compliance label |
||||||||||||||||||||||||||||
PR Code Suggestions ✨Explore these optional code suggestions:
|
|||||||||
|
I think this PR does not closes the issue. The issue description states:
This PR disables the restart button after the citations have been fetched. |
The issue states that after citations are successfully fetched, there is no real possibility to “Restart” the search, and the button becomes misleading. Since a restart is not supported in that state, this PR hides/disables the button once the fetch succeeds and only shows it when an error occurs during the fetch process. I’m happy to consider alternative approaches if you have a different suggestion in mind. |
|
I see. What if the user selects the other provider to search for citations? |
Screen.Recording.2025-12-31.at.01.37.26.movThe left citation side will be refreshed, and the |
|
@koppor is this the behavior you desire? I think it's ok, since the result of a search for citations probably won't change that quickly |
|
Btw the title of the issue was " 'Restart search" should restart search" |
|
Your pull request conflicts with the target branch. Please merge with your code. For a step-by-step guide to resolve merge conflicts, see https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/addressing-merge-conflicts/resolving-a-merge-conflict-using-the-command-line. |
| searchForRelations(citingComponents, citedByComponents, false); | ||
| searchForRelations(citedByComponents, citingComponents, false); |
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.
switch to the tab will not trigger refresh from the remote
| } | ||
| entryEditorPreferences.setCitationFetcherType(newValue); | ||
| searchForRelations(citingComponents, citedByComponents); | ||
| searchForRelations(citingComponents, citedByComponents, true); |
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.
switch the fetcher will not trigger refresh from the remote
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.
the last parameter has been updated to false
| refreshCitingButton.setOnMouseClicked(_ -> searchForRelations(citingComponents, citedByComponents, true)); | ||
| refreshCitedByButton.setOnMouseClicked(_ -> searchForRelations(citedByComponents, citingComponents, true)); |
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.
click refresh button will trigger refresh from the remote
| executeSearch(citationComponents, true); | ||
| executeSearch(otherCitationComponents, true); |
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.
if the DOI is successfully looked up (requested by the user), trigger refresh from the remote
|
Hey @LangInteger ! |
|
@subhramit Hi, yes this PR is ready for review. As mentioned in the introduction, it does two things:
However, I do want to confirm with @koppor , do you want both changes, or the second one is enough? |
Only this, because the user might want to see if there are new cites. |
5881cfb to
d532ff1
Compare
@koppor Ok. I have removed changes for 1. |
User description
Closes #14757
I have made one change:
- 1. Only show the "Restart search" button when the fetch failedSteps to test
Please refer to the video below:
test2.mov
Mandatory checks
CHANGELOG.mdin a way that is understandable for the average user (if change is visible to the user)PR Type
Bug fix
Description
Only show restart search button when citation fetch fails
Trigger searches for both cite and cited sides when switching fetchers
Hide refresh button on successful search completion
Diagram Walkthrough
flowchart LR A["Fetcher Changed"] --> B["Search Both Sides"] B --> C["Cite Search"] B --> D["Cited By Search"] C --> E{Success?} D --> E E -->|Yes| F["Hide Refresh Button"] E -->|No| G["Show Refresh Button"] F --> H["Show Import Button"] G --> HFile Walkthrough
CitationRelationsTab.java
Fix dual-side search and refresh button visibilityjabgui/src/main/java/org/jabref/gui/entryeditor/citationrelationtab/CitationRelationsTab.java
searchForRelationscall to trigger searches for both citeand cited sides when fetcher changes
onSearchForRelationsSucceedto hide refresh button onsuccessful search completion
results
CHANGELOG.md
Document citation-relation panel fixesCHANGELOG.md
for issue "Restart search" should restart search #14757