Skip to content
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

Make JavaFX a first-class citizen #3684

Merged
merged 207 commits into from
Feb 20, 2018
Merged

Conversation

tobiasdiez
Copy link
Member

@tobiasdiez tobiasdiez commented Feb 2, 2018

With this PR the main frame is converted to use JavaFX. Thus the role is now inverted and instead of embedding JavaFX in a Swing app, we now embedded the old Swing controls in a real JavaFX app. Hopefully, this leads to less problems.

The current state is very very basic and a lot of stuff is missing (side bar, menu, lila header instead of toolbar). The main reason for putting it out right now is to test if pushing the migration further fixes the issues encountered with Linux and MacOS.
@Siedlerchr @LinusDietz could you please try out this version and see if JabRef starts and shows a maintable (the latter only works if JabRef normally opens a bib file for you, since there is currently no GUI to open a new file).


  • Change in CHANGELOG.md described
  • Tests created for changes
  • Screenshots added (for bigger UI changes)
  • Manually tested changed features in running JabRef
  • Check documentation status (Issue created for outdated help page at help.jabref.org?)

Robert and others added 30 commits November 26, 2017 17:02
…ns in the linked file. Confusion because the gridpane is initially disabled even if there are annotations. After clicking on the file in the Combobox it works fine.
- litle ui changes
* Migrate paramterized RIS tests to JUnit5

* Extract generic importer testing code to new class

* Switch to JUnit5 assertions in BibEntryAssert

* Remove unused imports

* Use static import for Assertion when possible

* Extract file collection from importer test classes

* Refactor biblioscape importer tests

* Refactor BiblioscapeImporterTestTypes to JUnit5 syntax

* Refactor CopacImporterTestFiles

* Migrate medline importer tests to JUnit5

* Convert BibTeXML importer tests to JUnit5

* Move several non-parametric importer test classes to JUnit5

* Refactor Medline importer tests to JUni5

* Migrate parameterized MODS importer tests to JUnit5

* Migrate MrDLib importer tests to JUnit5

* Migrate MsBibImporter tests to JUnit5

* Migrate OvidImporter tests to JUnit5

* Migrate PdfContentImporter tests to JUnit5

* Migrate PdfXmpImporter tests to JUnit5

* Migrate RepecNepImporter tests to JUnit5

* Migrate RISImporter tests to JUnit5

* Migrate SilverPlatterImporter tests to JUnit5

* Fix imports in SilverPlatterImporterTest

* Fix BibTeXMLImporter tests

* Fix and clarify BibTeXMLImporterTestTypes

* Fix medline tests for malformed files

* Remove unused imports

* Fix broken test files that can be fixed and remove the ones with larger syntactic problem

* Fix MODSImporter tests

* Fix test file for MsBibImporter tests

* Convert Before to BeforeEach in OvidImporterTests

* Check starting line of a file for checking whether it is a PDF

* Migrate additional BibTeXML tests to JUnit5

* Refactor and restructure BibTexParser tests

* Refactor CopacImporter tests

* Refactor BibTeXMLImporter tests

* Refactor EndnoteImporter tests

* Refactor FreeCiteImporter tests

* Refactor InspecImporter tests

* Refactor IsiImporter tests

* Refactor MedlineImporter tests

* Refactor MrDLibImporter tests

* Refactor MsBibImporter tests

* Refactor OvidImporter tests

* Refactor PdfXmpImporter tests

* Refactor RepecNepImporter tests

* Refactor SilverPlatterImporter tests

* Fix a bunch of codacy issues
@lenhard
Copy link
Member

lenhard commented Feb 20, 2018

For some reason, I am getting localization warnings when executing this branch, e.g.:

14:50:52.075 [JavaFX Application Thread] WARN  org.jabref.logic.l10n.Localization - Warning: could not get menu item translation for "Library" for locale en

Apart from that, a bigger thing that is still missing imho are most of the toolbar items.

We definitely should do one more release, before we merge this. Imho, this might even justify upgrading the version number to JabRef 5.0

lenhard and others added 2 commits February 20, 2018 14:57
This fixes #938

- Reading and writing multiple dublinCore entries works: XMPUtilWriter supports mutliple metadata entries in dublinCore and a single entry in the PDDocumentInformation. If you want to test the reading of multiple entries, the PDF file JabRef_multipleMetaEntries.pdf contains three metadata entries in DublinCore for testing locally.
- Removed to much code when refactoring the XMPUtil. Non XMP metadata are also relevent, when retrieving org.apache.pdfbox.pdmodel.PDDocumentInformation
- Update pdfbox and fontbox from 1.8.13 to 2.0.8 and migritate from jempbox to xmpbox.  See pull #1096.
- Refactor extraction from DublinCoreSchema
- The tests cover the most important use cases, which include reading and writing metadata from pdf files. Both formats, DublinCore and PDMetadata (which are no XMP metadata) are tested.
- Separated XMPUtils in a reader and a writer utitlity class.
- add meaningful names in DublinCoreExtractor and use StringUtils.isNullOrEmpty
- Log exception in XMPUtilShared
@tobiasdiez
Copy link
Member Author

@lenhard Which toolbar icons do you miss? I added all which I found reasonable to be placed that prominently (e.g., actions that the user does on a regular basis). Better have too few icons than too many, in my opinion.

@lenhard
Copy link
Member

lenhard commented Feb 20, 2018

I tried to merge master into this and hope I did not break too many features on the way. Feel free to revert if it doesn't work out. We really need more frequent synchronization, otherwise there is no change of getting this together. Imho, this branch should be synced very urgently.

Here's the toolbars of this branch and master:
toolbar
That is a HUGE difference in available functionality. I think if we drop nearly all toolbar items, then many users will be pissed.

Added to that: The Web search sidebar needs to be rewritten as well. At the moment it basically crashes when you resize.

@koppor
Copy link
Member

koppor commented Feb 20, 2018

New toolbar:

grafik

Way too empty for me!!

Old toolbar:

grafik

I marked the things absolutely necessary for me (refs #3636). I don't use the other buttons. I toggle the interfaces via the full menu or via shortcut. copy and paste also not via these menus. Navigation also not via the toolbar.

As "good developers" we could have a user voting.

Or do we have Azure Analytics in place saying us which buttons are used?

Current opinion: Add my loved buttons and install Azure Analytics in parallel for that. Release 4.2 and collect statistics for JabRef 4.3.

@tobiasdiez
Copy link
Member Author

tobiasdiez commented Feb 20, 2018

@lenhard Thanks for merging with master, however, this PR is based on the other maintable migration branch. Now all those other changes in master occur as diff for this PR. Does everything work fine if we merge this PR now into the maintable branch?

Are the buttons for the shared databases needed? I always thought that changes are synced completely automatically. What extra value does the user gets from a facebook or github icon in the toolbar? How many users regularly open the terminal through JabRef?
Probably we need an option to allow the users to decide if he wants some buttons or not.

In general, I'm hugely in favor of a data-based decision.
We have some data about which dialogs are used how often. However, not every action is currently tracked (e.g. new library just opens a os-file dialog and is thus not captured in the list below; but also a few of our own dialogs are not tracked for some reason - for example the cleanup dialog).
The results below are nonetheless relatively clear and point in one direction: the majority of the users does not use any of our dialogs, except the "new entry" one and a few dialogs that are triggered automatically (import, duplicates, ...).

So I would propose to try-out a as minimal as possible version and then slowly add buttons as the users ask for them and/or our data shows that many users click on a certain action in the menu quite often.

name count
org.jabref.gui.EntryTypeDialog 2640
org.jabref.gui.importer.ImportInspectionDialog 1251
org.jabref.gui.DuplicateResolverDialog 516
org.jabref.gui.mergeentries.MergeFetchedEntryDialog 260
org.jabref.pdfimport.ImportDialog 138
org.jabref.gui.preftabs.PreferencesDialog 122
org.jabref.gui.groups.GroupDialog 75
org.jabref.gui.collab.ChangeDisplayDialog 40
org.jabref.gui.StringDialog 26
org.jabref.gui.importer.FetcherPreviewDialog 26
org.jabref.gui.mergeentries.MergeEntriesDialog 24
org.jabref.gui.ReplaceStringDialog 24
org.jabref.gui.help.NewVersionDialog 22
org.jabref.gui.shared.ConnectToSharedDatabaseDialog 20
org.jabref.gui.dbproperties.DatabasePropertiesDialog 19
org.jabref.gui.customentrytypes.EntryCustomizationDialog 16
org.jabref.gui.preftabs.FontSelectorDialog 14
org.jabref.gui.GenFieldsCustomizer 13
org.jabref.gui.MergeDialog 12
org.jabref.gui.preftabs.PreferencesFilterDialog 9
org.jabref.gui.externalfiles.SynchronizeFileField$OptionsDialog 8
org.jabref.gui.auximport.FromAuxDialog 8
org.jabref.gui.FindUnlinkedFilesDialog 7
org.jabref.gui.plaintextimport.TextInputDialog 7
org.jabref.gui.exporter.ExportCustomizationDialog 6
org.jabref.gui.openoffice.StyleSelectDialog$AddFileDialog 3
org.jabref.gui.externalfiletype.ExternalFileTypeEditor 3
org.jabref.gui.externalfiles.WriteXMPAction$OptionsDialog 2
org.jabref.gui.contentselector.ContentSelectorDialog 2
org.jabref.gui.exporter.CustomExportDialog 2
org.jabref.gui.importer.ImportCustomizationDialog 1

Since I was playing with the data, here the distribution of new entries (not really surprising):
image

@Siedlerchr
Copy link
Member

We should discuss this in a devcall and maybe do a user survey?
From my point of view:
Cleanup, Generate BibtexKeys, Toogle Groups, Preview, WebSeach etc, push to application.
Donate button. Help. Search field and Search mode changing
Save/Save All

@koppor
Copy link
Member

koppor commented Feb 20, 2018

You can easily merge it to the other branch. Git automatically recognizes existing commits of other branches.

I am unsure whether this is a chicken/egg thing. What happens if I start writing blog posts advertising our features? I think, most features are unused, because people just do not know about it.

Will be a good discussion at the devcall.

@tobiasdiez tobiasdiez merged commit eeb603b into maintable-beta Feb 20, 2018
@tobiasdiez
Copy link
Member Author

tobiasdiez commented Feb 20, 2018

I merged this PR now to have a somewhat workable maintable-beta branch again, that is also head-to-head with the current master (thanks @lenhard !).

You all raised good points concerning the toolbar. I think this will be lively discussion in the next dev-call. I marked the related issue #3678 with the corresponding label so that we don't forget it.

@Siedlerchr Can you please open a new issue for the undo problem. This appears to be independent of the changes in this PR but not a proper handling of empty cite keys in the undo code.

@koppor koppor deleted the javafxGlobalEverything branch February 23, 2018 15:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: ui 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.