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

Library sort order get lost #6091

Closed
1 task done
mlep opened this issue Mar 10, 2020 · 8 comments · Fixed by #6107 or #6379
Closed
1 task done

Library sort order get lost #6091

mlep opened this issue Mar 10, 2020 · 8 comments · Fixed by #6107 or #6379
Labels
good first issue An issue intended for project-newcomers. Varies in difficulty. ui

Comments

@mlep
Copy link
Contributor

mlep commented Mar 10, 2020

JabRef 5.0--2020-03-06--2e6f433
Linux 4.9.0-12-amd64 amd64
Java 13.0.2

In Library > Library properties, the export sort order can be specified.
However, the choice is not memorized.
Steps to reproduce the behavior:

  1. Open a library
  2. Go to Library > Library properties
    In my case, the sort order was:
    Before-Capture du 2020-03-10 11-08-08
  3. Change the sort order
    Like:
    During-Capture du 2020-03-10 11-10-08
  4. Click on OK (closing the Library properties window)
  5. Go (again) to Library > Library properties
    The initial sort order is displayed:
    After-Capture du 2020-03-10 11-10-32
@tobiasdiez tobiasdiez added good first issue An issue intended for project-newcomers. Varies in difficulty. ui labels Mar 10, 2020
@Hugoo98
Copy link

Hugoo98 commented Mar 11, 2020

Hello,
I would like to try to correct this bugs and add a little functionality, as part of a course taken under license 3, I would like to know if this is not already done ...
cordially

@Siedlerchr
Copy link
Member

@Hugoo98 Sure, go ahead! To me this looks like some issue with storing the properties and loading them from the preferences.
Read through the Contribution Guide
The related code is located in this package:
https://github.com/JabRef/jabref/tree/master/src/main/java/org/jabref/gui/libraryproperties

@Hugoo98
Copy link

Hugoo98 commented Mar 12, 2020

@Siedlerchr thank you very much, I will try to do it and keep you posted.

@calixtus
Copy link
Member

Hi @Hugoo98, im very sorry, I already startet work on this issue a few days ago, but did not uploaded my draft as a PR. I hope you did not put too much effort yet in it. Especially this one is a bit more complicated, since the library properties dialog is a little bit screwed up... 🙈 Maybe we can work on this together?

@Hugoo98
Copy link

Hugoo98 commented Mar 12, 2020

Hi @calixtus no no i haven't started yet but i sent it to my teacher and he said it might be interesting.
Ducoup, I made my decision to do it even if it is complicated because there are 3 of us in our group which allows us to exchange ideas.

@calixtus
Copy link
Member

calixtus commented Mar 12, 2020

Good, JabRef always welcomes students who would like to practice software architecture and programming. I'll leave than the rework of SaveOrderConfigPanel to you. If you have questions, don't hesitate to ask us, we always like to help.

My original plan was to replace the three comboBoxes with a single TableView, offering the user the ability to add more than three SortCriteria. Fortunately SaveOrderConfig already works with a LinkedList in its data model, so you probably don't have to change too much outside SaveOrderConfigPanel and SaveOrderConfigPanel. This would imply you add a CheckBoxTableCell in gui.utils (for a similar example take a look at @Siedlerchr s implementation of RadioButtonTableCell). But maybe you have a better idea.

Please take a look at my PR. The finished result must respect the mvvm-design pattern and should respect the design principles of JabRef (the finished result should fit in the common look and feel). SortOrderPanel should only be a fx control and the data should be handled in the LibraryPropertiesDialogViewModel / ExportSortingTabView.

You can base your work on my branch. I will try to hurry to refactor the still remaining parts that are still illegally tangled to the LibraryPropertiesView / ExportSortingTabView, so you have a clear workspace for your work.

Good luck and have fun.

@Siedlerchr
Copy link
Member

You are lucky, as javafx already has a CheckboxTableCell you can use.
https://docs.oracle.com/javase/8/javafx/api/javafx/scene/control/cell/CheckBoxTableCell.html

@Hugoo98
Copy link

Hugoo98 commented Mar 12, 2020

ok thanks @calixtus i will take a look at your PR and i will keep you posted

hrandrianasolo added a commit to hrandrianasolo/jabref that referenced this issue Apr 30, 2020
fixes JabRef#6091

Co-authored-by: Heriniaina Randrianasolo <hjsrandrianasolo@gmail.com>
Co-authored-by: Omar Tachour <omar.tchr@hotmail.com>
Co-authored-by: Sadji Micipsa <micipsasadji@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue An issue intended for project-newcomers. Varies in difficulty. ui
Projects
Archived in project
5 participants