Fix entry editor not closing when last library closed#15325
Conversation
Review Summary by QodoFix entry editor closing and improve groups parsing robustness
WalkthroughsDescription• Close entry editor automatically when last library is closed • Improve GroupsParser to skip unknown group types gracefully • Add comprehensive tests for GroupsParser behavior • Update CHANGELOG documenting the entry editor fix Diagramflowchart LR
A["User closes last library"] -->|activeTabProperty listener| B["EntryEditor.close() called"]
B --> C["Entry editor closes"]
C --> D["Welcome screen shown"]
E["Unknown group type encountered"] -->|GroupsParser.fromString| F["Log warning and return null"]
F --> G["Group skipped in importGroups"]
G --> H["Parsing continues successfully"]
File Changes1. jabgui/src/main/java/org/jabref/gui/entryeditor/EntryEditor.java
|
Code Review by Qodo
1. fromString() returns null
|
When no library tab is active, the entry editor remained visible. Added close() call in the activeTabProperty listener's else branch to handle the zero-libraries-open case. Fixes JabRef#13125
08800ec to
9d3ab6d
Compare
|
Hey, we noticed that you force-pushed your changes. Force pushing is a bad practice when working together on a project (mainly because it is not supported well by GitHub itself). Commits are lost and comments on commits lose their context, thus making it harder to review changes. When the pull request is getting integrated into In future, please avoid that. For now, you can continue working. |
✅ All tests passed ✅🏷️ Commit: 9d3ab6d Learn more about TestLens at testlens.app. |
* Close entry editor when last library is closed When no library tab is active, the entry editor remained visible. Added close() call in the activeTabProperty listener's else branch to handle the zero-libraries-open case. Fixes JabRef#13125 * Update CHANGELOG for JabRef#13125
* Close entry editor when last library is closed When no library tab is active, the entry editor remained visible. Added close() call in the activeTabProperty listener's else branch to handle the zero-libraries-open case. Fixes JabRef#13125 * Update CHANGELOG for JabRef#13125
Related issues and pull requests
Closes #13125
PR Description
When the last open library is closed, the entry editor remained visible
instead of closing automatically. In the 'activeTabProperty' listener's 'else' branch, I added 'close()' method, which handles the zero-libraries-open case without affecting the existing behavior of keeping the editor visible when switching between entries.
Steps to test
Checklist
I described the change in
CHANGELOG.mdin a way that can be understood by the average user (if change is visible to the user)[/] I checked the user documentation for up to dateness