Skip to content

Refactor IoC - A: Extract Entry Editor #12210

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

Merged
merged 40 commits into from
Apr 15, 2025
Merged

Refactor IoC - A: Extract Entry Editor #12210

merged 40 commits into from
Apr 15, 2025

Conversation

calixtus
Copy link
Member

@calixtus calixtus commented Nov 18, 2024

Instead of having an instance of the EntryEditor for every LibraryTab - one is enough. One EntryEditor to rule them all, one EntryEditor to find them, one Entryeditor to bring them all and in the bottom of the interface bind them.

Introduced

  • Interface PreviewControls

Todo:

  • Move Open/Close of EntryEditor to JabRefFrame
  • Adapt EntryEditor to follow observables and to tolerate no entry
  • Adapt StateManager from DatabaseContext to LibraryTab? (invalid)
  • Fix remaining bugs:
    • Not showing anything
    • NPE on exit
    • Open entry editor menu item
    • Entry editor maximized when open
  • Extract refs to library tab from Entry Editor
    postponed to later PR, requires refactoring of GlobalSearchBar and activeSearchQuery for sync issues.
  • Fix issue about lost sync on startup was present before, postponed to later pr

Goal:

  • Level of abstraction (StateManager should use LibraryTab instead of BibDatabaseContext)
    postponed to later pr. would overload this one
  • Easy rewrite of entry editor in the future
  • Unwind dependencies

Mandatory checks

  • I own the copyright of the code submitted and I license it under the MIT license
  • Change in CHANGELOG.md described in a way that is understandable for the average user (if change is visible to the user)
  • Tests created for changes (if applicable)
  • Manually tested changed features in running JabRef (always required)
  • Screenshots added in PR description (if change is visible to the user)
  • Checked developer's documentation: Is the information available and up to date? If not, I outlined it in this pull request.
  • Checked documentation: Is the information available and up to date? If not, I created an issue at https://github.com/JabRef/user-documentation/issues or, even better, I submitted a pull request to the documentation repository.

@calixtus calixtus force-pushed the extract-entry-editor branch from fe21d9b to f247c7c Compare November 30, 2024 10:49
@subhramit subhramit added dev: code-quality Issues related to code or architecture decisions [outdated] type: enhancement labels Dec 2, 2024
@koppor
Copy link
Member

koppor commented Feb 11, 2025

Related historic PRs:

Side note: I found the PR for the maintable JavaFX migration: #3621 (and #3591)

@calixtus calixtus marked this pull request as ready for review February 12, 2025 20:07
@calixtus calixtus changed the title [wip] Extract Entry Editor Extract Entry Editor Feb 12, 2025
@subhramit
Copy link
Member

There can only be one.

@calixtus
Copy link
Member Author

calixtus commented Apr 3, 2025

Maybe following issue can also be fixed with this: #12865

Checked it, would require more refactoring and would overload this pr even more.
Should be done in a later PR but should be easier with this one merged, as the scope of changes will be smaller.

# Conflicts:
#	src/main/java/org/jabref/gui/frame/JabRefFrame.java
@calixtus calixtus changed the title [wip] Extract Entry Editor Refactor IoC - A: Extract Entry Editor Apr 15, 2025
Copy link

trag-bot bot commented Apr 15, 2025

@trag-bot didn't find any issues in the code! ✅✨

@calixtus calixtus requested a review from koppor April 15, 2025 16:50
@calixtus calixtus added the status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers label Apr 15, 2025
Copy link
Contributor

github-actions bot commented Apr 15, 2025

The build for this PR is no longer available. Please visit https://builds.jabref.org/main/ for the latest build.

@Siedlerchr Siedlerchr enabled auto-merge April 15, 2025 17:37
@Siedlerchr Siedlerchr added this pull request to the merge queue Apr 15, 2025
Merged via the queue into main with commit 2f88ba2 Apr 15, 2025
2 checks passed
@Siedlerchr Siedlerchr deleted the extract-entry-editor branch April 15, 2025 22:22
krishnagjsForGit pushed a commit to krishnagjsForGit/jabref that referenced this pull request May 2, 2025
* Move EntryEditor to JabRefFrame

* Make activeTab observable

* Accept no tab

* Accept no tab in preview

* Migrate showBottomPane to property

* Show Editor

* Fix NPE

* Fixed not showing

* Fix duplication of tabs and npe on exit

* Fix height

* Fix menu item

* Cleanup and streamline

* Fix test

* RewriteRun

* Dynamize databaseContext

* Codestyle and todo

* Fix search sync

* Changed fixme comment

* Fixed runaway process and simplified DirectoryMonitor

* Fix PreviewViewer

* Dynamized SourceTab

* Dynamized FileAnnotationTab

* Added todo comment for future rewrite of entry editor

* wip

* Fix tests

* Checkstyle

* l10n and GuiTest

* CleanUps

* more CleanUp

---------

Co-authored-by: Carl Christian Snethlage <calixtus@users.noreply.github.com>
krishnagjsForGit pushed a commit to krishnagjsForGit/jabref that referenced this pull request May 2, 2025
* Move EntryEditor to JabRefFrame

* Make activeTab observable

* Accept no tab

* Accept no tab in preview

* Migrate showBottomPane to property

* Show Editor

* Fix NPE

* Fixed not showing

* Fix duplication of tabs and npe on exit

* Fix height

* Fix menu item

* Cleanup and streamline

* Fix test

* RewriteRun

* Dynamize databaseContext

* Codestyle and todo

* Fix search sync

* Changed fixme comment

* Fixed runaway process and simplified DirectoryMonitor

* Fix PreviewViewer

* Dynamized SourceTab

* Dynamized FileAnnotationTab

* Added todo comment for future rewrite of entry editor

* wip

* Fix tests

* Checkstyle

* l10n and GuiTest

* CleanUps

* more CleanUp

---------

Co-authored-by: Carl Christian Snethlage <calixtus@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: entry-editor component: ui dev: code-quality Issues related to code or architecture decisions status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants