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

Fix for issue 4682 : Restructuring the side pane structure having additional functionality and merging the remove group menus #7714

Merged
merged 24 commits into from
Jun 8, 2021

Conversation

apurvachuri
Copy link
Contributor

Rearrange side pane structure having add button moved to the bottom of the side pane and merging the remove group menus.

Fixes #4682

Following are the changes that we implemented:

  1. Add group functionality
    • Remove '+' button beside filter group tab
    • Add group button at the bottom of the side pane
    • Button dim after adding 10 groups.

Screen Shot 2021-05-08 at 3 08 06 pm

Screen Shot 2021-05-08 at 3 15 10 pm

  1. Fix the header title in the Add Group/Subgroup Dialog box

Screen Shot 2021-05-08 at 4 03 12 pm

  1. Merge 'Remove group' having two options, with or without subgroups

Screen Shot 2021-05-08 at 4 07 34 pm

  • Change in CHANGELOG.md described in a way that is understandable for the average user (if applicable)
  • Tests created for changes (if applicable)
  • Manually tested changed features in running JabRef (always required)
  • Screenshots added in PR description (for UI changes)
  • Checked documentation: Is the information available and up to date? If not created an issue at https://github.com/JabRef/user-documentation/issues or, even better, submitted a pull request to the documentation repository.

@Siedlerchr Siedlerchr added the status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers label May 8, 2021
Copy link
Member

@Siedlerchr Siedlerchr left a comment

Choose a reason for hiding this comment

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

Overall looks already good!
From my side only a few small remarks/suggestions regarding the code style

src/main/java/org/jabref/gui/groups/GroupDialogView.java Outdated Show resolved Hide resolved
src/main/java/org/jabref/gui/groups/GroupDialogView.java Outdated Show resolved Hide resolved
src/main/java/org/jabref/gui/groups/GroupTree.fxml Outdated Show resolved Hide resolved
@Siedlerchr
Copy link
Member

Please look at the failing unit + checkstyle /reviewdog and also change the PR title to a more meaningful name

@Siedlerchr Siedlerchr added status: changes required Pull requests that are not yet complete and removed status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers labels May 10, 2021
@apurvachuri apurvachuri changed the title Fix for issue 4682 Fix for issue 4682 : Restructuring the side pane structure having additional functionality and merging the remove group menus May 11, 2021
Comment on lines 418 to 431
private void setNewGroupButtonStyle(TreeTableView<GroupNodeViewModel> groupTree) {
if (groupTree.getRoot() != null) {
if (groupTree.getExpandedItemCount() <= 10) {
addNewGroup.setStyle("-fx-border-width: 0px; -fx-background-color: -jr-theme;" +
" -fx-padding: 0.5em; -fx-text-fill: -jr-white;");
} else {
addNewGroup.setStyle("-fx-border-width: 0px; -fx-background-color: -jr-icon-background-active;" +
" -fx-padding: 0.5em; -fx-text-fill: -jr-black;");
}
} else {
addNewGroup.setStyle("-fx-border-width: 0px; -fx-background-color: -jr-theme;" +
" -fx-padding: 0.5em; -fx-text-fill: -jr-white;");
}
}
Copy link
Member

Choose a reason for hiding this comment

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

Instead of hardcoding the css in the java file, please make this a pseudoclass in css, which should be very easy to implement. See BindingsHelper::includePseudoClassWhen !

Copy link
Contributor

Choose a reason for hiding this comment

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

Hi @calixtus , i've checked this BindingsHelper::includePseudoClassWhen needs a parameter of node and the css changes should be applied to the nodes whenever a condition is applied. however, in my change, what I'm changing is the color of Add Group button whenever the user added 10 groups (doesn't include the count of subgroups) and not the nodes. Any advise is greatly appreciated.

Copy link
Member

Choose a reason for hiding this comment

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

The node should be the addNewGroup.
A new Binding to be checked for can be created in some initialize method or the constructor of the class. You only need one Observable which is triggered when change to the list happens.
Please take a look at other occurences of includePseudoClassWhen to get an impression, how to implement this. Again, in theory this should be very straightforward. If you really don't get this to work, I can help a little bit in the next days, im just a bit busy today.

@@ -1782,7 +1782,7 @@ No\ full\ text\ document\ found\ for\ entry\ %0.=No full text document found for
Delete\ Entry=Delete Entry
Next\ library=Next library
Previous\ library=Previous library
add\ group=add group
add\ group=Add group
Copy link
Member

Choose a reason for hiding this comment

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

Translation string must be consistent with english translation.

Suggested change
add\ group=Add group
Add\ group=Add group

Copy link
Contributor

Choose a reason for hiding this comment

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

fixed

Copy link
Member

@calixtus calixtus left a comment

Choose a reason for hiding this comment

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

Some small remarks

@damassh
Copy link
Contributor

damassh commented May 19, 2021

Please look at the failing unit + checkstyle /reviewdog and also change the PR title to a more meaningful name

@Siedlerchr , I am sorry I'm new in checking the unit test. Is it possible if you can point me to the right direction on how to check it? I've clicked the details and directed me to a https://github.com/JabRef/jabref/pull/7714/checks?check_run_id=2604593213 but not sure how to investigate on the code itself on how to debug it and fix it.

@calixtus
Copy link
Member

Please look at the failing unit + checkstyle /reviewdog and also change the PR title to a more meaningful name

@Siedlerchr , I am sorry I'm new in checking the unit test. Is it possible if you can point me in the right direction on how to check it? I've clicked the details and directed me to a https://github.com/JabRef/jabref/pull/7714/checks?check_run_id=2604593213 but not sure how to investigate on the code itself on how to debug it and fix it.

The provided link returns me a 404 😞

@calixtus
Copy link
Member

The checkstyle fails on checking the changelog file and says the following;

CHANGELOG.md:105 MD022/blanks-around-headings/blanks-around-headers Headings should be surrounded by blank lines [Expected: 1; Actual: 0; Below] [Context: "### Removed"]
CHANGELOG.md:106 MD032/blanks-around-lists Lists should be surrounded by blank lines [Context: "- We removed add group button ..."]

Looks just like you forgot a blank line before or after a heading in changelog.md

Copy link
Member

@calixtus calixtus left a comment

Choose a reason for hiding this comment

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

Few comments

Comment on lines 104 to 107

#newGroupButton {
-fx-padding: 0.1em 1.5em 0.1em 1.5em;
#addNewGroup {
/*-fx-padding: 0.1em 1.5em 0.1em 1.5em;*/
}
Copy link
Member

Choose a reason for hiding this comment

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

Why keeping it, when commented? For version history we got git.

CHANGELOG.md Outdated
Comment on lines 97 to 98
### Removed
- We removed add group button beside the filter group tab. [#4682](https://github.com/JabRef/jabref/issues/4682)
Copy link
Member

Choose a reason for hiding this comment

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

Keep a blank line before and after a heading.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added a blank line after the heading "#Removed"

Copy link
Member

Choose a reason for hiding this comment

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

In this case, Visual Studio Code helps - with following plugin: https://marketplace.visualstudio.com/items?itemName=DavidAnson.vscode-markdownlint

I am not aware of any similar plugin for IntelliJ.

Comment on lines 418 to 431
private void setNewGroupButtonStyle(TreeTableView<GroupNodeViewModel> groupTree) {
if (groupTree.getRoot() != null) {
if (groupTree.getExpandedItemCount() <= 10) {
addNewGroup.setStyle("-fx-border-width: 0px; -fx-background-color: -jr-theme;" +
" -fx-padding: 0.5em; -fx-text-fill: -jr-white;");
} else {
addNewGroup.setStyle("-fx-border-width: 0px; -fx-background-color: -jr-icon-background-active;" +
" -fx-padding: 0.5em; -fx-text-fill: -jr-black;");
}
} else {
addNewGroup.setStyle("-fx-border-width: 0px; -fx-background-color: -jr-theme;" +
" -fx-padding: 0.5em; -fx-text-fill: -jr-white;");
}
}
Copy link
Member

Choose a reason for hiding this comment

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

The node should be the addNewGroup.
A new Binding to be checked for can be created in some initialize method or the constructor of the class. You only need one Observable which is triggered when change to the list happens.
Please take a look at other occurences of includePseudoClassWhen to get an impression, how to implement this. Again, in theory this should be very straightforward. If you really don't get this to work, I can help a little bit in the next days, im just a bit busy today.

@damassh
Copy link
Contributor

damassh commented May 20, 2021

Please look at the failing unit + checkstyle /reviewdog and also change the PR title to a more meaningful name

@Siedlerchr , I am sorry I'm new in checking the unit test. Is it possible if you can point me in the right direction on how to check it? I've clicked the details and directed me to a https://github.com/JabRef/jabref/pull/7714/checks?check_run_id=2604593213 but not sure how to investigate on the code itself on how to debug it and fix it.

The provided link returns me a 404 😞

This also gives us an error 404 and was about raise it as well. The provided link for CUSTOM_EXPORTS_NAME_FORMATTER doesn't exist. @Siedlerchr @tobiasdiez may you help to advise if this is expected?
Screen Shot 2021-05-20 at 3 47 16 pm

Added a blank line after the heading "#Removed"
@calixtus
Copy link
Member

This also gives us an error 404 and was about raise it as well. The provided link for CUSTOM_EXPORTS_NAME_FORMATTER doesn't exist. @Siedlerchr @tobiasdiez may you help to advise if this is expected?
Screen Shot 2021-05-20 at 3 47 16 pm

The HelpFileTests are unrelated to your changes and are caused bay changes to our help system gitbook. They should be gone after merging the most recent main-branch into your branch an can be ignored.

@calixtus calixtus self-assigned this May 24, 2021
Copy link
Member

@calixtus calixtus left a comment

Choose a reason for hiding this comment

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

Sorry for the delay here, we all were a bit busy the last few weeks.
One quick question on this one, everything else looks good to me.

@Siedlerchr
Copy link
Member

From my side lgtm

@Siedlerchr Siedlerchr added status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers and removed status: changes required Pull requests that are not yet complete labels Jun 8, 2021
Copy link
Member

@calixtus calixtus left a comment

Choose a reason for hiding this comment

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

Thank you very much for this contribution. I personally want to add that I really appreciate your Will to stay on this, fix issues with the PR and including our remarks, until the PR can be merged!

Merging now!

@calixtus calixtus merged commit 9d1c448 into JabRef:main Jun 8, 2021
Siedlerchr added a commit to koppor/jabref that referenced this pull request Jun 16, 2021
* upstream/main:
  Added auto-key-generation task to task-progress (JabRef#7797)
  cleanup temporary files, use prefix "jabref-" (JabRef#7811)
  Add easier how-to for checklist (JabRef#7813)
  Fix annotation + package of ACMPortalParserTest (JabRef#7812)
  Implemented a select all button for the library import function (issue JabRef#7786) (JabRef#7808)
  Fix for issue 4682 : Restructuring the side pane structure having additional functionality and merging the remove group menus (JabRef#7714)
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.

Groups context menu: Structure remove groups and subgroups
8 participants