Fix citations fetcher name overlaps with citation key #15047#15076
Conversation
|
Hey @Gabriele-DM-unimol! 👋 Thank you for contributing to JabRef! We have automated checks in place, based on which you will soon get feedback if any of them are failing. We also use Qodo for review assistance. It will update your pull request description with a review help and offer suggestions to improve the pull request. After all automated checks pass, a maintainer will also review your contribution. Once that happens, you can go through their comments in the "Files changed" tab and act on them, or reply to the conversation if you have further inputs. You can read about the whole pull request process in our contribution guide. Please ensure that your pull request is in line with our AI Usage Policy and make necessary disclosures. |
Review Summary by QodoFix Citation Relations tab UI overlap with responsive labels
WalkthroughsDescription• Fix UI label overlap in Citation Relations tab with responsive widths • Add text ellipsis for long entry titles to prevent component overlap • Implement HGrow priority for labels to adapt to available space • Adjust AnchorPane right anchor constraints for proper layout Diagramflowchart LR
A["Long Entry Title"] -->|triggers overlap| B["Citation Labels"]
B -->|before fix| C["Labels overlap buttons"]
B -->|after fix| D["Responsive widths + Ellipsis"]
D --> E["Proper layout with HGrow"]
File Changes1. jabgui/src/main/java/org/jabref/gui/entryeditor/citationrelationtab/CitationRelationsTab.java
|
Code Review by Qodo
✅ 1.
|
|
You have removed the "Mandatory Checks" section from your pull request description. Please adhere to our pull request template. |
|
Note that your PR will not be reviewed/accepted until you have gone through the mandatory checks in the description and marked each of them them exactly in the format of |
✅ All tests passed ✅🏷️ Commit: de4e0a3 Learn more about TestLens at testlens.app. |
…m/Gabriele-DM-unimol/jabref into fix/citation-relations-ui-overlap
|
I've refactored the layout to use HBox instead of AnchorPane and removed the hard-coded anchors as suggested by Qodo. This makes the UI responsive and handles text truncation correctly. @Siedlerchr What do you think? Thanks in advance. |
|
Hi. What can I do now? |
| TaskExecutor taskExecutor, | ||
| BibEntryTypesManager bibEntryTypesManager, | ||
| SearchCitationsRelationsService searchCitationsRelationsService) { | ||
| public CitationRelationsTab(DialogService dialogService, UndoManager undoManager, StateManager stateManager, FileUpdateMonitor fileUpdateMonitor, GuiPreferences preferences, TaskExecutor taskExecutor, BibEntryTypesManager bibEntryTypesManager, SearchCitationsRelationsService searchCitationsRelationsService) { |
There was a problem hiding this comment.
Please revert this formatting change here; it makes it harder to read
| fileUpdateMonitor, | ||
| taskExecutor | ||
| ); | ||
| this.citationsRelationsTabViewModel = new CitationsRelationsTabViewModel(preferences, undoManager, stateManager, dialogService, fileUpdateMonitor, taskExecutor); |
There was a problem hiding this comment.
same as above, formatting changes makes it harde to see the real diff
| "JabRef was unable to open a web browser for link:\n\n" + URLs.SCITE_URL + "\n\nError Message:\n\n" + ioex.getMessage(), | ||
| ioex | ||
| ); | ||
| dialogService.showErrorDialogAndWait("An error occurred opening web browser", "JabRef was unable to open a web browser for link:\n\n" + URLs.SCITE_URL + "\n\nError Message:\n\n" + ioex.getMessage(), ioex); |
| CitationFetcher.SearchType.CITED_BY, | ||
| importCitedByButton, | ||
| citedByProgress); | ||
| CitationComponents citingComponents = new CitationComponents(entry, citingListView, abortCitingButton, refreshCitingButton, CitationFetcher.SearchType.CITES, importCitingButton, citingProgress); |
There was a problem hiding this comment.
please revert all these formatting changes.
There was a problem hiding this comment.
I apologize, I'll try to fix it right away
|
@Gabriele-DM-unimol Wait for a review of one of the maintainers. Please be aware that we all develop JabRef in our free time despite having full time jobs. So it sometimes may take a while The UI Change is okay for me, but just revert the formatting changes |
…m/Gabriele-DM-unimol/jabref into fix/citation-relations-ui-overlap
|
if you want to take another issue with UI fixes, I suggest taking a look at #11589 |
Closes 15047
This PR fixes the UI overlap issue in the Citation Relations tab by implementing responsive label widths and text ellipsis. I adjusted the AnchorPane constraints and added HGrow priorities to ensure that action buttons and the fetcher ComboBox remain accessible and visible even with very long entry titles.
Library with a single entry with me as author and as title the issue number

Before

After

After

Steps to test
Open JabRef and select or create an entry with an exceptionally long title (e.g., more than 150 characters).
Go to the Citations tab in the entry editor.
Observe the column labels ("References cited in..." and "References that cite...").
Expected Result: The labels should no longer overlap with the action buttons or the fetcher dropdown. Instead, they should truncate gracefully with an ellipsis (...) when space is limited, as shown in the verification screenshots below.
CHANGELOG.mdin a way that is understandable for the average user (if change is visible to the user)