Skip to content

Commit da79a8a

Browse files
committed
Merge remote-tracking branch 'upstream/main' into fix/ai-answer-response
* upstream/main: fix dependency configuration for jlatexmath (JabRef#16202) Open add-file link dialog when File field added; add on empty-area double-click (JabRef#16192) New Crowdin updates (JabRef#16196) Chore(deps): Bump org.postgresql:postgresql from 42.7.12 to 42.7.13 in /versions (JabRef#16194) Chore(deps): Bump org.gradlex:java-module-packaging in /build-logic (JabRef#16193) Add CSL-JSON import endpoint for correct entry-type mapping (JabRef#16151) Increase arrow button size in Entry Preview preferences tab (JabRef#16063) Add focus-triggered remove button for empty optional fields in entry editor (JabRef#16185) Render entry preview with html-to-node and remove javafx.web (JabRef#16145) Fix arrow-text spacing in entry editor collapsible sections (JabRef#16184) SLR: scopus raw query support (JabRef#16103) Update crowdin config to support CLI (JabRef#16182) 🤖 Fix entry editor fields growing wider than available space for long values (JabRef#16181) Fix file field editor: button placement, sizing, live refresh (JabRef#16172) Add madrlint MADR linter to test workflow (JabRef#16168)
2 parents 85a4a39 + 1190ca7 commit da79a8a

92 files changed

Lines changed: 2463 additions & 954 deletions

File tree

Some content is hidden

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

.github/workflows/tests-code.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,59 @@ jobs:
165165
*.md
166166
docs/**/*.md
167167
168+
madr:
169+
name: MADR ADRs
170+
# JBang needs a JDK
171+
runs-on: ubuntu-latest
172+
steps:
173+
- name: Checkout source
174+
uses: actions/checkout@v7
175+
with:
176+
submodules: 'false'
177+
show-progress: 'false'
178+
- name: Generate JBang cache key
179+
id: cache-key
180+
shell: bash
181+
run: |
182+
echo "cache_key=jbang-madrlint-$(date +%Y-%m)" >> $GITHUB_OUTPUT
183+
- name: Cache JBang
184+
# Combined cache action: restores at start and saves ~/.jbang on a
185+
# cache miss in the post-job step. A madrlint-specific key keeps this
186+
# cache separate from the shared "jbang-" cache used by setup-gradle.
187+
uses: actions/cache@v6
188+
with:
189+
path: ~/.jbang
190+
key: ${{ steps.cache-key.outputs.cache_key }}
191+
restore-keys:
192+
jbang-madrlint-
193+
- name: Setup JBang
194+
# Pinned to a commit for deterministic CI; comment tracks the tag.
195+
uses: jbangdev/setup-jbang@2b1b465a7b75f4222b81426f23a01e013aa7b95c # v0.1.1
196+
- name: Trust madrlint source
197+
run: jbang trust add https://github.com/adr/
198+
- name: Lint ADRs
199+
# madrlint is pinned to a commit (not the moving `madrlint@adr/madrlint` alias) so
200+
# upstream changes cannot alter lint results without a deliberate bump here.
201+
# To update: point MADRLINT at a newer https://github.com/adr/madrlint commit.
202+
env:
203+
MADRLINT: https://github.com/adr/madrlint/blob/e37d19b6699e45dd1543bccd858f4f49af350e49/madrlint.java
204+
run: |
205+
report="$(mktemp)"
206+
# Each ADR file is checked against the per-file rules; the docs/decisions directory itself
207+
# is checked against the directory rules (numbering, naming, collisions). Non-ADR files
208+
# (adr-template.md, index.md) are excluded via .madrlintignore.
209+
# -n11 disables the external-link check (MADR11); JabRef verifies external links elsewhere.
210+
for target in docs/decisions/*.md docs/decisions; do
211+
jbang "$MADRLINT" -n11 --quiet --output-format github-actions "$target"
212+
done | tee "$report"
213+
214+
error_count=$(grep -c '^::error' "$report" || true)
215+
if [ "$error_count" -ne 0 ]; then
216+
echo "❌ madrlint reported $error_count MADR violation(s). See the annotations above."
217+
exit 1
218+
fi
219+
echo "✅ No MADR violations."
220+
168221
changelog:
169222
name: CHANGELOG.md
170223
# JBang needs a JDK

.madrlintignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Files in docs/decisions/ that are not ADRs and therefore not linted by madrlint.
2+
# See https://github.com/adr/madrlint
3+
adr-template.md
4+
index.md

AGENTS.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,11 @@ Requires JDK 25 or later to run Gradle. Gradle downloads the necessary JDK by it
5858
./gradlew :jabgui:jpackage # Package as installer
5959
```
6060

61+
When adding or changing dependencies, follow [docs/code-howtos/dependency-management.md](docs/code-howtos/dependency-management.md).
62+
In particular, dependencies are declared via `requires` directives in `module-info.java` (versions live in `versions/build.gradle.kts`),
63+
and a mapping from *Module Name* to *Maven Coordinates* for real Java modules belongs in `gradle/modules.properties`
64+
not in ad-hoc blocks in `build-logic`.
65+
6166
---
6267

6368
## General Principles

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ Note that this project **does not** adhere to [Semantic Versioning](https://semv
1111

1212
### Added
1313

14+
- The HTTP import endpoint (`POST /libraries/{id}/entries`) now accepts CSL-JSON (`application/vnd.citationstyles.csl+json`), mapping each item to the correct entry type (e.g. conference paper, book chapter, thesis) via the citation-js-based mapping. [#16151](https://github.com/JabRef/jabref/pull/16151)
1415
- We added a new "Main" tab to the entry editor showing all fields of an entry in a single scrollable list, with one-click chips for adding optional fields and a free-form box for adding arbitrary fields. Identifiers, files and links, bibliometrics, comments, and meta fields (groups, owner, timestamps, special fields) live in collapsible sections — collapsed when empty — each offering chips for its unset fields. [#12711](https://github.com/JabRef/jabref/issues/12711)
1516
- We added auto-detection import for drag-and-dropped library files. [#15391](https://github.com/JabRef/jabref/issues/15391)
1617
- We added a preview style selection bar which shows the current preview style and allows to select a specific style without cycling through all of them. [#15820](https://github.com/JabRef/jabref/pull/15820)
@@ -39,6 +40,9 @@ Note that this project **does not** adhere to [Semantic Versioning](https://semv
3940

4041
### Changed
4142

43+
- We increased the size of arrow buttons in the Entry Preview preferences tab to improve visibility. [#16028](https://github.com/JabRef/jabref/issues/16028)
44+
- We now render the entry preview with regular JavaFX components instead of an embedded browser. Text in the preview can be selected with mouse and keyboard and copied; without a selection, "Copy selection" copies the whole preview. [#16145](https://github.com/JabRef/jabref/pull/16145)
45+
- We replaced the "MathSciNet Review" entry editor tab by identifier support for the "MR Number" field: a button next to the field opens the MathSciNet page in the web browser. [#16145](https://github.com/JabRef/jabref/pull/16145)
4246
- The `jabkit check` `github-actions` output now embeds the citation key and field name in each finding's message, so the plain workflow log lines are self-describing (not only the pull request annotations). [#16065](https://github.com/JabRef/jabref/pull/16065)
4347
- We extended the per-fetcher timeout for fulltext PDF lookups from 10 to 120 seconds so fetchers that bounce through an institutional sign-in or a slow publisher CDN have a chance to complete. [#15877](https://github.com/JabRef/jabref/pull/15877)
4448
- When an imported entry has an empty citation key, it is generated. [#15624](https://github.com/JabRef/jabref/pull/15624)
@@ -53,6 +57,7 @@ Note that this project **does not** adhere to [Semantic Versioning](https://semv
5357

5458
### Fixed
5559

60+
- We fixed an issue in the new entry editor's file field editor where files added via the add button did not appear until switching to another entry and back, and cleaned up the layout so the add/fetch-fulltext/download-URL buttons sit to the left of the file list and the list no longer leaves blank space below the last file. [#16172](https://github.com/JabRef/jabref/pull/16172)
5661
- We fixed an issue where `jabkit`'s `-p`/`--porcelain` and `-d`/`--debug` flags only took effect when placed at the exact command level where they were parsed, so e.g. `jabkit -p check consistency file.bib` silently ran without porcelain output. [#16164](https://github.com/JabRef/jabref/pull/16164)
5762
- We fixed an issue where no raw preferences values were visible anymore in the preferences filter. [#16161](https://github.com/JabRef/jabref/pull/16161)
5863
- We fixed an issue where cleanup did not detect an arXiv entry when its `url` field ended with a fragment anchor (e.g. `https://arxiv.org/html/2510.26275v2#bib`). [#16150](https://github.com/JabRef/jabref/pull/16150)

build-logic/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ dependencies {
1616
implementation("org.graalvm.buildtools:native-gradle-plugin:1.1.3")
1717
implementation("org.gradlex:extra-java-module-info:1.14.2")
1818
implementation("org.gradlex:java-module-dependencies:1.13.1")
19-
implementation("org.gradlex:java-module-packaging:1.2.1")
19+
implementation("org.gradlex:java-module-packaging:1.3")
2020
implementation("org.gradlex:java-module-testing:1.8.1")
2121
implementation("org.gradlex:jvm-dependency-conflict-resolution:2.5")
2222
implementation("org.gradle.toolchains:foojay-resolver:1.0.0")

build-logic/src/main/kotlin/JDKjsobjectDependencyMetadataRule.kt

Lines changed: 0 additions & 55 deletions
This file was deleted.

build-logic/src/main/kotlin/org.jabref.gradle.base.dependency-rules.gradle.kts

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jvmDependencyConflicts {
4747

4848
// Tell gradle which jar to use for which platform
4949
// Source: https://github.com/jjohannes/java-module-system/blob/be19f6c088dca511b6d9a7487dacf0b715dbadc1/gradle/plugins/src/main/kotlin/metadata-patch.gradle.kts#L14-L22
50-
listOf("javafx-base", "javafx-controls", "javafx-fxml", "javafx-graphics", "javafx-swing", "javafx-web", "javafx-media", "jdk-jsobject").forEach { jfxModule ->
50+
listOf("javafx-base", "javafx-controls", "javafx-fxml", "javafx-graphics", "javafx-swing", "javafx-media", "jfx-incubator-input", "jfx-incubator-richtext").forEach { jfxModule ->
5151
addJfxTarget(jfxModule, "", "none", "none") // matches the empty Jars: to get better errors
5252
addJfxTarget(jfxModule, "linux", OperatingSystemFamily.LINUX, MachineArchitecture.X86_64)
5353
addJfxTarget(jfxModule, "linux-aarch64", OperatingSystemFamily.LINUX, MachineArchitecture.ARM64)
@@ -57,19 +57,8 @@ listOf("javafx-base", "javafx-controls", "javafx-fxml", "javafx-graphics", "java
5757
}
5858

5959
fun addJfxTarget(jfxModule: String, name: String, os: String, arch: String) {
60-
if (jfxModule == "javafx-web" && name.isNotEmpty()) {
61-
// Special treatment of 'javafx-web' for the time being due to https://bugs.openjdk.org/browse/JDK-8342623.
62-
// Can be remove once Java 26 is the minimum version JabRef is built with.
63-
dependencies.components.withModule<JDKjsobjectDependencyMetadataRule>("org.openjfx:$jfxModule") {
64-
params(name, os, arch, 11)
65-
}
66-
dependencies.components.withModule<JDKjsobjectDependencyMetadataRule>("org.openjfx:$jfxModule") {
67-
params(name, os, arch, 26)
68-
}
69-
} else {
70-
jvmDependencyConflicts.patch.module("org.openjfx:$jfxModule") {
71-
addTargetPlatformVariant(name, os, arch)
72-
}
60+
jvmDependencyConflicts.patch.module("org.openjfx:$jfxModule") {
61+
addTargetPlatformVariant(name, os, arch)
7362
}
7463
}
7564

@@ -121,6 +110,9 @@ jvmDependencyConflicts.patch {
121110
removeDependency("org.openjfx:javafx-controls")
122111
removeDependency("org.openjfx:javafx-fxml")
123112
removeDependency("org.openjfx:javafx-swing")
113+
// javafx-web (WebView/WebEngine) is intentionally NOT wanted: it bundles a full WebKit, bloating the
114+
// distribution and blocking native-image. HTML rendering is done via the html-to-node library instead.
115+
// Keep it removed here and do not add it as a dependency anywhere. Enforced by CommonArchitectureTest.doNotUseJavaFXWeb.
124116
removeDependency("org.openjfx:javafx-web")
125117
// metadata decared these as runtime only, but they are 'requires transitive' in module-info
126118
addApiDependency("org.openjfx:javafx-fxml")
@@ -140,6 +132,7 @@ extraJavaModuleInfo {
140132

141133
knownModule("com.github.hypfvieh:dbus-java-core", "org.freedesktop.dbus")
142134
knownModule("com.github.hypfvieh:dbus-java-transport-native-unixsocket", "org.freedesktop.dbus.transport.jre")
135+
knownModule("org.checkerframework:checker-qual", "org.checkerframework.checker.qual")
143136

144137
module("ai.djl.huggingface:tokenizers", "ai.djl.tokenizers") {
145138
exportAllPackages()
@@ -319,6 +312,13 @@ extraJavaModuleInfo {
319312
}
320313
module("org.javassist:javassist", "org.javassist")
321314
module("org.jbibtex:jbibtex", "jbibtex")
315+
module("org.scilab.forge:jlatexmath", "jlatexmath") {
316+
exportAllPackages()
317+
mergeJar("org.scilab.forge:jlatexmath-font-greek")
318+
mergeJar("org.scilab.forge:jlatexmath-font-cyrillic")
319+
requiresTransitive("java.desktop")
320+
requiresTransitive("java.xml")
321+
}
322322
module("org.scala-lang:scala-library", "scala.library")
323323
module("pt.davidafsilva.apple:jkeychain", "jkeychain")
324324

build-logic/src/main/kotlin/org.jabref.gradle.base.repositories.gradle.kts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
repositories {
22
// Resolve from the local Maven repository (~/.m2) when experimenting locally.
33
// Enabled by `useMavenLocal`, or implicitly by `javafxVersion` (a locally published JavaFX build).
4-
val useMavenLocal = providers.gradleProperty("useMavenLocal").map(String::toBoolean).getOrElse(false)
4+
// A bare `-PuseMavenLocal` (no value) counts as true; only `-PuseMavenLocal=false` disables it.
5+
val useMavenLocal = providers.gradleProperty("useMavenLocal").map { it.isEmpty() || it.toBoolean() }.getOrElse(false)
56
val javafxOverride = providers.gradleProperty("javafxVersion").isPresent
67
if (useMavenLocal || javafxOverride) {
78
mavenLocal()

crowdin.yml

Lines changed: 45 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,45 @@
1-
files:
2-
- source: /jablib/src/main/resources/l10n/JabRef_en.properties
3-
translation: /jablib/src/main/resources/l10n/JabRef_%two_letters_code%.properties
4-
languages_mapping:
5-
two_letters_code:
6-
pt-BR: pt_BR
7-
zh-CN: zh_CN
8-
zh-TW: zh_TW
1+
#
2+
# Basic Crowdin CLI configuration
3+
# See https://crowdin.github.io/crowdin-cli/configuration for more information
4+
# See https://support.crowdin.com/developer/configuration-file/ for all available options
5+
#
6+
7+
#
8+
# Your Crowdin credentials
9+
#
10+
"project_id": "294858"
11+
"base_path": "."
12+
"base_url": "https://api.crowdin.com"
13+
# API KEY/TOKEN belongs to `crowdin.yml` in your home folder and is picked up by crowdin cli automatically
14+
#
15+
# Defines whether to preserve the original directory structure in the Crowdin project
16+
# Recommended to set to true
17+
#
18+
"preserve_hierarchy": true
19+
20+
#
21+
# Files configuration.
22+
# See https://support.crowdin.com/developer/configuration-file/ for all available options
23+
#
24+
files: [
25+
{
26+
#
27+
# Source files filter
28+
# e.g. "/resources/en/*.json"
29+
#
30+
"source": "/jablib/src/main/resources/l10n/JabRef_en.properties",
31+
32+
#
33+
# Translation files filter
34+
# e.g. "/resources/%two_letters_code%/%original_file_name%"
35+
#
36+
"translation": "/jablib/src/main/resources/l10n/JabRef_%two_letters_code%.properties",
37+
"languages_mapping": {
38+
"two_letters_code": {
39+
"pt-BR": "pt_BR",
40+
"zh-CN": "zh_CN",
41+
"zh-TW": "zh_TW"
42+
}
43+
}
44+
}
45+
]

docs/code-howtos/localization.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,12 @@ The tests in `org.jabref.logic.l10n.LocalizationConsistencyTest` check whether t
7676

7777
If the language is a variant of a language `zh_CN` or `pt_BR` it is necessary to add a language mapping for Crowdin to the crowdin.yml file in the root. Of course the properties file also has to be named according to the language code and locale.
7878

79+
## Crowdin CLI
80+
81+
For installing the Crowdin CLI, follow the official installation instructions at <https://crowdin.github.io/crowdin-cli/installation>.
82+
83+
Keep the project configuration in [`crowdin.yml`](../../crowdin.yml), but put your personal access token into the user-specific file `~/.crowdin.yml` and not into the repository file.
84+
7985
## Background information
8086

8187
The localization is tested via the class [LocalizationConsistencyTest](https://github.com/JabRef/jabref/blob/main/jablib/src/test/java/org/jabref/logic/l10n/LocalizationConsistencyTest.java).

0 commit comments

Comments
 (0)