-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Grand unified preferences dialog #7384
Conversation
…dsDialog to PreferencesTab
So you intend to move these "other preference dialogs" to tabs in the main preference dialog? That sounds like a very good idea! |
Yes, my plan is to make the options menu obsolete. But this is a road to walk. I could create several PRs, one for every step, or I could distinguish the steps by commits. |
@@ -35,6 +35,7 @@ public AbbreviationsFileViewModel(Path filePath) { | |||
this.path = Optional.ofNullable(filePath); | |||
this.name = path.get().toAbsolutePath().toString(); | |||
this.isBuiltInList = new SimpleBooleanProperty(false); | |||
this.abbreviations.add(new AbbreviationViewModel(null)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a so called PseudoAbbreviation. I have not really understood what the real benefit is of this (maybe one can doubleclick an empty space in the List and insert a new abbreviation?) It's buggy, makes the code quite complicated to understand and I see no real benefit in it. ... ... But I put it back in for now, as several tests break, because they expect this PseudoAbbreviation and it would take me now valuable life time I would rather like to spend in finishing this PR, maybe as soon as I have completed everything else...
Had to change a bit more in the I discovered a bug in (now) ProtectedTermsTab. The checkboxes for each |
So, I think I am done. This was a big cleanup in the preferences dialog. About the tests:
The other preferences dialogs are a bit more complex and I'd rather like to work on them in separate PRs. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think i discovered a bug in the LocalizationConsistencyTests. The somehow cannot parse the custom fx control CitationKeyPatternPanel
Originally, we only used fxml for dialogs. Thus, the fxml loader used in the localization tests is optimized for this. Controls are loaded in a slightly different way (e.g use the root
syntax). That might be the origin of the problem. Since the load exception is thrown at CitationKeyPatternPanel.fxml:7
this points to a problem with loading the controller. However, this is strange since the controller shouldn't be loaded at all because of
jabref/src/test/java/org/jabref/logic/l10n/LocalizationParser.java
Lines 213 to 214 in 034cf8c
// We don't want to initialize controller | |
loader.setControllerFactory(Mockito::mock); |
Did you tried to debug this locally?
src/main/java/org/jabref/gui/commonfxcontrols/CitationKeyPatternPanelViewModel.java
Show resolved
Hide resolved
src/main/java/org/jabref/gui/preferences/entryeditortabs/CustomEditorFieldsTabViewModel.java
Outdated
Show resolved
Hide resolved
src/main/java/org/jabref/gui/preferences/exporter/ExportCustomizationTab.fxml
Show resolved
Hide resolved
src/main/java/org/jabref/gui/preferences/exporter/ExportCustomizationTabViewModel.java
Show resolved
Hide resolved
Co-authored-by: Siedlerchr <[email protected]>
Thanks to @Siedlerchr for helping me fix the localization tests. |
Nice that you could fix this! What I still don't understand is why the |
Yes, we were thinking about that. The ViewLoader is called directly from the constructor, which is called by the FXMLLoader, which parses the custom fx control-tag in the fxml file, even though the controller of the parsed fxml file is not called. |
ok, it's strange that the controller is initialized. But it makes sense that there are then problems, since the Thanks for investigating this. Code looks good to me! |
Hi @calixtus , I encountered a new problem while working on the preferences dialog. If you enter a non valid value such as a character to the font size spinner under the appearances tab, endless exception dialogs will appear, crashing not only the program, but the entire operating system. Before opening an issue on this, I wanted to hear if your changes to the preferences dialog fixes this issue, or if you can confirm that the bug persists. |
Thanks for the bug report. I did not work on the AppearanceTab recently, so this bug is probably still there. Would be great if you could open an issue on this. Have you also maybe some interest in fixing this? |
Long announced, long expected, long declared vaporware, but here it comes. The grand unified preferences dialog project.
Will include some impact on the preferences dialog architecture.
Totally draftish, but here for you to see some progress as it grows with every commit pushed.