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

feature request: add "no ranking" subgroup automatically #10264 #699

Merged
merged 0 commits into from
Oct 25, 2024

Conversation

lych2001
Copy link

@lych2001 lych2001 commented Oct 22, 2024

Add "no ranking" subgroup automatically when creating ranking groups

When creating a ranking group based on the "ranking" keyword, there is currently no subgroup created for entries without ranking. Since it's useful to easily find the entries without rank, this PR adds a "no ranking" subgroup that is created automatically alongside rank1-rank5 subgroups.

Closes JabRef#10264

Changes in this pull request

  • Added automatic creation of "no ranking" subgroup when generating groups from ranking keywords
  • The "no ranking" subgroup will appear alongside other ranking subgroups (rank1-rank5)
  • Uses consistent group hierarchy and formatting with other ranking subgroups

Implementation Details

  1. Modified GroupDialogViewModel.resultConverter() to detect when creating ranking-based groups
  2. Added logic to automatically create "no ranking" subgroup with appropriate settings
  3. Ensured the new subgroup follows the same hierarchy and styling as other ranking subgroups

Test Scenario

  1. Open JabRef
  2. Create a new group based on the "ranking" keyword
  3. Verify that a "no ranking" subgroup is automatically created
  4. Add some entries without ranking values
  5. Verify they appear in the "no ranking" subgroup
  6. Check that all other ranking subgroups (rank1-rank5) work as expected
  7. Test that the group hierarchy and coloring is consistent

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
  • Tests created for changes
  • Manually tested changed features in running JabRef
  • Screenshots added in PR description
  • Checked developer's documentation
  • Checked documentation

Screenshots

[Add before/after screenshots showing the new "no ranking" subgroup]

@koppor
Copy link
Member

koppor commented Oct 22, 2024

Please submit to https://github.com/JabRef/jabref/pulls

@koppor koppor closed this Oct 22, 2024
@lych2001
Copy link
Author

Please submit to https://github.com/JabRef/jabref/pulls

I believe I still need other members to review my code. I'm a bit confused - I created the pull request in my fork repository. Could you kindly explain why you received this pull request? I understand I should submit the PR to the JabRef main repository at https://github.com/JabRef/jabref/pulls instead, but I want to make sure I'm following the correct process.

@koppor
Copy link
Member

koppor commented Oct 22, 2024

Please submit to JabRef/jabref/pulls

I believe I still need other members to review my code.

Yeah, nice!

I'm a bit confused - I created the pull request in my fork repository.

You, did the mistake to work on the main branch. Thus, GitHub cannot create a pull request on your own repository.

Quick workaround: I repon the PR and your colleagues can comment here. After they finished, You can submit to JabRef.

Longer workaround: You rename your branch:

  1. git checkout -b fix-10264
  2. git push
  3. Ensore on GitHub that the branch is there
  4. git checkout upstream/main
  5. git push -f origin HEAD:main # This resets your main branch to the main of origin.

After these steps, you can create a pull request to your own repository.

@koppor koppor reopened this Oct 22, 2024
@koppor
Copy link
Member

koppor commented Oct 22, 2024

I enabled the "quick woraround". If you intend to follow the "Longer workaround", please let me know.

@lych2001
Copy link
Author

I enabled the "quick woraround". If you intend to follow the "Longer workaround", please let me know.

Thank you! And i have another question. I noticed that my pull request appeared in the issue before I was assigned to it. I see that you have already resolved the pull request related to this issue. For this situation, should I fork the repository again and create a new pull request for this issue, or should I proceed with addressing other issues after forking?
image
image

@koppor
Copy link
Member

koppor commented Oct 23, 2024

And i have another question. I noticed that my pull request appeared in the issue before I was assigned to it.

Lych... If you reference the issue with a full link in your commit, GitHub recognizes this. I cannot do anythign against it.

YOU created a pull request. One can create a pull request even if the issue is not assigned. GitHub is an open eco system allowing "everyone" to contribute. Even without asking before.

image

@koppor
Copy link
Member

koppor commented Oct 23, 2024

I see that you have already resolved the pull request related to this issue.

What? Which pull request? This one? It is still open. If you mean another, please add the link here.

For this situation, should I fork the repository again

No. This is NOT GitHub working style.

and create a new pull request for this issue,

You can continue.

Please, before you ask your teammates to review, please try to fix on your own:

  1. Follow all steps of https://devdocs.jabref.org/getting-into-the-code/guidelines-for-setting-up-a-local-workspace/intellij-13-code-style.html
  2. Follow the steps at https://devdocs.jabref.org/code-howtos/localization.html#adding-a-new-key (which means: Revert all changes in the non-English language files)

@R-Zhou4 R-Zhou4 force-pushed the main branch 2 times, most recently from a94dd11 to 8cf8959 Compare October 24, 2024 11:35
@koppor koppor merged commit a94dd11 into JabRef:main Oct 25, 2024
28 of 32 checks passed
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.

feature request: add "no ranking" subgroup automatically
2 participants