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

Convert/rework rest of the Swing Dialogs to javafx #3861

Closed
35 of 36 tasks
Siedlerchr opened this issue Mar 17, 2018 · 14 comments
Closed
35 of 36 tasks

Convert/rework rest of the Swing Dialogs to javafx #3861

Siedlerchr opened this issue Mar 17, 2018 · 14 comments
Labels
Milestone

Comments

@Siedlerchr
Copy link
Member

Siedlerchr commented Mar 17, 2018

This issue serves as point to see which dialogs need to be migrated and which need to be converted:
@JabRef/developers please have a look at that list and see if I maybe missed some
Some of the dialogs are very easy to convert and could be nice beginner tasks

Still need to be converted to MVVM (not a beginner task):

@Siedlerchr Siedlerchr added the ui label Mar 17, 2018
@Siedlerchr Siedlerchr mentioned this issue Apr 12, 2018
6 tasks
@stefan-kolb stefan-kolb added the good first issue An issue intended for project-newcomers. Varies in difficulty. label Apr 16, 2018
@LinusDietz LinusDietz added this to the v5.0 milestone Apr 20, 2018
@LinusDietz
Copy link
Member

This is an excellent opportunity for new developers to make a relatively easy first contribution.

@jssander
Copy link
Contributor

Perhaps I could start by working on Quality -> Find unlinked files. Could you provide me with a little more information on what exactly needs to be done? Anything that would be of help.

@tobiasdiez
Copy link
Member

tobiasdiez commented Apr 26, 2018

Good to hear @jssander! The general aim is to convert these dialogs to the "new" UI technology JavaFX while at the same time improving the user experience/work flow. Do you already have experience with JavaFX?
I think the "Find unlinked files" dialog is a good first project. The dialog is not too complex and reasonable well designed. Thus you can convert it more or less identically to JavaFX (Personally, I would move the "Select all/none" buttons below the file tree and remove the "expand/collapse" buttons. Maybe use an accordion-like design to emphasize the 2-step structure of the dialog, see eg here or here). For code examples, have a look at the dialogs "Options > Manage journal abbreviations" or "Key bindings". And, of course, feel free to ask questions here or in gitter.

@gsweetwood
Copy link

Hey @tobiasdiez, I am new to this project but I'm learning JavaFX now and will start converting the dialogs. I will also take a look at the placement of the buttons that you mentioned.

@tobiasdiez
Copy link
Member

@gsweetwood Nice to hear that you are interested in contributing to JabRef! Since @jssander expressed interest in converting the "Find unlinked files" dialog and he already has some experience with the code of this dialog, it is probably best to leave this conversion to him (if you have not yet started).

But you are lucky and there are still a few others dialogs that needs attention. As a good start, I would recommend the three dialogs under "Edit" (with the "Manage keywords" being the most complicated of those).

@gsweetwood
Copy link

Great, thanks for the recommendation. I'll start there.

@gsweetwood
Copy link

Hey @tobiasdiez, I noticed that the examples you gave ("Options > Manage journal abbreviations") have controller, view, and view model classes. I'm working on Edit-> Set/Clear/Append Rename Fields, which is currently handled with just one class. Do you want me to create the classes like the example or to just modify the existing class?

@tobiasdiez
Copy link
Member

@gsweetwood Yes, please use the new separation in view and view model (often called MVVM pattern). More details can be found in our wiki: https://github.com/JabRef/jabref/wiki/Code---JavaFX. In practice, you can still reuse most of the logic (as part of the view model class) but often need to rewrite most of the view/controller.

(And please base your code on the maintable-beta branch, there we made some major changes also to the structure - mainly merging the controller and the view). Thanks!

tobiasdiez added a commit that referenced this issue Oct 9, 2018
…alog to javafx (#4264)

* issue_3861

* issue #3861

* Revise append database dialog

* Move replace string dialog to new package (and remove duplicate JavaFX conversion)

* Revise mass set field dialog

* Revise mass set field dialog

* Move mass set field dialog

* Revise group dialog

* Revise group dialog

* Fix checkstyle

* Update JabRef_en.properties

* Update JabRef_en.properties

* Update AppendDatabaseDialog.java

Co-authored-by: Tobias Diez <5037600+tobiasdiez@users.noreply.github.com>
@abepolk
Copy link
Contributor

abepolk commented Oct 19, 2018

@tobiasdiez @Siedlerchr I hope this is a good place to post! I am starting to rework the custom exporter dialog into JavaFX, and I am starting by making the table. I looked at the manage journal abbreviations table (in MVVM) to see how to create and populate a table in JavaFX. But I can’t seem to find where the tables are populated. I know lines 85-91 in src/main/java/org/jabref/gui/journals/ManageJournalAbbreviationView.java are related to populating the tables. Are the abbreviations coming from the preferences? Is the population being done in ManageJournalAbbreviationViewModel.java? Is this similar to how it needs to be done in the custom exporter dialog? Help is appreciated. Thanks!

Abe

@Siedlerchr
Copy link
Member Author

@NorwayMaple Have a look at my open office PR, https://github.com/JabRef/jabref/pull/4341/files#diff-4317bc1b0fd381bbd7695f882fbdd323R32
For a table you need an extra viewModel, the data model, which represents the data you want to show in the table.

You then would create an Observable list with the data model objects and expose that property and bind it to the tablle
https://github.com/JabRef/jabref/pull/4341/files#diff-906a555088c9123a621c81200d2a05edR38

@ProgrammingBanana
Copy link

Hello this would be the first contribution I make to an open source project. Is there something you'd suggest I do? Im also starting working with JavaFx but have a pretty good understanding of Java

@Siedlerchr
Copy link
Member Author

Hey, thanks for your interest. You could transform the manage protected terms dialog to JavaFX. You can create the layout with scene builder (the fxml). For some general information about dialogs with javafx have a look at our wiki.
The easiest way is to look at existing javafx dialogs.
Feel free to ask any questions, either in your PR then or in our gitter chat.

@tobiasdiez tobiasdiez removed the good first issue An issue intended for project-newcomers. Varies in difficulty. label Mar 3, 2019
@Siedlerchr
Copy link
Member Author

Siedlerchr commented Apr 14, 2019

We have gone a long way and now the final last dialog to convert is Push to application the settings. This would be a great way to implement the proposal in #674

#4719 however, is an extra issue as it depends on the new layout of the entry editor

@LinusDietz
Copy link
Member

I have created a PR with some architecture tests to display, where Swing is still used. #4894

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

8 participants