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 default hierarchical context in group creation #9636

Merged
merged 5 commits into from
Feb 28, 2023

Conversation

aqurilla
Copy link
Contributor

@aqurilla aqurilla commented Feb 26, 2023

This fixes #9141 by persisting the most recently used hierarchical context within GroupPreferences. This saved context is used when opening the Add Group dialog the next time.

image

image

  • 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.

@aqurilla aqurilla marked this pull request as ready for review February 26, 2023 20:41
@HoussemNasri
Copy link
Member

Thank you for working on this.

You're definitely going on the right track.

However, I believe it would be great if I can do this without having to open the "JabRef Preferences" dialog. One option that comes to mind is to set the "Hierarchical context" to the option selected in the last session. In other words, if the user selected "Intersection," then closed and reopened the "Add Group" dialog, "Intersection" should be still selected.

You can keep most of the code you have written so far. The changes to GroupPreferences look right on point, so you shouldn't need to touch any of it. Just undo changes to GroupTab and use GroupPreferencesl#getDefaultHierarchicalContext to set the default hierarchical context in GroupDialogViewModel.

@aqurilla aqurilla marked this pull request as draft February 28, 2023 02:38
@aqurilla
Copy link
Contributor Author

Thanks for your feedback @HoussemNasri. I've updated the PR with the requested changes - the GroupDialogViewModel now persists the most recently used hierarchical context within GroupPreferences

HoussemNasri
HoussemNasri previously approved these changes Feb 28, 2023
CHANGELOG.md Outdated
@@ -12,6 +12,7 @@ Note that this project **does not** adhere to [Semantic Versioning](http://semve
### Added

- We added a field showing the BibTeX/biblatex source for added and deleted entries in the "External Changes Resolver" dialog. [#9509](https://github.com/JabRef/jabref/issues/9509)
- We added an option in Groups Preferences to set the default hierarchical context used when creating a new group [#9141](https://github.com/JabRef/jabref/issues/9141)
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 update the changelog entry? And maybe put it under Changed instead of Added.

@HoussemNasri HoussemNasri marked this pull request as ready for review February 28, 2023 16:12
@HoussemNasri HoussemNasri added the status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers label Feb 28, 2023
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.

Thank you very much! +1 also for adding the test cases!
Looking forward towards more contributions :)

@Siedlerchr Siedlerchr merged commit 74dc41b into JabRef:main Feb 28, 2023
@aqurilla
Copy link
Contributor Author

aqurilla commented Mar 1, 2023

Thanks, happy to help!

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.

Add default hierachical context in group creation
3 participants