Skip to content

Feature custom properties cayw endpoint#15128

Merged
palukku merged 74 commits into
JabRef:mainfrom
LoayTarek5:feature-custom-properties-CAYW-endpoint
Feb 26, 2026
Merged

Feature custom properties cayw endpoint#15128
palukku merged 74 commits into
JabRef:mainfrom
LoayTarek5:feature-custom-properties-CAYW-endpoint

Conversation

@LoayTarek5

@LoayTarek5 LoayTarek5 commented Feb 16, 2026

Copy link
Copy Markdown
Collaborator

Related issues and pull requests

Closes #13821

PR Description

Added custom citation properties (locator, prefix, suffix, omit author) to the CAYW endpoint,
when users click a selected entry chip, a popup appears allowing them to set properties,
all formatters (Pandoc, BibLaTeX, Natbib, Typst, MMD, SimpleJson) now include these properties in their output.

Steps to test

1- open a library
2- navigate to http://localhost:23119/better-bibtex/cayw in your browser
3- select one or more entries
4- Click on a selected entry chi,then a popup should appear with(Locator type dropdown + value field+ prefix + suffix fields+ Omit Author checkbox)
5-Fill properties
6- click anywhere outside the popup to close and save, then click "Cite"
image
image
image
image
image

Checklist

  • I own the copyright of the code submitted and I license it under the MIT license
  • I manually tested my changes in running JabRef (always required)
  • I added JUnit tests for changes (if applicable)
  • I added screenshots in the PR description (if change is visible to the user)
  • I added a screenshot in the PR description showing a library with a single entry with me as author and as title the issue number
  • I described the change in CHANGELOG.md in a way that can be understood by the average user (if change is visible to the user)
  • [/] I checked the user documentation for up to dateness and submitted a pull request to our user documentation repository

@qodo-free-for-open-source-projects

Copy link
Copy Markdown
Contributor

Review Summary by Qodo

Add citation properties support to CAYW endpoint with custom popup UI

✨ Enhancement

Grey Divider

Walkthroughs

Description
• Added citation properties (locator, prefix, suffix, omit author) to CAYW endpoint
• Implemented popup UI for users to set custom citation properties on selected entries
• Updated all formatters (Pandoc, BibLaTeX, Natbib, Typst, MMD, SimpleJson) to include properties in
  output
• Added comprehensive unit tests for citation properties and formatter behavior
Diagram
flowchart LR
  A["User selects entry in CAYW"] --> B["Click entry chip"]
  B --> C["CitationPropertiesPopup appears"]
  C --> D["Set locator, prefix, suffix, omit author"]
  D --> E["Properties saved to CitationProperties"]
  E --> F["Formatters apply properties"]
  F --> G["Output includes custom properties"]
Loading

Grey Divider

File Changes

1. jabsrv/src/main/java/org/jabref/http/server/cayw/gui/CitationProperties.java ✨ Enhancement +85/-0

New class managing citation property state

jabsrv/src/main/java/org/jabref/http/server/cayw/gui/CitationProperties.java


2. jabsrv/src/main/java/org/jabref/http/server/cayw/gui/LocatorType.java ✨ Enhancement +51/-0

Enum defining locator types with abbreviations

jabsrv/src/main/java/org/jabref/http/server/cayw/gui/LocatorType.java


3. jabsrv/src/main/java/org/jabref/http/server/cayw/gui/CitationPropertiesPopup.java ✨ Enhancement +75/-0

New popup UI for setting citation properties

jabsrv/src/main/java/org/jabref/http/server/cayw/gui/CitationPropertiesPopup.java


View more (13)
4. jabsrv/src/main/java/org/jabref/http/server/cayw/gui/CAYWEntry.java ✨ Enhancement +2/-1

Added citationProperties field to record

jabsrv/src/main/java/org/jabref/http/server/cayw/gui/CAYWEntry.java


5. jabsrv/src/main/java/org/jabref/http/server/cayw/gui/SelectedItemsContainer.java ✨ Enhancement +2/-1

Implemented click handler to show popup

jabsrv/src/main/java/org/jabref/http/server/cayw/gui/SelectedItemsContainer.java


6. jabsrv/src/main/java/org/jabref/http/server/cayw/CAYWResource.java ✨ Enhancement +2/-1

Initialize CitationProperties for new entries

jabsrv/src/main/java/org/jabref/http/server/cayw/CAYWResource.java


7. jabsrv/src/main/java/org/jabref/http/server/cayw/format/PandocFormatter.java ✨ Enhancement +19/-9

Support citation properties in Pandoc output

jabsrv/src/main/java/org/jabref/http/server/cayw/format/PandocFormatter.java


8. jabsrv/src/main/java/org/jabref/http/server/cayw/format/BibLatexFormatter.java ✨ Enhancement +33/-9

Support citation properties in BibLaTeX output

jabsrv/src/main/java/org/jabref/http/server/cayw/format/BibLatexFormatter.java


9. jabsrv/src/main/java/org/jabref/http/server/cayw/format/NatbibFormatter.java ✨ Enhancement +27/-8

Support citation properties in Natbib output

jabsrv/src/main/java/org/jabref/http/server/cayw/format/NatbibFormatter.java


10. jabsrv/src/main/java/org/jabref/http/server/cayw/format/TypstFormatter.java ✨ Enhancement +25/-15

Support citation properties in Typst output

jabsrv/src/main/java/org/jabref/http/server/cayw/format/TypstFormatter.java


11. jabsrv/src/main/java/org/jabref/http/server/cayw/format/MMDFormatter.java ✨ Enhancement +20/-9

Support citation properties in MMD output

jabsrv/src/main/java/org/jabref/http/server/cayw/format/MMDFormatter.java


12. jabsrv/src/main/java/org/jabref/http/server/cayw/format/SimpleJsonFormatter.java ✨ Enhancement +3/-1

Pass citation properties to SimpleJson formatter

jabsrv/src/main/java/org/jabref/http/server/cayw/format/SimpleJsonFormatter.java


13. jabsrv/src/main/java/org/jabref/http/dto/cayw/SimpleJson.java ✨ Enhancement +17/-4

Add citation property fields to record

jabsrv/src/main/java/org/jabref/http/dto/cayw/SimpleJson.java


14. jabsrv/src/test/java/org/jabref/http/server/cayw/CitationPropertiesTest.java 🧪 Tests +152/-0

Unit tests for CitationProperties class

jabsrv/src/test/java/org/jabref/http/server/cayw/CitationPropertiesTest.java


15. jabsrv/src/test/java/org/jabref/http/server/cayw/format/CAYWFormattersTest.java 🧪 Tests +156/-1

Tests for formatters with citation properties

jabsrv/src/test/java/org/jabref/http/server/cayw/format/CAYWFormattersTest.java


16. CHANGELOG.md 📝 Documentation +1/-0

Document citation properties feature addition

CHANGELOG.md


Grey Divider

Qodo Logo

@LoayTarek5

LoayTarek5 commented Feb 16, 2026

Copy link
Copy Markdown
Collaborator Author

I did my best to add unit tests to the new citation properties and formmaters, and I tried to read some documents related to unit tests and in the codebase in general
Maybe it needs to improve, so if any more references can help, I am ready for it

@qodo-free-for-open-source-projects

qodo-free-for-open-source-projects Bot commented Feb 16, 2026

Copy link
Copy Markdown
Contributor

Code Review by Qodo

🐞 Bugs (5) 📘 Rule violations (2) 📎 Requirement gaps (0)

Grey Divider


Action required

1. Popup text not localized📘 Rule violation ✓ Correctness
Description
New user-facing strings in CitationPropertiesPopup are hard-coded (not localized) and include
labels ending with :. This breaks JabRef UI text standards and conventions and makes
translation/consistency harder.
Code

jabsrv/src/main/java/org/jabref/http/server/cayw/gui/CitationPropertiesPopup.java[R41-59]

+        CheckBox omitAuthorCheck = new CheckBox("Omit Author");
+        omitAuthorCheck.setSelected(properties.isOmitAuthor());
+
+        locatorTypeCombo.valueProperty().addListener((_, _, val) -> properties.setLocatorType(val));
+        locatorValueField.textProperty().addListener((_, _, val) -> properties.setLocatorValue(val));
+        prefixField.textProperty().addListener((_, _, val) -> properties.setPrefix(val));
+        suffixField.textProperty().addListener((_, _, val) -> properties.setSuffix(val));
+        omitAuthorCheck.selectedProperty().addListener((_, _, val) -> properties.setOmitAuthor(val));
+
+        GridPane grid = new GridPane();
+        grid.setHgap(8);
+        grid.setVgap(8);
+
+        grid.add(locatorTypeCombo, 0, 0);
+        grid.add(locatorValueField, 1, 0);
+        grid.add(new Label("Prefix:"), 0, 1);
+        grid.add(prefixField, 1, 1);
+        grid.add(new Label("Suffix:"), 0, 2);
+        grid.add(suffixField, 1, 2);
Evidence
PR Compliance requires user-facing UI strings to be localized and UI labels to not end with a
trailing colon. The added popup uses raw strings like Omit Author, Prefix:, and Suffix:
directly in JavaFX controls.

AGENTS.md
AGENTS.md
jabsrv/src/main/java/org/jabref/http/server/cayw/gui/CitationPropertiesPopup.java[41-41]
jabsrv/src/main/java/org/jabref/http/server/cayw/gui/CitationPropertiesPopup.java[56-59]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
User-facing strings in the new CAYW citation-properties popup are hard-coded (not localized) and some labels end with a trailing `:`.
## Issue Context
JabRef requires localized UI strings (Java: `Localization.lang(...)`) and forbids trailing colons in labels.
## Fix Focus Areas
- jabsrv/src/main/java/org/jabref/http/server/cayw/gui/CitationPropertiesPopup.java[41-59]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


2. Typst drops prefix/suffix🐞 Bug ✓ Correctness
Description
TypstFormatter ignores CitationProperties prefix/suffix, so user-entered values are silently lost in
Typst output. This contradicts the UI and PR intent of including custom properties in formatter
output.
Code

jabsrv/src/main/java/org/jabref/http/server/cayw/format/TypstFormatter.java[R37-45]

+            List<String> args = new ArrayList<>();
+            args.add(keyRef);
+            props.getFormattedLocator().ifPresent(l -> args.add("supplement: [%s]".formatted(l)));
+            if (props.isOmitAuthor()) {
+                args.add("form: \"year\"");
+            }
+
+            return "#cite(%s)".formatted(String.join(", ", args));
+        });
Evidence
The popup allows editing prefix/suffix on a per-entry basis, but TypstFormatter only reads locator
and omitAuthor, never prefix/suffix, so those values cannot appear in Typst output.

jabsrv/src/main/java/org/jabref/http/server/cayw/format/TypstFormatter.java[29-45]
jabsrv/src/main/java/org/jabref/http/server/cayw/gui/CitationPropertiesPopup.java[32-48]
jabsrv/src/main/java/org/jabref/http/server/cayw/gui/CitationProperties.java[35-49]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
`TypstFormatter` currently ignores `CitationProperties.prefix` and `CitationProperties.suffix`, causing user-entered values to be dropped from Typst output.
### Issue Context
The UI exposes prefix/suffix in `CitationPropertiesPopup`, and other formatters (e.g., Pandoc/BibLaTeX) output them.
### Fix Focus Areas
- jabsrv/src/main/java/org/jabref/http/server/cayw/format/TypstFormatter.java[29-46]
- jabsrv/src/test/java/org/jabref/http/server/cayw/format/CAYWFormattersTest.java[210-249] (add Typst prefix/suffix tests)
- jabsrv/src/main/java/org/jabref/http/server/cayw/gui/CitationProperties.java[35-49]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools



Remediation recommended

3. Typo in CAYWEntry comment 📘 Rule violation ✓ Correctness
Description
A modified comment in CAYWEntry contains a typo (bases instead of based). This violates the
requirement to keep written content free of obvious errors.
Code

jabsrv/src/main/java/org/jabref/http/server/cayw/gui/CAYWEntry.java[11]

+        String description, // Used when hovering and used as bases on the second line
Evidence
The checklist requires fixing obvious typos in comments/documentation. The updated line includes the
misspelling bases in a comment that was modified in this PR.

jabsrv/src/main/java/org/jabref/http/server/cayw/gui/CAYWEntry.java[11-11]
Best Practice: Learned patterns

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
A comment typo was introduced/retained on a line modified by this PR.
## Issue Context
Compliance requires keeping comments/documentation free of obvious typos.
## Fix Focus Areas
- jabsrv/src/main/java/org/jabref/http/server/cayw/gui/CAYWEntry.java[11-11]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


4. BibLaTeX command pluralization🐞 Bug ✓ Correctness
Description
BibLatexFormatter switches to a multicite form by appending "s" to the user-supplied command when
any properties are present. If the caller already supplies a plural command (or a command without a
plural form), this can generate an invalid control sequence and break output.
Code

jabsrv/src/main/java/org/jabref/http/server/cayw/format/BibLatexFormatter.java[R47-51]

+        return "\\%ss%s%s".formatted(command, star,
+                caywEntries.stream()
+                           .map(this::formatMulticiteEntry)
+                           .flatMap(Optional::stream)
+                           .collect(Collectors.joining("")));
Evidence
The command comes directly from the command query param and is not validated/normalized. When
properties are present, BibLatexFormatter unconditionally renders \%ss..., effectively forcing
pluralization by string concatenation.

jabsrv/src/main/java/org/jabref/http/server/cayw/format/BibLatexFormatter.java[47-51]
jabsrv/src/main/java/org/jabref/http/server/cayw/CAYWQueryParams.java[48-50]
jabsrv/src/main/java/org/jabref/http/server/cayw/format/FormatterService.java[12-34]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
`BibLatexFormatter` builds a multicite command using `&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;quot;\\%ss&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;quot;.formatted(command, ...)`, which can produce invalid output if the user already passed a plural command (e.g., `autocites`) or a command without a plural form.
### Issue Context
The `command` value is taken directly from the query parameter (`CAYWQueryParams.getCommand()`) and is not normalized.
### Fix Focus Areas
- jabsrv/src/main/java/org/jabref/http/server/cayw/format/BibLatexFormatter.java[28-52]
- jabsrv/src/main/java/org/jabref/http/server/cayw/CAYWQueryParams.java[48-50]
- jabsrv/src/test/java/org/jabref/http/server/cayw/format/CAYWFormattersTest.java[150-183] (add tests for plural command input / single-entry-with-properties)

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


5. BibLaTeX mixed omitAuthor🐞 Bug ✓ Correctness
Description
When any selected entry has omitAuthor=true, BibLatexFormatter applies a single starred multicite
command, affecting all entries in that output. If users set omit-author for only some entries, the
current output cannot preserve per-entry intent.
Code

jabsrv/src/main/java/org/jabref/http/server/cayw/format/BibLatexFormatter.java[R43-46]

+        boolean anySuppressAuthor = caywEntries.stream()
+                                               .anyMatch(e -> e.citationProperties().isOmitAuthor());
+        String star = anySuppressAuthor ? "*" : "";
+
Evidence
omitAuthor is edited per-entry (each chip opens a popup bound to that entry’s CitationProperties).
However, BibLatexFormatter collapses omitAuthor into a single anyMatch and uses it once at the
command level.

jabsrv/src/main/java/org/jabref/http/server/cayw/format/BibLatexFormatter.java[43-46]
jabsrv/src/main/java/org/jabref/http/server/cayw/gui/SelectedItemsContainer.java[78-81]
jabsrv/src/main/java/org/jabref/http/server/cayw/gui/CitationPropertiesPopup.java[41-48]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
`BibLatexFormatter` turns on the starred command if *any* entry has `omitAuthor`, which can unintentionally apply the suppression to entries that did not request it.
### Issue Context
`omitAuthor` is configured per selected entry via the chip popup.
### Fix Focus Areas
- jabsrv/src/main/java/org/jabref/http/server/cayw/format/BibLatexFormatter.java[32-52]
- jabsrv/src/test/java/org/jabref/http/server/cayw/format/CAYWFormattersTest.java[150-183] (add mixed omitAuthor test)
- jabsrv/src/main/java/org/jabref/http/server/cayw/gui/CitationPropertiesPopup.java[41-48]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools



Advisory comments

6. omitAuthor ignored formats🐞 Bug ✓ Correctness
Description
The UI exposes an “Omit Author” checkbox for each entry, but NatbibFormatter and MMDFormatter never
read isOmitAuthor(). Users can set the option and see no effect depending on chosen output format,
which is confusing and inconsistent.
Code

jabsrv/src/main/java/org/jabref/http/server/cayw/format/NatbibFormatter.java[R49-59]

+    private Optional<String> formatEntry(CAYWEntry entry, String command) {
+        return entry.bibEntry().getCitationKey().map(key -> {
+            CitationProperties props = entry.citationProperties();
+            String prenote = props.getPrefix().orElse("");
+            String postnote = props.getPostnote().orElse("");
+
+            if (prenote.isEmpty() && postnote.isEmpty()) {
+                return "\\%s{%s}".formatted(command, key);
+            }
+            return "\\%s[%s][%s]{%s}".formatted(command, prenote, postnote, key);
+        });
Evidence
CitationProperties includes omitAuthor and the popup mutates it, but NatbibFormatter and
MMDFormatter only use prefix/postnote (or prefix/locator/suffix) and omit omitAuthor entirely.

jabsrv/src/main/java/org/jabref/http/server/cayw/gui/CitationProperties.java[55-61]
jabsrv/src/main/java/org/jabref/http/server/cayw/format/NatbibFormatter.java[49-59]
jabsrv/src/main/java/org/jabref/http/server/cayw/format/MMDFormatter.java[28-40]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
`omitAuthor` can be set in the UI but has no effect in Natbib and MMD outputs, leading to inconsistent behavior across formats.
### Issue Context
Other formatters (e.g., Pandoc/Typst/BibLaTeX) do use `isOmitAuthor()`.
### Fix Focus Areas
- jabsrv/src/main/java/org/jabref/http/server/cayw/format/NatbibFormatter.java[49-60]
- jabsrv/src/main/java/org/jabref/http/server/cayw/format/MMDFormatter.java[28-41]
- jabsrv/src/main/java/org/jabref/http/server/cayw/gui/CitationPropertiesPopup.java[41-48]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


7. Locator whitespace retained🐞 Bug ✓ Correctness
Description
CitationProperties.getFormattedLocator() validates locatorValue via getLocatorValue() but formats
using the raw locatorValue field, preserving leading/trailing whitespace in output. This can cause
surprising formatting differences across outputs/JSON.
Code

jabsrv/src/main/java/org/jabref/http/server/cayw/gui/CitationProperties.java[R63-68]

+    public Optional<String> getFormattedLocator() {
+        if (locatorType == null || getLocatorValue().isEmpty()) {
+            return Optional.empty();
+        }
+        return Optional.of("%s %s".formatted(locatorType.getAbbreviation(), locatorValue));
+    }
Evidence
The method checks getLocatorValue().isEmpty() but then interpolates locatorValue directly
instead of a normalized value (e.g., stripped).

jabsrv/src/main/java/org/jabref/http/server/cayw/gui/CitationProperties.java[27-29]
jabsrv/src/main/java/org/jabref/http/server/cayw/gui/CitationProperties.java[63-68]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
`getFormattedLocator()` uses the raw `locatorValue` field in its output, so leading/trailing whitespace entered by the user can leak into formatted citations.
### Issue Context
The class already has a `getLocatorValue()` method that can be extended to normalize (strip) input.
### Fix Focus Areas
- jabsrv/src/main/java/org/jabref/http/server/cayw/gui/CitationProperties.java[27-68]
- jabsrv/src/test/java/org/jabref/http/server/cayw/CitationPropertiesTest.java[16-52] (add whitespace normalization test)

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

ⓘ The new review experience is currently in Beta. Learn more

Grey Divider

Qodo Logo

Comment thread jabsrv/src/main/java/org/jabref/http/server/cayw/gui/CitationPropertiesPopup.java Outdated
@github-actions github-actions Bot added status: changes-required Pull requests that are not yet complete and removed status: no-bot-comments labels Feb 16, 2026
@testlens-app

This comment has been minimized.

@github-actions github-actions Bot added the status: changes-required Pull requests that are not yet complete label Feb 26, 2026
@testlens-app

This comment has been minimized.

@testlens-app

This comment has been minimized.

@testlens-app

This comment has been minimized.

@github-actions github-actions Bot added status: no-bot-comments and removed status: changes-required Pull requests that are not yet complete labels Feb 26, 2026
@testlens-app

This comment has been minimized.

Comment thread jabsrv/src/test/java/org/jabref/http/server/cayw/format/CAYWFormattersTest.java Outdated
…rmattersTest.java

Co-authored-by: Subhramit Basu <subhramit.bb@live.in>
@testlens-app

This comment has been minimized.

@testlens-app

testlens-app Bot commented Feb 26, 2026

Copy link
Copy Markdown

✅ All tests passed ✅

🏷️ Commit: 36a8ce6
▶️ Tests: 11244 executed
⚪️ Checks: 67/67 completed


Learn more about TestLens at testlens.app.

@subhramit subhramit 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.

Looks good from my POV

@subhramit subhramit added status: awaiting-second-review For non-trivial changes component: cite-as-you-write cayw (similar to better-bibtex for Zotero) labels Feb 26, 2026

@palukku palukku 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.

LGTM

@palukku palukku added this pull request to the merge queue Feb 26, 2026
@github-actions github-actions Bot added the status: to-be-merged PRs which are accepted and should go into the merge-queue. label Feb 26, 2026
Merged via the queue into JabRef:main with commit dd5d481 Feb 26, 2026
61 of 67 checks passed
RakockiW pushed a commit to RakockiW/jabref that referenced this pull request Mar 1, 2026
* include additional citation properties

* Add support for citation properties in the CAYW endpoint

* include CitationProperties for improved citation handling

* support citation properties and multicite formatting

* enhance citation formatting

* handle citation properties

* utilize CitationProperties for enhanced output

* include citation properties in JSON output

* streamline citation formatting using CitationProperties

* add citation properties for enhanced citation handling

* manage citation attributes and formatting

* managing citation properties in the GUI

* LocatorType enum for citation types in GUI

* click event to show citation properties popup

* unit tests for to validate locator formatting and property handling

* Add unit tests for formatters with CitationProperties

* move data classes out of gui package to fix jbang build

* Retrigger CI

* fix submodules

* add new source files to jbang build configuration

* localize strings

* follow Zotero BibLaTeX rules for suppress author starred variant

* follow MMD documentation for citation formatting

* updating to match the new formatter

* Improve readability of CAYW formatters

* Prevent multiple popups stacking on repeated chip clicks

* simplify getSuffix to match getPrefix behavior

* Fix submodules

* remove trailing whitespace

* add missing localization keys for citation properties

* Fix submodules

* Fix submodules

* move add 13821 to the unreleased section

* removed MMD_BRACKET_SEPARATOR constant

* use nested test classes for better organization, and improved setup with @beforeeach

* renamed variables to enhance readability: 'anyHasProperties' to 'hasAnyProperties'
updated conditional checks to use Optional for better null safety in MMDFormatter

* replace setter methods with 'with' methods for readability

* replace setter methods with 'with' methods in for improved readability

* use wither pattern with setters

* Update jabsrv/src/main/java/org/jabref/http/server/cayw/format/PandocFormatter.java

Co-authored-by: Philip <37398281+palukku@users.noreply.github.com>

* Update jabsrv/src/main/java/org/jabref/http/server/cayw/format/NatbibFormatter.java

Co-authored-by: Philip <37398281+palukku@users.noreply.github.com>

* Update jabsrv/src/main/java/org/jabref/http/server/cayw/format/MMDFormatter.java

Co-authored-by: Philip <37398281+palukku@users.noreply.github.com>

* Use setters in instead of withers

* use right format in PandocFormatter

* improvements to the optionals and methods

* Fix the Format test issue

* fix syntax of Pandoc tests

* Update jabsrv/src/test/java/org/jabref/http/server/cayw/format/CAYWFormattersTest.java

Co-authored-by: Subhramit Basu <subhramit.bb@live.in>

---------

Co-authored-by: Philip <37398281+palukku@users.noreply.github.com>
Co-authored-by: Subhramit Basu <subhramit.bb@live.in>
priyanshu16095 pushed a commit to priyanshu16095/jabref that referenced this pull request Mar 3, 2026
* include additional citation properties

* Add support for citation properties in the CAYW endpoint

* include CitationProperties for improved citation handling

* support citation properties and multicite formatting

* enhance citation formatting

* handle citation properties

* utilize CitationProperties for enhanced output

* include citation properties in JSON output

* streamline citation formatting using CitationProperties

* add citation properties for enhanced citation handling

* manage citation attributes and formatting

* managing citation properties in the GUI

* LocatorType enum for citation types in GUI

* click event to show citation properties popup

* unit tests for to validate locator formatting and property handling

* Add unit tests for formatters with CitationProperties

* move data classes out of gui package to fix jbang build

* Retrigger CI

* fix submodules

* add new source files to jbang build configuration

* localize strings

* follow Zotero BibLaTeX rules for suppress author starred variant

* follow MMD documentation for citation formatting

* updating to match the new formatter

* Improve readability of CAYW formatters

* Prevent multiple popups stacking on repeated chip clicks

* simplify getSuffix to match getPrefix behavior

* Fix submodules

* remove trailing whitespace

* add missing localization keys for citation properties

* Fix submodules

* Fix submodules

* move add 13821 to the unreleased section

* removed MMD_BRACKET_SEPARATOR constant

* use nested test classes for better organization, and improved setup with @beforeeach

* renamed variables to enhance readability: 'anyHasProperties' to 'hasAnyProperties'
updated conditional checks to use Optional for better null safety in MMDFormatter

* replace setter methods with 'with' methods for readability

* replace setter methods with 'with' methods in for improved readability

* use wither pattern with setters

* Update jabsrv/src/main/java/org/jabref/http/server/cayw/format/PandocFormatter.java

Co-authored-by: Philip <37398281+palukku@users.noreply.github.com>

* Update jabsrv/src/main/java/org/jabref/http/server/cayw/format/NatbibFormatter.java

Co-authored-by: Philip <37398281+palukku@users.noreply.github.com>

* Update jabsrv/src/main/java/org/jabref/http/server/cayw/format/MMDFormatter.java

Co-authored-by: Philip <37398281+palukku@users.noreply.github.com>

* Use setters in instead of withers

* use right format in PandocFormatter

* improvements to the optionals and methods

* Fix the Format test issue

* fix syntax of Pandoc tests

* Update jabsrv/src/test/java/org/jabref/http/server/cayw/format/CAYWFormattersTest.java

Co-authored-by: Subhramit Basu <subhramit.bb@live.in>

---------

Co-authored-by: Philip <37398281+palukku@users.noreply.github.com>
Co-authored-by: Subhramit Basu <subhramit.bb@live.in>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component: cite-as-you-write cayw (similar to better-bibtex for Zotero) status: awaiting-second-review For non-trivial changes status: no-bot-comments status: to-be-merged PRs which are accepted and should go into the merge-queue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add custom properties on CAYW endpoint

3 participants