From d54cdc4e990ff3d2fe3a5a50792522c42f230562 Mon Sep 17 00:00:00 2001 From: Hussain Arif Date: Mon, 20 Apr 2020 15:18:19 +0500 Subject: [PATCH 1/5] Name field now in focus whenever 'add subgroup' button selected --- .vscode/tasks.json | 12 ++++++++++++ .../java/org/jabref/gui/groups/GroupDialogView.java | 10 +++++++--- 2 files changed, 19 insertions(+), 3 deletions(-) create mode 100644 .vscode/tasks.json diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 00000000000..e981136bc66 --- /dev/null +++ b/.vscode/tasks.json @@ -0,0 +1,12 @@ +{ + // See https://go.microsoft.com/fwlink/?LinkId=733558 + // for the documentation about the tasks.json format + "version": "2.0.0", + "tasks": [ + { + "label": "echo", + "type": "shell", + "command": "gradle" + } + ] +} \ No newline at end of file diff --git a/src/main/java/org/jabref/gui/groups/GroupDialogView.java b/src/main/java/org/jabref/gui/groups/GroupDialogView.java index 9d11fc25bb4..094625ee4a0 100644 --- a/src/main/java/org/jabref/gui/groups/GroupDialogView.java +++ b/src/main/java/org/jabref/gui/groups/GroupDialogView.java @@ -29,7 +29,7 @@ public class GroupDialogView extends BaseDialog { // Basic Settings - @FXML private TextField nameField; + @FXML private TextField nameField; @FXML private TextField descriptionField; @FXML private TextField iconField; @FXML private ColorPicker colorField; @@ -90,6 +90,7 @@ public GroupDialogView(DialogService dialogService, BibDatabaseContext currentDa @FXML public void initialize() { + System.out.println("Group Dialog View initiated"); hierarchyText.put(GroupHierarchyType.INCLUDING, Localization.lang("Union")); hierarchyToolTip.put(GroupHierarchyType.INCLUDING, Localization.lang("Include subgroups: When selected, view entries contained in this group or its subgroups")); hierarchyText.put(GroupHierarchyType.REFINING, Localization.lang("Intersection")); @@ -97,7 +98,7 @@ public void initialize() { hierarchyText.put(GroupHierarchyType.INDEPENDENT, Localization.lang("Independent")); hierarchyToolTip.put(GroupHierarchyType.INDEPENDENT, Localization.lang("Independent group: When selected, view only this group's entries")); - nameField.textProperty().bindBidirectional(viewModel.nameProperty()); + // nameField.textProperty().bindBidirectional(viewModel.nameProperty()); descriptionField.textProperty().bindBidirectional(viewModel.descriptionProperty()); iconField.textProperty().bindBidirectional(viewModel.iconProperty()); colorField.valueProperty().bindBidirectional(viewModel.colorFieldProperty()); @@ -131,7 +132,7 @@ public void initialize() { autoGroupPersonsField.textProperty().bindBidirectional(viewModel.autoGroupPersonsFieldProperty()); texGroupFilePath.textProperty().bindBidirectional(viewModel.texGroupFilePathProperty()); - + validationVisualizer.setDecoration(new IconValidationDecorator()); Platform.runLater(() -> { validationVisualizer.initVisualization(viewModel.nameValidationStatus(), nameField); @@ -142,6 +143,7 @@ public void initialize() { validationVisualizer.initVisualization(viewModel.keywordRegexValidationStatus(), keywordGroupSearchTerm); validationVisualizer.initVisualization(viewModel.keywordSearchTermEmptyValidationStatus(), keywordGroupSearchTerm); validationVisualizer.initVisualization(viewModel.keywordFieldEmptyValidationStatus(), keywordGroupSearchField); + nameField.requestFocus(); }); // Binding to the button throws a NPE, since it doesn't exist yet. Working around. @@ -152,6 +154,8 @@ public void initialize() { getDialogPane().lookupButton(ButtonType.OK).setDisable(true); } }); + + // nameField.requestFocus(); } @FXML From 6eecc15bc9fcd04522c0b893b7a570a9498a5fca Mon Sep 17 00:00:00 2001 From: Hussain Arif Date: Mon, 20 Apr 2020 16:18:30 +0500 Subject: [PATCH 2/5] Updated: Focuson Name Area instead of 'OK' button whenever user presses 'Add subgroup' --- .vscode/tasks.json | 12 ------------ .../java/org/jabref/gui/groups/GroupDialogView.java | 7 ++----- 2 files changed, 2 insertions(+), 17 deletions(-) delete mode 100644 .vscode/tasks.json diff --git a/.vscode/tasks.json b/.vscode/tasks.json deleted file mode 100644 index e981136bc66..00000000000 --- a/.vscode/tasks.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - // See https://go.microsoft.com/fwlink/?LinkId=733558 - // for the documentation about the tasks.json format - "version": "2.0.0", - "tasks": [ - { - "label": "echo", - "type": "shell", - "command": "gradle" - } - ] -} \ No newline at end of file diff --git a/src/main/java/org/jabref/gui/groups/GroupDialogView.java b/src/main/java/org/jabref/gui/groups/GroupDialogView.java index 094625ee4a0..73cbeb3eba4 100644 --- a/src/main/java/org/jabref/gui/groups/GroupDialogView.java +++ b/src/main/java/org/jabref/gui/groups/GroupDialogView.java @@ -29,7 +29,7 @@ public class GroupDialogView extends BaseDialog { // Basic Settings - @FXML private TextField nameField; + @FXML private TextField nameField; @FXML private TextField descriptionField; @FXML private TextField iconField; @FXML private ColorPicker colorField; @@ -90,7 +90,6 @@ public GroupDialogView(DialogService dialogService, BibDatabaseContext currentDa @FXML public void initialize() { - System.out.println("Group Dialog View initiated"); hierarchyText.put(GroupHierarchyType.INCLUDING, Localization.lang("Union")); hierarchyToolTip.put(GroupHierarchyType.INCLUDING, Localization.lang("Include subgroups: When selected, view entries contained in this group or its subgroups")); hierarchyText.put(GroupHierarchyType.REFINING, Localization.lang("Intersection")); @@ -98,7 +97,7 @@ public void initialize() { hierarchyText.put(GroupHierarchyType.INDEPENDENT, Localization.lang("Independent")); hierarchyToolTip.put(GroupHierarchyType.INDEPENDENT, Localization.lang("Independent group: When selected, view only this group's entries")); - // nameField.textProperty().bindBidirectional(viewModel.nameProperty()); + nameField.textProperty().bindBidirectional(viewModel.nameProperty()); descriptionField.textProperty().bindBidirectional(viewModel.descriptionProperty()); iconField.textProperty().bindBidirectional(viewModel.iconProperty()); colorField.valueProperty().bindBidirectional(viewModel.colorFieldProperty()); @@ -154,8 +153,6 @@ public void initialize() { getDialogPane().lookupButton(ButtonType.OK).setDisable(true); } }); - - // nameField.requestFocus(); } @FXML From f4e1785ba90dda30b9d123fa75b0a14aa5db8310 Mon Sep 17 00:00:00 2001 From: Hussain Arif Date: Mon, 20 Apr 2020 16:23:48 +0500 Subject: [PATCH 3/5] Focus on name text area whenever user clicks on Add Subgroup --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0305cf32c0c..b97d1db9c5e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -246,6 +246,7 @@ Note that this project **does not** adhere to [Semantic Versioning](http://semve - We added a 'LaTeX citations' tab to the entry editor, to search for citations to the active entry in the LaTeX file directory. It can be disabled in the preferences dialog. - We added an option in preferences to allow for integers in field "edition" when running database in bibtex mode. [#4680](https://github.com/JabRef/jabref/issues/4680) - We added the ability to use negation in export filter layouts. [#5138](https://github.com/JabRef/jabref/pull/5138) +-Focus on Name Area instead of 'OK' button whenever user presses 'Add subgroup' ### Fixed From 3172b9dce882e5e62b7349f4b624bd018ac16ce4 Mon Sep 17 00:00:00 2001 From: Hussain Arif Date: Mon, 20 Apr 2020 18:08:53 +0500 Subject: [PATCH 4/5] Focus on name text area when OK button is pressed --- CHANGELOG.md | 2 +- src/main/java/org/jabref/gui/groups/GroupDialogView.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b97d1db9c5e..1febbee2f86 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -246,7 +246,7 @@ Note that this project **does not** adhere to [Semantic Versioning](http://semve - We added a 'LaTeX citations' tab to the entry editor, to search for citations to the active entry in the LaTeX file directory. It can be disabled in the preferences dialog. - We added an option in preferences to allow for integers in field "edition" when running database in bibtex mode. [#4680](https://github.com/JabRef/jabref/issues/4680) - We added the ability to use negation in export filter layouts. [#5138](https://github.com/JabRef/jabref/pull/5138) --Focus on Name Area instead of 'OK' button whenever user presses 'Add subgroup' +- Focus on Name Area instead of 'OK' button whenever user presses 'Add subgroup' ### Fixed diff --git a/src/main/java/org/jabref/gui/groups/GroupDialogView.java b/src/main/java/org/jabref/gui/groups/GroupDialogView.java index 73cbeb3eba4..d6523a97c45 100644 --- a/src/main/java/org/jabref/gui/groups/GroupDialogView.java +++ b/src/main/java/org/jabref/gui/groups/GroupDialogView.java @@ -97,7 +97,7 @@ public void initialize() { hierarchyText.put(GroupHierarchyType.INDEPENDENT, Localization.lang("Independent")); hierarchyToolTip.put(GroupHierarchyType.INDEPENDENT, Localization.lang("Independent group: When selected, view only this group's entries")); - nameField.textProperty().bindBidirectional(viewModel.nameProperty()); + nameField.textProperty().bindBidirectional(viewModel.nameProperty()); descriptionField.textProperty().bindBidirectional(viewModel.descriptionProperty()); iconField.textProperty().bindBidirectional(viewModel.iconProperty()); colorField.valueProperty().bindBidirectional(viewModel.colorFieldProperty()); @@ -131,7 +131,7 @@ public void initialize() { autoGroupPersonsField.textProperty().bindBidirectional(viewModel.autoGroupPersonsFieldProperty()); texGroupFilePath.textProperty().bindBidirectional(viewModel.texGroupFilePathProperty()); - + validationVisualizer.setDecoration(new IconValidationDecorator()); Platform.runLater(() -> { validationVisualizer.initVisualization(viewModel.nameValidationStatus(), nameField); From 94beba58c82e7f8c983d80d0e28b360b820d862b Mon Sep 17 00:00:00 2001 From: Hussain Arif Date: Tue, 21 Apr 2020 10:27:01 +0500 Subject: [PATCH 5/5] Fixed changelog.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1febbee2f86..7d363c184f3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -246,7 +246,7 @@ Note that this project **does not** adhere to [Semantic Versioning](http://semve - We added a 'LaTeX citations' tab to the entry editor, to search for citations to the active entry in the LaTeX file directory. It can be disabled in the preferences dialog. - We added an option in preferences to allow for integers in field "edition" when running database in bibtex mode. [#4680](https://github.com/JabRef/jabref/issues/4680) - We added the ability to use negation in export filter layouts. [#5138](https://github.com/JabRef/jabref/pull/5138) -- Focus on Name Area instead of 'OK' button whenever user presses 'Add subgroup' +- Focus on Name Area instead of 'OK' button whenever user presses 'Add subgroup'. [#6307](https://github.com/JabRef/jabref/issues/6307) ### Fixed