Skip to content

Add rename subgroup option#12563

Merged
Siedlerchr merged 6 commits into
JabRef:mainfrom
priyanshu16095:addRenameGroup
Mar 3, 2025
Merged

Add rename subgroup option#12563
Siedlerchr merged 6 commits into
JabRef:mainfrom
priyanshu16095:addRenameGroup

Conversation

@priyanshu16095

@priyanshu16095 priyanshu16095 commented Feb 24, 2025

Copy link
Copy Markdown
Contributor

Fixes #11896

This PR adds the functionality to rename a subgroup using the F2 keybinding.
It converts the text into a text field, allowing the user to change the name, providing a better user experience.

Mandatory checks

  • I own the copyright of the code submitted and I licence it under the MIT license
  • Change in CHANGELOG.md described in a way that is understandable for the average user (if change is visible to the user)
  • 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.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

JUnit tests are failing. In the area "Some checks were not successful", locate "Tests / Unit tests (pull_request)" and click on "Details". This brings you to the test output.
You can then run these tests in IntelliJ to reproduce the failing tests locally. We offer a quick test running howto in the section Final build system checks in our setup guide.

@priyanshu16095

Copy link
Copy Markdown
Contributor Author

@priyanshu16095 I hope you have seen the comments on the PR - F2 should just open the groups edit window (which already focuses the gorup name IMHO)

I have implemented this in a different way, like in VS Code.

@Siedlerchr

Copy link
Copy Markdown
Member

On mac pressing Fn + F2 does not do anything right now :(
Fn + F1 correclty opens the help

@priyanshu16095

priyanshu16095 commented Feb 25, 2025

Copy link
Copy Markdown
Contributor Author

Yeah, it currently doesn't work properly.

The issues are:

  • Keybinding
  • The text field does not appear

But the renaming works fine.
I pushed this code to work on another branch.

@koppor

koppor commented Feb 25, 2025

Copy link
Copy Markdown
Member

I think, code to check for an existing group is missing.

Since this gets very complex, my proposal was to just open the existing groups dialog.

When pressing F2 just the functionality of "Edit group" should be called. I know that the UX is not that good, but this UI issue is not a high priority one. And with F2 working, the user intention is adressed.

image

@priyanshu16095

Copy link
Copy Markdown
Contributor Author
Recording.2025-02-27.mp4

Now, the keybinding works fine.

@priyanshu16095 priyanshu16095 marked this pull request as ready for review February 27, 2025 00:25
koppor
koppor previously requested changes Feb 27, 2025
Comment thread CHANGELOG.md Outdated
Comment thread src/main/java/org/jabref/gui/groups/GroupNodeViewModel.java
Co-authored-by: Oliver Kopp <kopp.dev@gmail.com>

@Siedlerchr Siedlerchr left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

works

@Siedlerchr Siedlerchr dismissed koppor’s stale review March 3, 2025 17:41

changes were addressed

@Siedlerchr Siedlerchr added this pull request to the merge queue Mar 3, 2025
Merged via the queue into JabRef:main with commit 9e11cfc Mar 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add "Rename group" to group context menu and add keybinding for F2

3 participants