Repository navigation
[Port to stable] Update linked file tooltip when the file is renamed or moved - #17594
jabref-machine wants to merge 1 commit into
Conversation
* Update linked file tooltip when the file is renamed or moved * fix(gui): reuse linked-file cell tooltips --------- Co-authored-by: Siedlerchr <siedlerkiller@gmail.com> (cherry picked from commit 6124ec8)
PR Summary by QodoKeep linked-file tooltips current after renaming or moving files
AI Description
Diagram
High-Level Assessment
Files changed (5)
|
Code Review by Qodo
1. The linked-file fix lacks a requirement
|
| .withTooltipText(linkedFile -> linkedFile.linkProperty().flatMap(_ -> | ||
| linkedFile.descriptionProperty().map(_ -> linkedFile.getDescriptionAndLink()))) |
There was a problem hiding this comment.
1. The linked-file fix lacks a requirement 📘 Rule violation ⚙ Maintainability
LinkedFilesEditor now binds tooltip text to linked-file properties so renames and moves change the displayed name. Because this user-visible bug fix adds no corresponding entry under docs/requirements/, its intended behavior is not captured in the requirements set for future verification.
Agent Prompt
## Issue description
The linked-file tooltip behavior changed so the displayed file name updates after a rename or move, but the PR does not add a corresponding documented requirement.
## Fix Focus Areas
- docs/requirements/ux.md[1-194]
- jabgui/src/main/java/org/jabref/gui/fieldeditors/LinkedFilesEditor.java[166-167]
## Recommended Fix
Add a requirement to the appropriate requirements document describing that linked-file tooltips display the current file name and update when the linked file is renamed or moved. Include the required requirement identifier immediately after its heading and preserve the file's required markdownlint footer.
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
| Tooltip tooltip = new Tooltip(); | ||
| tooltip.textProperty().bind(cell.itemProperty().flatMap(toTooltipText::call).when(cell.emptyProperty().not())); | ||
| return _ -> tooltip; |
There was a problem hiding this comment.
2. Blank file links can show empty tooltips 🐞 Bug ≡ Correctness
withTooltipText always attaches a Tooltip, even when its bound text is blank, unlike withStringTooltip, which leaves the cell without one. A linked file can have an empty link and description, so a cell without an overriding validation warning receives an empty tooltip rather than no tooltip.
Agent Prompt
## Issue description
`withTooltipText` attaches a tooltip even when its observable text is blank, whereas static string tooltips are omitted for blank text.
## Fix Focus Areas
- jabgui/src/main/java/org/jabref/gui/util/ViewModelListCellFactory.java[103-108]
- jabgui/src/test/java/org/jabref/gui/util/ViewModelListCellFactoryTest.java[70-97]
## Recommended Fix
Make the reactive tooltip absent when the current text is blank, while retaining the per-cell tooltip and listener cleanup when text becomes nonblank again. Add a test for both transitions.
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
|
🤖 Generated with Claude Code |
Port of #17543 to
stable, see Branching strategy.If this PR is a draft, the cherry-pick conflicted: the conflicting files are committed with Git's conflict markers left in. Resolve the markers locally, push, and mark the PR ready.