-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Moved Journal Abbreviation from Quality Menu to Cleanup Entries Dialog #12835
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
…tion behavior from UndoableAbbreviator.java.
…antiation of AbbreviateJournalDefaultCleanup class
…efault, dotless, and shortest-unique
…bbreviateJournalCleanup job (UnabbreviateJournalCleanup still not properly implemented)
…atch the functionality of UndoableUnabbreviator.java
…nality. Dependent tests still need fixing
…ing when re-opening clean up entries dialog
…inding.ABBREVIATE to instead use other KeyBindings
…eanup and UnabbreviateJournalCleanup rather than the old (removed) classes
… in Clean up entries dialog
src/test/java/org/jabref/gui/preferences/keybindings/KeyBindingViewModelTest.java
Show resolved
Hide resolved
src/test/java/org/jabref/gui/preferences/keybindings/KeyBindingViewModelTest.java
Show resolved
Hide resolved
src/test/java/org/jabref/logic/cleanup/AbbreviateJournalCleanupTest.java
Outdated
Show resolved
Hide resolved
src/test/java/org/jabref/logic/cleanup/AbbreviateJournalCleanupTest.java
Outdated
Show resolved
Hide resolved
src/test/java/org/jabref/logic/cleanup/AbbreviateJournalCleanupTest.java
Outdated
Show resolved
Hide resolved
src/test/java/org/jabref/logic/cleanup/AbbreviateJournalCleanupTest.java
Outdated
Show resolved
Hide resolved
src/test/java/org/jabref/logic/cleanup/AbbreviateJournalCleanupTest.java
Show resolved
Hide resolved
src/test/java/org/jabref/logic/cleanup/AbbreviateJournalCleanupTest.java
Show resolved
Hide resolved
src/test/java/org/jabref/logic/cleanup/UnabbreviateJournalCleanupTest.java
Show resolved
Hide resolved
…itecture (it had no references in the gui package)
src/test/java/org/jabref/logic/cleanup/AbbreviateJournalCleanupTest.java
Show resolved
Hide resolved
This refs #11305 (comment) |
@trag-bot didn't find any issues in the code! ✅✨ |
I have been studying this PR as part of preparing my GSoC proposal for the multi-list journal abbreviation management feature. Moving abbreviation functionality to the Cleanup dialog makes a lot of sense for workflow simplification! My proposed implementation would extend this approach by allowing users to select which specific abbreviation lists are active, while maintaining the clean interface you've designed here. I would appreciate any thoughts on how you see these features working together. cc @koppor |
I'm not sure exactly what you mean by multi-list journal abbreviation management feature. What I can say is that this change was implemented without any modification to the That is, this change moved the journal abbreviation feature from the Quality menu to the Clean up entries dialog (and made the abbreviations run as a CleanupJob like everything else in the Clean up entries dialog), but did not change the way those lists were used. I don't think this PR conflicts with what you're suggesting. What I'd like to know is whether this multi-list journal abbreviation management feature would go in the settings menu or also somehow fit in the Cleanup entries dialog. |
How many different abbreviation lists does the average user have? How often do they want to change between them? Is an abbreviation list tied to the specific bibliography the user has open or not? These are questions I did not have to answer for the PR I created, but sound like they would be worth asking/answering for what you're propoosing. |
Please resolve the merge conflicts |
Multiple - maybe 2: ACM, IEEE for computer science. You can check the lists at https://github.com/JabRef/abbrv.jabref.org/tree/main/journals and guess which are related in a field. Maybe, IEEE is used by all natural sciences maybe? Idea is that a group of researchers could have their own list in addition to some "official" one - maybe "harvested" from an external sercie (such as MathSciNet)
Very seldom.
Possibly yes - but much work to do. |
Closes #11791
This change moves the Journal Abbreviation behavior from the Quality Menu into the Cleanup Entries Dialog as follows:
The JabRef documentation will need to be updated. A new issue has been created to do this here
Before Changes


After Changes



Summary
This pull request implements the steps outlined in this issue refinement
Specifically, all journal‐abbreviation tasks (both abbreviate and unabbreviate) from separate menu commands have been moved into the “Clean up entries” dialog. This allows the user to pick how they want to handle journal names—no change, abbreviate, or unabbreviate—directly inside the Cleanup dialog rather than from separate menu items.
Key changes:
AbbreviateJournalCleanupTest
andUnabbreviateJournalCleanupTest
, along with changes toJournalAbbreviationRepositoryTest
so the coverage is the same as before but uses the new cleanup approach.Notable Design Details
To perform this change, the functionality in
UndoableAbbreviator
(andUndoableUnabbreviator
) had to be adapted to theorg.jabref.logic.cleanup.CleanupJob
interface. I discovered while figuring out an implementation thatorg.jabref.logic.cleanup.AbbreviateJournalCleanup
(andorg.jabref.logic.cleanup.AbbreviateJournalCleanup
) both needed access to aJournalAbbreviationRepository
object. Many of the changes in this PR are related to this dependency being passed down fromorg.jabref.gui.frame.MainMenu
andorg.jabref.gui.frame.MainToolBar
. This issue is further described at this comment and this commentIt was suggested here that the journal abbreviation menu items instead be added to the field formatters in the UI, and implemented as a Formatter. The reason this was not done is because all the formatters act as stateless transformations, and are instantiated without any parameters (see
org.jabref.logic.formatter.Formatters
). Journal Abbreviation is notably not stateless, as it needs access toJournalAbbreviationRepository
. Theoretically, this could be overcome with dependency injection into the logic layer, but I believe that violates the architecture.How To Test
IMPORTANT NOTE: When testing and switching from running JabRef on this branch to running JabRef on the main branch, I had an unhandled exception because a new enum constant (e.g.


UNABBREVIATE
) persisted in the user preferences, but the code on main doesn't define this constant:The only workaround I have found for this is to go in JabRef to File -> Preferences -> Reset Preferences and then hit save.

Additionally:
org.jabref.logic.cleanup.AbbreviateJournalCleanupTest
,org.jabref.logic.cleanup.UnabbreviateJournalCleanupTest
, andorg.jabref.logic.journals.JournalAbbreviationRepositoryTest
Mandatory checks
CHANGELOG.md
described in a way that is understandable for the average user (if change is visible to the user)