Skip to content

Commit dd85326

Browse files
committed
feat: add toggle functionality for journal abbreviation lists
This feature allows users to enable/disable specific journal abbreviation lists, including both the built-in list and external CSV files, without removing them from configuration. - Added toggle controls in UI with visual indicators for enabled/disabled states - Implemented filtering of abbreviations based on source enabled state - Ensured toggle states persist between application sessions - Optimized performance with efficient repository loading - Added comprehensive test coverage for new functionality Closes #12468
1 parent afc71ed commit dd85326

File tree

119 files changed

+2616
-596
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

119 files changed

+2616
-596
lines changed

.github/ghprcomment.yml

+16-11
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
- jobName: 'Unit tests'
1212
message: >
1313
JUnit tests are failing.
14-
In the area "Some checks were not successful", locate "Tests / Unit tests (pull_request)" and click on "Details".
15-
This brings you to the test output.
14+
You can see which checks are failing by locating the box "Some checks were not successful" on the pull request page.
15+
To see the test output, locate "Tests / Unit tests (pull_request)" and click on it.
1616
1717
1818
You can then run these tests in IntelliJ to reproduce the failing tests locally.
@@ -21,30 +21,35 @@
2121
message: >
2222
Your code currently does not meet [JabRef's code guidelines](https://devdocs.jabref.org/getting-into-the-code/guidelines-for-setting-up-a-local-workspace/intellij-13-code-style.html).
2323
We use [Checkstyle](https://checkstyle.sourceforge.io/) to identify issues.
24-
Please carefully follow [the setup guide for the codestyle](https://devdocs.jabref.org/getting-into-the-code/guidelines-for-setting-up-a-local-workspace/intellij-13-code-style.html).
25-
Afterwards, please [run checkstyle locally](https://devdocs.jabref.org/getting-into-the-code/guidelines-for-setting-up-a-local-workspace/intellij-13-code-style.html#run-checkstyle) and fix the issues.
24+
You can see which checks are failing by locating the box "Some checks were not successful" on the pull request page.
25+
To see the test output, locate "Tests / Checkstyle (pull_request)" and click on it.
2626
2727
2828
In case of issues with the import order, double check that you [activated Auto Import](https://devdocs.jabref.org/getting-into-the-code/guidelines-for-setting-up-a-local-workspace/intellij-13-code-style.html#enable-proper-import-cleanup).
2929
You can trigger fixing imports by pressing <kbd>Ctrl</kbd>+<kbd>Alt</kbd>+<kbd>O</kbd> to trigger [Optimize Imports](https://www.jetbrains.com/guide/tips/optimize-imports/).
30+
31+
32+
Please carefully follow [the setup guide for the codestyle](https://devdocs.jabref.org/getting-into-the-code/guidelines-for-setting-up-a-local-workspace/intellij-13-code-style.html).
33+
Afterwards, please [run checkstyle locally](https://devdocs.jabref.org/getting-into-the-code/guidelines-for-setting-up-a-local-workspace/intellij-13-code-style.html#run-checkstyle) and fix the issues, commit, and push.
3034
- jobName: OpenRewrite
3135
message: >
3236
Your code currently does not meet JabRef's code guidelines.
3337
We use [OpenRewrite](https://docs.openrewrite.org/) to ensure "modern" Java coding practices.
34-
The issues found can be **automatically fixed**.
35-
Please execute the gradle task *`rewriteRun`*, check the results, commit, and push.
38+
You can see which checks are failing by locating the box "Some checks were not successful" on the pull request page.
39+
To see the test output, locate "Tests / OpenRewrite (pull_request)" and click on it.
3640
37-
38-
You can check the detailed error output by navigating to your pull request, selecting the tab "Checks", section "Tests" (on the left), subsection "OpenRewrite".
41+
42+
The issues found can be **automatically fixed**.
43+
Please execute the gradle task *`rewriteRun`* from the [`rewrite` group of the Gradle Tool window](https://devdocs.jabref.org/code-howtos/faq.html#failing-openrewrite-tests) in IntelliJ, then check the results, commit, and push.
3944
- jobName: Modernizer
4045
message: >
4146
Your code currently does not meet JabRef's code guidelines.
4247
We use [Gradle Modernizer Plugin](https://github.com/andygoossens/gradle-modernizer-plugin#gradle-modernizer-plugin) to ensure "modern" Java coding practices.
43-
Please fix the detected errors, commit, and push.
48+
You can see which checks are failing by locating the box "Some checks were not successful" on the pull request page.
49+
To see the test output, locate "Tests / Modernizer (pull_request)" and click on it.
4450
4551
46-
You can check the detailed error output by navigating to your pull request, selecting the tab "Checks", section "Tests" (on the left), subsection "Modernizer".
47-
52+
Please fix the detected errors, commit, and push.
4853
4954
# CHANGELOG.md and *.md
5055

.github/workflows/on-issue-comment.yml

+1-3
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
with:
1818
github_token: '${{ secrets.GITHUB_TOKEN }}'
1919
days_until_unassign: 14
20-
maintainers: 'koppor,Siedlerchr,ThiloteE,calixtus,HoussemNasri,subhramit,LinusDietz'
20+
maintainers: 'koppor,Siedlerchr,ThiloteE,calixtus,HoussemNasri,subhramit,InAnYan,LinusDietz'
2121
assigned_comment: |
2222
👋 Hey @{{ handle }}, thank you for your interest in this issue! 🎉
2323
@@ -28,8 +28,6 @@ jobs:
2828
Having any questions or issues? Feel free to ask here on GitHub. Need help setting up your local workspace? Join the conversation on [JabRef's Gitter chat](https://gitter.im/JabRef/jabref). And don't hesitate to open a (draft) pull request early on to show the direction it is heading towards. This way, you will receive valuable feedback.
2929
3030
Happy coding! 🚀
31-
32-
⏳ Please note, you will be automatically unassigned if there is not a (draft) pull request within **{{ total_days }} days** (by **{{ unassigned_date }}**).
3331
assignment_suggestion_comment: >
3432
👋 Hey @{{ handle }}, looks like you’re eager to work on this issue—great! 🎉
3533
It also looks like you skipped reading our [CONTRIBUTING.md](https://github.com/JabRef/jabref/blob/main/CONTRIBUTING.md), which explains exactly how to participate. No worries, it happens to the best of us.

.github/workflows/on-pr-closed.yml

+24-15
Original file line numberDiff line numberDiff line change
@@ -13,21 +13,27 @@ jobs:
1313
contents: read
1414
issues: write
1515
steps:
16+
- name: Echo PR number and URL
17+
run: |
18+
echo "PR Number: ${{ github.event.pull_request.number }}"
19+
echo "PR URL: ${{ github.event.pull_request.html_url }}"
1620
- name: Determine issue number
1721
id: get_issue_number
1822
uses: koppor/ticket-check-action@add-output
1923
with:
2024
token: ${{ secrets.GITHUB_TOKEN }}
21-
ticketLink: 'https://github.com/:owner/:repo/issues/%ticketNumber%'
25+
ticketLink: 'https://github.com/JabRef/jabref/issues/%ticketNumber%'
2226
ticketPrefix: '#'
2327
titleRegex: '^#(?<ticketNumber>\d+)'
2428
branchRegex: '^(?<ticketNumber>\d+)'
2529
bodyRegex: '#(?<ticketNumber>\d+)'
26-
bodyURLRegex: 'http(s?):\/\/(github.com)(\/:owner)(\/:repo)(\/issues)\/(?<ticketNumber>\d+)'
30+
bodyURLRegex: 'http(s?):\/\/(github.com)(\/JabRef)(\/jabref)(\/issues)\/(?<ticketNumber>\d+)'
2731
outputOnly: true
2832
- uses: actions/checkout@v4
2933
- name: Remove assignee
30-
run: gh issue edit ${{ steps.get_issue_number.outputs.ticketNumber }} --remove-assignee ${{ github.event.pull_request.user.login }}
34+
run: |
35+
# "brute force" remove assignee - it might happen that the contributor was unassinged, but the PR closed later; therefore we need " || true" to ignore any error
36+
gh issue edit ${{ steps.get_issue_number.outputs.ticketNumber }} --remove-assignee ${{ github.event.pull_request.user.login }} || true
3137
env:
3238
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3339
- name: Check assignees
@@ -42,19 +48,15 @@ jobs:
4248
fi
4349
env:
4450
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
45-
- name: Remove assigned label
46-
if: steps.check_assignee.outputs.assigned == 'no'
47-
run: gh issue edit ${{ steps.get_issue_number.outputs.ticketNumber }} --remove-label "📍 Assigned"
48-
env:
49-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
50-
- name: Remove pinned label
51-
if: steps.check_assignee.outputs.assigned == 'no'
52-
run: gh issue edit ${{ steps.get_issue_number.outputs.ticketNumber }} --remove-label "📌 Pinned"
53-
env:
54-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
55-
- name: Remove FirstTimeCodeContribution label
51+
- name: Remove labels assigned, reminder-sent, pinned, and "FirstTimeCodeContribution"
5652
if: steps.check_assignee.outputs.assigned == 'no'
57-
run: gh issue edit ${{ steps.get_issue_number.outputs.ticketNumber }} --remove-label "FirstTimeCodeContribution"
53+
run: |
54+
set -e
55+
56+
gh issue edit ${{ steps.get_issue_number.outputs.ticketNumber }} --remove-label "📍 Assigned"
57+
gh issue edit ${{ steps.get_issue_number.outputs.ticketNumber }} --remove-label "🔔 reminder-sent"
58+
gh issue edit ${{ steps.get_issue_number.outputs.ticketNumber }} --remove-label "📌 Pinned"
59+
gh issue edit ${{ steps.get_issue_number.outputs.ticketNumber }} --remove-label "FirstTimeCodeContribution"
5860
env:
5961
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6062
- name: Move issue to "Free to take" in "Good First Issues"
@@ -81,3 +83,10 @@ jobs:
8183
default-column: "Free to take"
8284
issue-number: ${{ steps.get_issue_number.outputs.ticketNumber }}
8385
skip-if-not-in-project: true
86+
close_issue_on_pr_merge:
87+
runs-on: ubuntu-latest
88+
steps:
89+
- name: Closes issues related to a merged pull request.
90+
uses: ldez/[email protected]
91+
env:
92+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/on-pr-opened.yml

-1
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,6 @@ jobs:
111111
run: gh issue edit ${{ steps.get_issue_number.outputs.ticketNumber }} --add-label "📌 Pinned"
112112
env:
113113
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
114-
115114
conflicts_with_target:
116115
name: Conflicts with target branch
117116
runs-on: ubuntu-latest
+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: On PR synchronize
2+
3+
on:
4+
# _target is required
5+
pull_request_target:
6+
types:
7+
- synchronize
8+
9+
jobs:
10+
conflicts_with_target:
11+
name: Conflicts with target branch
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v4
15+
with:
16+
show-progress: 'false'
17+
- name: Check PR mergeability
18+
id: check_mergeable
19+
run: |
20+
MERGEABLE=$(gh pr view --json mergeable ${{ github.event.number }} --template '{{.mergeable}}')
21+
if [ "$MERGEABLE" == "CONFLICTING" ]; then
22+
echo "❌ Merge conflicts"
23+
exit 1
24+
fi
25+
echo "✅ No merge conflicts"
26+
env:
27+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
28+
upload-pr-number:
29+
runs-on: ubuntu-latest
30+
steps:
31+
- name: Create pr_number.txt
32+
run: echo "${{ github.event.number }}" > pr_number.txt
33+
- uses: actions/upload-artifact@v4
34+
with:
35+
name: pr_number
36+
path: pr_number.txt

.github/workflows/pr-comment.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ name: Comment on PR
77

88
on:
99
workflow_run:
10-
workflows: ["Tests", "On PR opened"]
10+
workflows: ["Tests", "On PR opened", "On PR synchronize"]
1111
# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#running-a-workflow-based-on-the-conclusion-of-another-workflow
1212
types: [completed]
1313
workflow_dispatch:

.github/workflows/tests.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -437,7 +437,7 @@ jobs:
437437
with:
438438
show-progress: 'false'
439439
- name: Merge Conflict finder
440-
uses: olivernybroe/action-conflict-finder@v4.0
440+
uses: olivernybroe/action-conflict-finder@v4.1
441441

442442
no-force-push:
443443
if: github.event_name == 'pull_request'

.github/workflows/unassign-issues.yml

+21-2
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,32 @@ jobs:
1919
uses: takanome-dev/assign-issue-action@edge
2020
with:
2121
github_token: '${{ secrets.GITHUB_TOKEN }}'
22-
days_until_unassign: 14
22+
reminder_comment: |
23+
### ⏰ Assignment Reminder
24+
25+
Hi @{{ handle }}, this is a friendly reminder about your assignment to this issue.
26+
27+
> [!WARNING]
28+
> This issue will be **automatically unassigned** in **{{ days_remaining }} days** if there's no activity.
29+
30+
<details open>
31+
<summary>How to keep your assignment</summary>
32+
33+
\
34+
If you are working on it, you can prevent automatic unassignment by:
35+
36+
- Submitting a draft PR with your progress
37+
- Asking for the **{{{ pin_label }}}** label if you need more time
38+
</details>
39+
40+
We appreciate your contribution and are here to help if needed!
41+
days_until_unassign: 21
2342
unassigned_comment: |
2443
### 📋 Assignment Update
2544
2645
Hi @{{ handle }}, due to inactivity, you have been unassigned from this issue.
2746
28-
<details open>
47+
<details>
2948
<summary>Next steps</summary>
3049
3150
\

CHANGELOG.md

+11
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ Note that this project **does not** adhere to [Semantic Versioning](https://semv
1111

1212
### Added
1313

14+
- We added buttons "Add example entry" and "Import existing PDFs" when a library is empty, making it easier for new users to get started. [#12662](https://github.com/JabRef/jabref/issues/12662)
15+
- In the Open/LibreOffice integration, we added the provision to modify the bibliography title and its format for CSL styles, in the "Select style" dialog. [#12663](https://github.com/JabRef/jabref/issues/12663)
1416
- We added a new Welcome tab which shows a welcome screen if no database is open. [#12272](https://github.com/JabRef/jabref/issues/12272)
1517
- We added <kbd>F5</kbd> as a shortcut key for fetching data and <kbd>Alt+F</kbd> as a shortcut for looking up data using DOI. [#11802](https://github.com/JabRef/jabref/issues/11802)
1618
- We added a feature to rename the subgroup, with the keybinding (<kbd>F2</kbd>) for quick access. [#11896](https://github.com/JabRef/jabref/issues/11896)
@@ -24,6 +26,9 @@ Note that this project **does not** adhere to [Semantic Versioning](https://semv
2426
- We added a feature for enabling drag-and-drop of files into groups [#12540](https://github.com/JabRef/jabref/issues/12540)
2527
- We added support for reordering keywords via drag and drop, automatic alphabetical ordering, and improved pasting and editing functionalities in the keyword editor. [#10984](https://github.com/JabRef/jabref/issues/10984)
2628
- We added a new functionality where author names having multiple spaces in-between will be considered as separate user block as it does for " and ". [#12701](https://github.com/JabRef/jabref/issues/12701)
29+
- We enhanced support for parsing XMP metadata from PDF files. [#12829](https://github.com/JabRef/jabref/issues/12829)
30+
- We added a "Preview" header in the JStyles tab in the "Select style" dialog, to make it consistent with the CSL styles tab. [#12838](https://github.com/JabRef/jabref/pull/12838)
31+
- We added ability to toggle journal abbreviation lists (including built-in and external CSV files) on/off in preferences. [#{Issue Number}](https://github.com/JabRef/jabref/pull/{Issue Number})
2732

2833
### Changed
2934

@@ -56,9 +61,11 @@ Note that this project **does not** adhere to [Semantic Versioning](https://semv
5661
- We changed the phrase "Cleanup entries" to "Clean up entries". [#12703](https://github.com/JabRef/jabref/issues/12703)
5762
- A tooltip now appears after 300ms (instead of 2s). [#12649](https://github.com/JabRef/jabref/issues/12649)
5863
- We improved search in preferences and keybindings. [#12647](https://github.com/JabRef/jabref/issues/12647)
64+
- We improved the performance of the LibreOffice integration when inserting CSL citations/bibliography. [#12851](https://github.com/JabRef/jabref/pull/12851)
5965

6066
### Fixed
6167

68+
- We fixed an issue where the drag'n'drop functionality in entryeditor did not work [#12561](https://github.com/JabRef/jabref/issues/12561)
6269
- We fixed an issue where the F4 shortcut key did not work without opening the right-click context menu. [#6101](https://github.com/JabRef/jabref/pull/6101)
6370
- We fixed an issue where the file renaming dialog was not resizable and its size was too small for long file names. [#12518](https://github.com/JabRef/jabref/pull/12518)
6471
- We fixed an issue where the name of the untitled database was shown as a blank space in the right-click context menu's "Copy to" option. [#12459](https://github.com/JabRef/jabref/pull/12459)
@@ -83,11 +90,15 @@ Note that this project **does not** adhere to [Semantic Versioning](https://semv
8390
- We fixed an issue where duplicate items cannot be removed correctly when merging groups or keywords. [#12585](https://github.com/JabRef/jabref/issues/12585)
8491
- We fixed an issue where JabRef displayed an incorrect deletion notification when canceling entry deletion [#12645](https://github.com/JabRef/jabref/issues/12645)
8592
- We fixed an issue where JabRef displayed an incorrect deletion notification when canceling entry deletion. [#12645](https://github.com/JabRef/jabref/issues/12645)
93+
- We fixed an issue where JabRref wrote wrong field names into the PDF. [#12833](https://github.com/JabRef/jabref/pulls/12833)
8694
- We fixed an issue where an exception would occur when running abbreviate journals for multiple entries. [#12634](https://github.com/JabRef/jabref/issues/12634)
8795
- We fixed an issue where JabRef displayed dropdown triangle in wrong place in "Search for unlinked local files" dialog [#12713](https://github.com/JabRef/jabref/issues/12713)
8896
- We fixed an issue where JabRef would not open if an invalid external journal abbreviation path was encountered. [#12776](https://github.com/JabRef/jabref/issues/12776)
8997
- We fixed a bug where LaTeX commands were not removed from filenames generated using the `[bibtexkey] - [fulltitle]` pattern. [#12188](https://github.com/JabRef/jabref/issues/12188)
9098
- We fixed an issue where JabRef interface would not properly refresh after a group removal. [#11487](https://github.com/JabRef/jabref/issues/11487)
99+
- We fixed an issue where valid DOI could not be imported if it had special characters like `<` or `>`. [#12434](https://github.com/JabRef/jabref/issues/12434)
100+
- We fixed an issue where the tooltip only displayed the first linked file when hovering. [#12470](https://github.com/JabRef/jabref/issues/12470)
101+
- We fixed an issue where some texts in the "Citation Information" tab and the "Preferences" dialog could not be translated. [#12883](https://github.com/JabRef/jabref/pull/12883)
91102

92103
### Removed
93104

0 commit comments

Comments
 (0)