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

Add preference to disable validation in the entry editor by default #3154

Merged
merged 4 commits into from
Aug 27, 2017

Conversation

lenhard
Copy link
Member

@lenhard lenhard commented Aug 25, 2017

Adds a preference option for enabling/disabling validation in the entry editor: #3100 (but not the UI)

The reason is because the validation is simply broken at the moment #3145

The preference option is set to false by default and there is no UI to change it. So this turns off validation in the entry editor. We can add the UI to turn it on later, when the display bug in controlsfx has been fixed.

When this is merged, the related issues can be removed from the 4.0 milestone.

  • 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?)
  • If you changed the localization: Did you run gradle localizationUpdate?

@lenhard lenhard added the status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers label Aug 25, 2017
@lenhard lenhard added this to the v4.0 milestone Aug 25, 2017
Copy link
Member

@tobiasdiez tobiasdiez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for taking care of this! In general it looks good to me (nice refactoring by the way!). Only a remark about Globals.

public class EditorValidator {

public static void configureValidation(ValidationStatus status, EditorTextArea area) {
if (Globals.prefs.getBoolean(JabRefPreferences.VALIDATE_IN_ENTRY_EDITOR)) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please not use Globals.prefs. I really tried hard to make the JavaFX stuff free of Globals. You can simply pass a preference instance to the editor (similar how it is done in the OwnerEditor) and then to this method here (mabye as new EntryValidator(preferences).configureValidation(...))).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done! Good point also, we should thrive to keep this independent from Globals. I even spotted one more usage in FieldEditors that you seem to have overlooked ;-)

# Conflicts:
#	src/main/java/org/jabref/gui/fieldeditors/FieldEditors.java
@lenhard
Copy link
Member Author

lenhard commented Aug 27, 2017

Since the review comments have been addressed and for the sake of getting things done, I am merging this now.

@lenhard lenhard merged commit 6a26798 into master Aug 27, 2017
@lenhard lenhard deleted the validation-preferences branch August 27, 2017 16:10
Siedlerchr added a commit that referenced this pull request Aug 27, 2017
* upstream/master:
  Add preference to disable validation in the entry editor by default (#3154)
  Fix freezing on browse in protected terms dialog when adding from entry editor (#3158)
  Close entry editor when the shown entry is removed externally (#3156)
  .jar are not ignored any more (#3155)
  Increase size of file and keywords editors (#3141)
  Make Replace Strings work in bibtexkeyfield
  Fix errorprone (#3151)
  Fix display of percentage symbol in entry preview (#3149)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.

2 participants