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 notification when adding previous entries to new group configuration #8919

Merged
merged 5 commits into from
Jul 3, 2022

Conversation

LIM0000
Copy link
Contributor

@LIM0000 LIM0000 commented Jun 22, 2022

Fixes #8911

Previous discussion about add notification or documentation for adding original entries to new group configuration unexpectedly modifies original entries #8911

I would suggest to append to the Change of Grouping Method: Assign the original group's entries to this group? dialogue the following notification:
(Note: If original entries lack keywords to qualify for the new group configuration, confirming here will add them)

Proposed solution

  1. Change from showConfirmationDialogAndWait to showCustomButtonDialogAndWait. This showCustomButtonDialogAndWait with warning alert allow user to select:

    • Yes button, proceed to add previous entries into new group
    • No button, proceed to remove previous entries from new group
    • Cancel button, cancel the group editing process

111

  1. If Collect by is selected to be Searching for a keyword, warning dialog will display extra information of (Note: If original entries lack keywords to qualify for the new group configuration, confirming here will add them) for WordKeywordGroup. Please refer to keyword append discussion for more details.

222

PR checklist:

  • 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 developer's documentation: Is the information available and up to date? If not, I outlined it in this pull request.
  • Checked documentation: Is the information available and up to date? If not, I created an issue at https://github.com/JabRef/user-documentation/issues or, even better, I submitted a pull request to the documentation repository.

… dialog and append additional information for WordKeywordGroup
@ThiloteE
Copy link
Member

ThiloteE commented Jun 24, 2022

Looking good! Only one tiny nitpick:

  1. Question: Is it technically possible to add empty lines in notifications? If so, can you do it?

grafik

  1. I tested this pr and so far have not encountered anomalies except that the behaviour for Assign the original group's entries to this group does not seem to be coherent.
  • New keywords will unexpectedly be created for "Searching for a keyword". --> Hence the need for this pr.
  • New keywords will NOT be created for "Free search expression". --> Hence, does it even make sense to offer to assign original entries to the new group? Original entries will only (automatically) show up in the group, if a keyword fits the search, but the entries will not be modified and therefore may not show up, even if selecting yes.
  • New keywords will NOT be created for "Specified keywords" --> Hence, does it even make sense to offer to assign original entries to the new group? Original entries will only (automatically) show up in the group, if a keyword fits the search, but the entry will not be modified and therefore may not show up, even if selecting yes.

I think this non-coherent behavour does not justify preventing a merger though. Ready for review and merge if you ask me :-) 👍

@Siedlerchr
Copy link
Member

Siedlerchr commented Jun 26, 2022

Please have a look at the failing l10n tests, otherwise looks good to me already

* upstream/main:
  Fix for Dark theme not readable (JabRef#8929)
  Find Unlinked files should ignore Thumbs.db, etc (JabRef#8800)
  Try to  make reproducible builds (JabRef#8925)
  Link to new board (and refine text)
  Pass the data as a string (JabRef#8923)
  Add IntelliJ plugins to Gitpod configuration
  Add gradle support
  Fix extension name
  Remove obsolete closing bracket
  Add gitpod config (JabRef#8921)
  Fix javafx version not displayed in About Dialog (JabRef#8918)
  Redesign "Manage field names & content" dialog (JabRef#8892)
add changelog
improve buttons
@Siedlerchr
Copy link
Member

Siedlerchr commented Jun 28, 2022

I was to free to fix the l10n tests and to make the buttons more explicit.

grafik

@Siedlerchr Siedlerchr added the status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers label Jun 28, 2022
@Siedlerchr Siedlerchr marked this pull request as ready for review June 28, 2022 18:18
@ThiloteE
Copy link
Member

I tested this pr. Looking good 👍

JabRef 100.0.0
Linux 5.4.0-121-generic amd64
Java 18.0.1
JavaFX 18+12

@LIM0000
Copy link
Contributor Author

LIM0000 commented Jun 28, 2022

Thank you @ThiloteE and @Siedlerchr for helping this PR out!
Unfortunately I am not available recently.
Thanks again.

Copy link
Member

@koppor koppor left a comment

Choose a reason for hiding this comment

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

OK for me to move on here.

This is nevertheless "tough" business logic happenning here, which should be tested automatically. To track that, I opened JabRef#584.

@koppor koppor merged commit ba30547 into JabRef:main Jul 3, 2022
Siedlerchr added a commit to LIM0000/jabref that referenced this pull request Jul 9, 2022
* upstream/main:
  Disable ResearchGateTest on CI (JabRef#8955)
  Bump checkstyle from 10.1 to 10.3.1 (JabRef#8950)
  Bump checkstyle from 10.1 to 10.3.1 (JabRef#8950)
  Bump mariadb-java-client from 2.7.5 to 2.7.6 (JabRef#8953)
  Add notification when adding previous entries to new group configuration (JabRef#8919)
  Remember Sidepane width after restart (JabRef#8936)
  move "Warn about duplicates on import" preferences option (JabRef#8937)
  Fix theme switching exception (JabRef#8939)
  fix merge conflict
  Squashed 'buildres/csl/csl-locales/' changes from 969d9567ac..55459cd79f
  Squashed 'buildres/csl/csl-styles/' changes from e740261..3d3573c
  Show pdf icon for mime type in maintable (JabRef#8935)
  Fix for Dark theme not readable (JabRef#8929)
  Find Unlinked files should ignore Thumbs.db, etc (JabRef#8800)
  Try to  make reproducible builds (JabRef#8925)
  Link to new board (and refine text)
Siedlerchr added a commit that referenced this pull request Jul 10, 2022
* upstream/main:
  Bump checkstyle from 10.1 to 10.3.1 (#8950)
  Bump mariadb-java-client from 2.7.5 to 2.7.6 (#8953)
  Add notification when adding previous entries to new group configuration (#8919)
  Remember Sidepane width after restart (#8936)
  move "Warn about duplicates on import" preferences option (#8937)
  Fix theme switching exception (#8939)
Siedlerchr added a commit that referenced this pull request Jul 14, 2022
…failure-dialog

* upstream/main: (76 commits)
  New Crowdin updates (#8972)
  New Crowdin updates (#8969)
  Fix .bat errorlevel handling with pwsh.exe check (#8965)
  revert jsoup version upgrade
  Fix charset detection with utf16 and others (#8947)
  Bump classgraph from 4.8.147 to 4.8.149 (#8968)
  Bump jsoup from 1.15.1 to 1.15.2 (#8967)
  Keep UTF-8 encoding header if present (#8964)
  Cleanup index when opening a library (#8962)
  Refactor context menu entry types changing (#8957)
  Improvement on check for missing commas when importing or opening a .bib file (#8840)
  Disable ResearchGateTest on CI (#8955)
  Bump checkstyle from 10.1 to 10.3.1 (#8950)
  Bump checkstyle from 10.1 to 10.3.1 (#8950)
  Bump mariadb-java-client from 2.7.5 to 2.7.6 (#8953)
  Add notification when adding previous entries to new group configuration (#8919)
  Remember Sidepane width after restart (#8936)
  move "Warn about duplicates on import" preferences option (#8937)
  Fix theme switching exception (#8939)
  fix merge conflict
  ...

# Conflicts:
#	src/main/resources/l10n/JabRef_en.properties
Siedlerchr added a commit to LIM0000/jabref that referenced this pull request Jul 15, 2022
* upstream/main: (28 commits)
  [Bot] Update CSL styles (JabRef#8978)
  New Crowdin updates (JabRef#8972)
  New Crowdin updates (JabRef#8969)
  Fix .bat errorlevel handling with pwsh.exe check (JabRef#8965)
  revert jsoup version upgrade
  Fix charset detection with utf16 and others (JabRef#8947)
  Bump classgraph from 4.8.147 to 4.8.149 (JabRef#8968)
  Bump jsoup from 1.15.1 to 1.15.2 (JabRef#8967)
  Keep UTF-8 encoding header if present (JabRef#8964)
  Cleanup index when opening a library (JabRef#8962)
  Refactor context menu entry types changing (JabRef#8957)
  Improvement on check for missing commas when importing or opening a .bib file (JabRef#8840)
  Disable ResearchGateTest on CI (JabRef#8955)
  Bump checkstyle from 10.1 to 10.3.1 (JabRef#8950)
  Bump checkstyle from 10.1 to 10.3.1 (JabRef#8950)
  Bump mariadb-java-client from 2.7.5 to 2.7.6 (JabRef#8953)
  Add notification when adding previous entries to new group configuration (JabRef#8919)
  Remember Sidepane width after restart (JabRef#8936)
  move "Warn about duplicates on import" preferences option (JabRef#8937)
  Fix theme switching exception (JabRef#8939)
  ...

# Conflicts:
#	src/main/java/org/jabref/gui/groups/GroupTreeViewModel.java
Siedlerchr added a commit to Ognimalf/jabref that referenced this pull request Jul 18, 2022
* upstream/main: (25 commits)
  Update Gradle Wrapper from 7.4.2 to 7.5. (JabRef#8986)
  New translations JabRef_en.properties (Russian) (JabRef#8985)
  [Bot] Update CSL styles (JabRef#8978)
  New Crowdin updates (JabRef#8972)
  New Crowdin updates (JabRef#8969)
  Fix .bat errorlevel handling with pwsh.exe check (JabRef#8965)
  revert jsoup version upgrade
  Fix charset detection with utf16 and others (JabRef#8947)
  Bump classgraph from 4.8.147 to 4.8.149 (JabRef#8968)
  Bump jsoup from 1.15.1 to 1.15.2 (JabRef#8967)
  Keep UTF-8 encoding header if present (JabRef#8964)
  Cleanup index when opening a library (JabRef#8962)
  Refactor context menu entry types changing (JabRef#8957)
  Improvement on check for missing commas when importing or opening a .bib file (JabRef#8840)
  Disable ResearchGateTest on CI (JabRef#8955)
  Bump checkstyle from 10.1 to 10.3.1 (JabRef#8950)
  Bump checkstyle from 10.1 to 10.3.1 (JabRef#8950)
  Bump mariadb-java-client from 2.7.5 to 2.7.6 (JabRef#8953)
  Add notification when adding previous entries to new group configuration (JabRef#8919)
  Remember Sidepane width after restart (JabRef#8936)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
groups status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers
Projects
None yet
4 participants