jabref icon indicating copy to clipboard operation
jabref copied to clipboard

Refactor Replace setStyle calls with getStyleClass

Open Eng-YasminKotb opened this issue 5 months ago β€’ 10 comments

Related issues and pull requests

Closes #15934

PR Description

Replaced static inline CSS setStyle calls with style classes where appropriate.

Added reusable CSS classes for styles that could not use existing classes. This avoids hardcoded inline styles which prevented themes and custom stylesheets from overriding them.

Excluded FontIcon and -fx-font-size cases according to the issue scope.

Steps to test

Run the JabRef GUI tests:

./gradlew :jabgui:test

AI usage

Claude (Claude Sonnet 4.6) β€” used for code review, understanding issue scope, and double-checking changes.

Checklist

  • [x] I own the copyright of the code submitted and I license it under the MIT license
  • [x] If AI tools were used, I disclosed them in the "AI usage" section and reviewed, understood, and take full ownership of all AI-generated code
  • [/] 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

Eng-YasminKotb avatar Jun 20 '26 18:06 Eng-YasminKotb

Hey @Eng-YasminKotb! πŸ‘‹

Thank you for contributing to JabRef!

We have automated checks in place, based on which you will soon get feedback if any of them are failing. We also use Qodo for review assistance. It will update your pull request description with a review help and offer suggestions to improve the pull request.

After all automated checks pass, a maintainer will also review your contribution. Once that happens, you can go through their comments in the "Files changed" tab and act on them, or reply to the conversation if you have further inputs. You can read about the whole pull request process in our contribution guide.

Please ensure that your pull request is in line with our AI Usage Policy and make necessary disclosures.

github-actions[bot] avatar Jun 20 '26 18:06 github-actions[bot]

PR Summary by Qodo

Refactor JavaFX inline styles into reusable theme CSS classes ✨ Enhancement βš™οΈ Configuration changes πŸ• 10-20 Minutes

Grey Divider
Description

β€’ Replace static JavaFX inline setStyle usage with reusable style classes.
β€’ Add theme CSS classes for padding/background to enable overrides via custom themes.
β€’ Keep out-of-scope FontIcon and -fx-font-size styling unchanged where required.
Diagram

graph TD
  A["JavaFX views (multiple)"] --> B["Style classes (bold/italic/...)" ] --> C["jabref-theme.css"]
  D["LinkedFilesEditor"] --> E["linked-files-info"] --> C
  F["DeleteFileAction dialog"] --> G["delete-files-dialog"] --> C
High-Level Assessment

Using CSS style classes instead of inline setStyle is the right approach for themeability and downstream overrides. Alternatives like keeping inline CSS (harder to override) or introducing per-view constants still prevent clean theming and duplicate styling concerns.

Files changed (7) +18 / -10

Refactor (6) +9 / -10
FileAnnotationTabView.javaMove bold marking style from inline CSS to style class +2/-1

Move bold marking style from inline CSS to style class

β€’ Removes the inline '-fx-font-weight: bold' from the marking label and applies the shared 'bold' style class instead. Keeps the '-fx-font-size' inline per stated scope constraints.

jabgui/src/main/java/org/jabref/gui/entryeditor/fileannotationtab/FileAnnotationTabView.java

FulltextSearchResultsTab.javaReplace inline italic/bold text styling with CSS classes +3/-3

Replace inline italic/bold text styling with CSS classes

β€’ Replaces 'setStyle' calls for italic/bold emphasis in search result text with 'italic'/'bold' style classes. Improves consistency and allows theme overrides.

jabgui/src/main/java/org/jabref/gui/entryeditor/fileannotationtab/FulltextSearchResultsTab.java

LinkedFilesEditor.javaReplace inline padding with reusable linked-files CSS class +1/-1

Replace inline padding with reusable linked-files CSS class

β€’ Moves the HBox padding from an inline 'setStyle' to the 'linked-files-info' style class. This keeps layout alignment while making padding theme-controlled.

jabgui/src/main/java/org/jabref/gui/fieldeditors/LinkedFilesEditor.java

DeleteFileAction.javaMove delete dialog header styling into theme CSS +1/-3

Move delete dialog header styling into theme CSS

β€’ Replaces a multi-line inline CSS block on the dialog header with the 'delete-files-dialog' style class. Enables overriding padding/background via themes or custom stylesheets.

jabgui/src/main/java/org/jabref/gui/linkedfile/DeleteFileAction.java

FieldValueCell.javaUse JavaFX cursor API instead of inline CSS +1/-1

Use JavaFX cursor API instead of inline CSS

β€’ Replaces 'label.setStyle("-fx-cursor: hand")' with 'label.setCursor(Cursor.HAND)'. This avoids embedding styling in CSS strings and uses the dedicated JavaFX API.

jabgui/src/main/java/org/jabref/gui/mergeentries/threewaymerge/cell/FieldValueCell.java

ManageCitationsDialogView.javaApply shared bold style class for citation text segment +1/-1

Apply shared bold style class for citation text segment

β€’ Replaces inline bold font styling on the in-between text segment with the 'bold' style class. This makes emphasis consistent with other UI components and themeable.

jabgui/src/main/java/org/jabref/gui/openoffice/ManageCitationsDialogView.java

Other (1) +9 / -0
jabref-theme.cssAdd theme classes for linked-files padding and delete dialog header +9/-0

Add theme classes for linked-files padding and delete dialog header

β€’ Introduces '.linked-files-info' for padding previously applied inline in the linked-files UI. Adds '.delete-files-dialog' for delete dialog header padding/background, centralizing these styles in the theme.

jabgui/src/main/resources/org/jabref/gui/jabref-theme.css

Code Review by Qodo

🐞 Bugs (0) πŸ“˜ Rule violations (4) πŸ“œ Skill insights (0)

Grey Divider
Action required
1. Removed CSS utilities still referenced πŸ“˜ Rule violation ≑ Correctness
Description
The PR removes utility CSS classes (including italic, bordered, bg-transparent, and
padding-right-15) from jabref-theme.css even though FXML and Java code still reference them, so
those selectors will no longer match and styling will be lost at runtime. This causes user-visible
GUI regressions (e.g., missing italics/borders/padding) in AI, fulltext-search, and related views.
Code

jabgui/src/main/resources/org/jabref/gui/jabref-theme.css[L74-85]

-.bordered {
-    -fx-border-width: 1;
-    -fx-border-color: -fx-outer-border;
-}
-
-.bg-transparent {
-    -fx-background-color: transparent;
-}
-
-.padding-right-15 {
-    -fx-padding: 0 15 0 0;
-}
Evidence
The evidence shows that jabref-theme.css no longer contains the utility-class definitions (the
block is gone after .bold), while multiple UI components still apply these style classes: FXML
files such as AiChat.fxml and NewEntry.fxml still reference bordered, bg-transparent, and
padding-right-15, and FulltextSearchResultsTab now adds the italic style class in code.
Because the stylesheet no longer defines .italic (and the other removed helpers), those nodes’
style classes will not resolve to any rules, resulting in the intended formatting not being applied.

AGENTS.md: Follow JabRef Code Style Rules and General Java Best Practices (Effective Java / Clean Code): AGENTS.md: Follow JabRef Code Style Rules and General Java Best Practices (Effective Java / Clean Code) jabgui/src/main/resources/org/jabref/gui/ai/chat/AiChat.fxml[50-68] jabgui/src/main/resources/org/jabref/gui/newentry/NewEntry.fxml[112-119] jabgui/src/main/resources/org/jabref/gui/jabref-theme.css[58-77] jabgui/src/main/java/org/jabref/gui/entryeditor/fileannotationtab/FulltextSearchResultsTab.java[118-163] jabgui/src/main/resources/org/jabref/gui/newentry/NewEntry.fxml[113-118] jabgui/src/main/resources/org/jabref/gui/preferences/ai/AiTab.fxml[182-186] jabgui/src/main/resources/org/jabref/gui/jabref-theme.css[60-73]

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

## Issue description
Utility CSS classes were removed from `jabref-theme.css`, but they are still referenced by FXML views and Java code (including a new usage of `italic`), so affected nodes will lose required styling at runtime.
## Issue Context
The theme stylesheet no longer defines `.italic`, `.bordered`, `.bg-transparent`, and `.padding-right-15`, yet these class names are still used for basic formatting (italics, borders, transparent background, right padding) across multiple screens (AI chat/preferences, new entry, fulltext-search results). This PR also replaces inline `setStyle(...)` usage with style classes, which requires that any introduced classes be present in the active theme CSS (or be swapped to existing defined classes/selectors).
## Fix Focus Areas
- jabgui/src/main/resources/org/jabref/gui/jabref-theme.css[60-90]
- jabgui/src/main/resources/org/jabref/gui/ai/chat/AiChat.fxml[50-70]
- jabgui/src/main/resources/org/jabref/gui/newentry/NewEntry.fxml[112-119]
- jabgui/src/main/resources/org/jabref/gui/preferences/ai/AiTab.fxml[182-186]
- jabgui/src/main/java/org/jabref/gui/entryeditor/fileannotationtab/FulltextSearchResultsTab.java[118-163]

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


2. .chat-bubble CSS no longer matches πŸ“˜ Rule violation ≑ Correctness
Description
The PR updates the theme CSS to style .chat-message-text-area instead of .chat-bubble, but
AiChatMessage.fxml still uses styleClass="chat-bubble", causing a selector mismatch. As a
result, chat message bubble theming (such as rounded bubble styling and per-role coloring) will no
longer be applied.
Code

jabgui/src/main/resources/org/jabref/gui/jabref-theme.css[R620-635]

+.chat-message-text-area {
   -fx-border-radius: 10;
   -fx-background-radius: 10;
-    -fx-border-width: 1;
-    -fx-padding: 10;
-    -fx-max-width: 600;
}

-.chat-bubble:user {
-    -fx-background-color: -jr-ai-message-user;
-    -fx-border-color: -jr-ai-message-user-border;
+.chat-message-text-area .scroll-pane {
+    -fx-background-color: transparent;
}

-.chat-bubble:ai {
-    -fx-background-color: -jr-ai-message-ai;
-    -fx-border-color: -jr-ai-message-ai-border;
+.chat-message-text-area .scroll-pane .viewport {
+    -fx-background-color: transparent;
}

-.chat-bubble:error {
-    -fx-background-color: -jr-ai-message-error;
-    -fx-border-color: -jr-ai-message-error-border;
+.chat-message-text-area .scroll-pane .content {
+    -fx-background-color: transparent;
}
Evidence
AiChatMessage.fxml assigns the chat-bubble style class to the chat message bubble container,
while the updated jabref-theme.css defines styling under .chat-message-text-area and no longer
provides .chat-bubble rules in the referenced section. Because JavaFX CSS applies styles by
matching selectors to the node’s style classes, this discrepancy means the bubble container no
longer matches the intended CSS selectors, so bubble-specific styling is lost.

AGENTS.md: Follow JabRef Code Style Rules and General Java Best Practices (Effective Java / Clean Code): AGENTS.md: Follow JabRef Code Style Rules and General Java Best Practices (Effective Java / Clean Code) jabgui/src/main/resources/org/jabref/gui/ai/chat/AiChatMessage.fxml[18-26] jabgui/src/main/resources/org/jabref/gui/jabref-theme.css[620-635] jabgui/src/main/resources/org/jabref/gui/ai/chat/AiChatMessage.fxml[19-26]

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

## Issue description
CSS now targets `.chat-message-text-area`, but the UI markup for AI chat messages still uses `chat-bubble`, so the intended chat bubble styles no longer apply.
## Issue Context
The PR replaced the `.chat-bubble` selector family in `jabref-theme.css` with `.chat-message-text-area`, yet `AiChatMessage.fxml` still assigns `styleClass="chat-bubble"` to the bubble container (`VBox`). With only `.chat-message-text-area ...` rules present, the bubble container stops receiving bubble-specific theming (e.g., rounded styling and per-role coloring).
Choose one consistent approach:
- Update `AiChatMessage.fxml` to use `styleClass="chat-message-text-area"` (and ensure any role-specific styling previously done via `:user/:ai/:error` still exists), OR
- Restore/revert the `.chat-bubble` selectors in the theme CSS (including any role-dependent variants) so existing FXML continues to work.
## Fix Focus Areas
- jabgui/src/main/resources/org/jabref/gui/jabref-theme.css[620-635]
- jabgui/src/main/resources/org/jabref/gui/ai/chat/AiChatMessage.fxml[18-26]

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


3. linked-files-info class missing CSS πŸ“˜ Rule violation ≑ Correctness
Description
The PR introduces the linked-files-info style class but there is no corresponding CSS rule in the
repository, so the previous padding behavior will be lost. This likely breaks alignment the comment
says it is preserving.
Code

jabgui/src/main/java/org/jabref/gui/fieldeditors/LinkedFilesEditor.java[238]

+        info.getStyleClass().add("linked-files-info"); // To align with buttons below which also have 0.5em padding
Evidence
LinkedFilesEditor adds linked-files-info specifically to preserve padding/alignment, but no CSS
rule exists for that class in the theme file where similar shared utility classes (e.g., .bold)
are defined.

AGENTS.md: Follow JabRef Code Style Rules and General Java Best Practices (Effective Java / Clean Code): AGENTS.md: Follow JabRef Code Style Rules and General Java Best Practices (Effective Java / Clean Code) jabgui/src/main/java/org/jabref/gui/fieldeditors/LinkedFilesEditor.java[236-239] jabgui/src/main/resources/org/jabref/gui/jabref-theme.css[60-73]

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

## Issue description
`LinkedFilesEditor` now uses `linked-files-info` instead of an inline padding style, but there is no CSS rule defining `.linked-files-info`, so layout will change.
## Issue Context
The comment indicates this styling is needed to align with buttons that have `0.5em` padding.
## Fix Focus Areas
- jabgui/src/main/java/org/jabref/gui/fieldeditors/LinkedFilesEditor.java[236-239]
- jabgui/src/main/resources/org/jabref/gui/jabref-theme.css[1-120]

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



Remediation recommended
4. delete-files-dialog indentation inconsistent πŸ“˜ Rule violation βš™ Maintainability
Description
The new .delete-files-dialog CSS block uses inconsistent indentation for its properties compared
to the surrounding CSS, creating a style inconsistency and noisy diffs over time. This violates the
requirement to follow existing formatting conventions.
Code

jabgui/src/main/resources/org/jabref/gui/jabref-theme.css[R2428-2431]

+.delete-files-dialog {
+     -fx-padding: 10px;
+     -fx-background-color: -fx-background;
+}
Evidence
PR Compliance ID 2 requires following existing formatting conventions and avoiding unnecessary
formatting inconsistencies. In jabref-theme.css, the newly added .delete-files-dialog block has
misaligned indentation on the property lines compared to nearby rules.

AGENTS.md: Follow existing formatting and naming conventions; do not reformat unrelated code: AGENTS.md: Follow existing formatting and naming conventions; do not reformat unrelated code: AGENTS.md: Follow existing formatting and naming conventions; do not reformat unrelated code: AGENTS.md: Follow existing formatting and naming conventions; do not reformat unrelated code jabgui/src/main/resources/org/jabref/gui/jabref-theme.css[2428-2431]

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

## Issue description
The `.delete-files-dialog` CSS rule uses inconsistent indentation (extra leading space) for its properties compared to the rest of `jabref-theme.css`.
## Issue Context
This PR introduces new CSS classes; they should match the existing formatting conventions to avoid style drift.
## Fix Focus Areas
- jabgui/src/main/resources/org/jabref/gui/jabref-theme.css[2428-2431]

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


Grey Divider

Previous review results

Review updated until commit https://github.com/JabRef/jabref/commit/275c063a87e968dd07ee70bd1bbd43b5773053b4

Results up to commit e087e7c


🐞 Bugs (0) πŸ“˜ Rule violations (4) πŸ“œ Skill insights (0)


Action required
1. Removed CSS utilities still referenced πŸ“˜ Rule violation ≑ Correctness ⭐ New
Description
The PR removes utility CSS classes (including italic, bordered, bg-transparent, and
padding-right-15) from jabref-theme.css even though FXML and Java code still reference them, so
those selectors will no longer match and styling will be lost at runtime. This causes user-visible
GUI regressions (e.g., missing italics/borders/padding) in AI, fulltext-search, and related views.
Code

jabgui/src/main/resources/org/jabref/gui/jabref-theme.css[L74-85]

-.bordered {
-    -fx-border-width: 1;
-    -fx-border-color: -fx-outer-border;
-}
-
-.bg-transparent {
-    -fx-background-color: transparent;
-}
-
-.padding-right-15 {
-    -fx-padding: 0 15 0 0;
-}
Evidence
The evidence shows that jabref-theme.css no longer contains the utility-class definitions (the
block is gone after .bold), while multiple UI components still apply these style classes: FXML
files such as AiChat.fxml and NewEntry.fxml still reference bordered, bg-transparent, and
padding-right-15, and FulltextSearchResultsTab now adds the italic style class in code.
Because the stylesheet no longer defines .italic (and the other removed helpers), those nodes’
style classes will not resolve to any rules, resulting in the intended formatting not being applied.

AGENTS.md: Follow JabRef Code Style Rules and General Java Best Practices (Effective Java / Clean Code) jabgui/src/main/resources/org/jabref/gui/ai/chat/AiChat.fxml[50-68] jabgui/src/main/resources/org/jabref/gui/newentry/NewEntry.fxml[112-119] jabgui/src/main/resources/org/jabref/gui/jabref-theme.css[58-77] jabgui/src/main/java/org/jabref/gui/entryeditor/fileannotationtab/FulltextSearchResultsTab.java[118-163] jabgui/src/main/resources/org/jabref/gui/newentry/NewEntry.fxml[113-118] jabgui/src/main/resources/org/jabref/gui/preferences/ai/AiTab.fxml[182-186] jabgui/src/main/resources/org/jabref/gui/jabref-theme.css[60-73]

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

## Issue description
Utility CSS classes were removed from `jabref-theme.css`, but they are still referenced by FXML views and Java code (including a new usage of `italic`), so affected nodes will lose required styling at runtime.

## Issue Context
The theme stylesheet no longer defines `.italic`, `.bordered`, `.bg-transparent`, and `.padding-right-15`, yet these class names are still used for basic formatting (italics, borders, transparent background, right padding) across multiple screens (AI chat/preferences, new entry, fulltext-search results). This PR also replaces inline `setStyle(...)` usage with style classes, which requires that any introduced classes be present in the active theme CSS (or be swapped to existing defined classes/selectors).

## Fix Focus Areas
- jabgui/src/main/resources/org/jabref/gui/jabref-theme.css[60-90]
- jabgui/src/main/resources/org/jabref/gui/ai/chat/AiChat.fxml[50-70]
- jabgui/src/main/resources/org/jabref/gui/newentry/NewEntry.fxml[112-119]
- jabgui/src/main/resources/org/jabref/gui/preferences/ai/AiTab.fxml[182-186]
- jabgui/src/main/java/org/jabref/gui/entryeditor/fileannotationtab/FulltextSearchResultsTab.java[118-163]

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


2. .chat-bubble CSS no longer matches πŸ“˜ Rule violation ≑ Correctness ⭐ New
Description
The PR updates the theme CSS to style .chat-message-text-area instead of .chat-bubble, but
AiChatMessage.fxml still uses styleClass="chat-bubble", causing a selector mismatch. As a
result, chat message bubble theming (such as rounded bubble styling and per-role coloring) will no
longer be applied.
Code

jabgui/src/main/resources/org/jabref/gui/jabref-theme.css[R620-635]

+.chat-message-text-area {
    -fx-border-radius: 10;
    -fx-background-radius: 10;
-    -fx-border-width: 1;
-    -fx-padding: 10;
-    -fx-max-width: 600;
}

-.chat-bubble:user {
-    -fx-background-color: -jr-ai-message-user;
-    -fx-border-color: -jr-ai-message-user-border;
+.chat-message-text-area .scroll-pane {
+    -fx-background-color: transparent;
}

-.chat-bubble:ai {
-    -fx-background-color: -jr-ai-message-ai;
-    -fx-border-color: -jr-ai-message-ai-border;
+.chat-message-text-area .scroll-pane .viewport {
+    -fx-background-color: transparent;
}

-.chat-bubble:error {
-    -fx-background-color: -jr-ai-message-error;
-    -fx-border-color: -jr-ai-message-error-border;
+.chat-message-text-area .scroll-pane .content {
+    -fx-background-color: transparent;
}
Evidence
AiChatMessage.fxml assigns the chat-bubble style class to the chat message bubble container,
while the updated jabref-theme.css defines styling under .chat-message-text-area and no longer
provides .chat-bubble rules in the referenced section. Because JavaFX CSS applies styles by
matching selectors to the node’s style classes, this discrepancy means the bubble container no
longer matches the intended CSS selectors, so bubble-specific styling is lost.

AGENTS.md: Follow JabRef Code Style Rules and General Java Best Practices (Effective Java / Clean Code) jabgui/src/main/resources/org/jabref/gui/ai/chat/AiChatMessage.fxml[18-26] jabgui/src/main/resources/org/jabref/gui/jabref-theme.css[620-635] jabgui/src/main/resources/org/jabref/gui/ai/chat/AiChatMessage.fxml[19-26]

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

## Issue description
CSS now targets `.chat-message-text-area`, but the UI markup for AI chat messages still uses `chat-bubble`, so the intended chat bubble styles no longer apply.

## Issue Context
The PR replaced the `.chat-bubble` selector family in `jabref-theme.css` with `.chat-message-text-area`, yet `AiChatMessage.fxml` still assigns `styleClass="chat-bubble"` to the bubble container (`VBox`). With only `.chat-message-text-area ...` rules present, the bubble container stops receiving bubble-specific theming (e.g., rounded styling and per-role coloring).

Choose one consistent approach:
- Update `AiChatMessage.fxml` to use `styleClass="chat-message-text-area"` (and ensure any role-specific styling previously done via `:user/:ai/:error` still exists), OR
- Restore/revert the `.chat-bubble` selectors in the theme CSS (including any role-dependent variants) so existing FXML continues to work.

## Fix Focus Areas
- jabgui/src/main/resources/org/jabref/gui/jabref-theme.css[620-635]
- jabgui/src/main/resources/org/jabref/gui/ai/chat/AiChatMessage.fxml[18-26]

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


3. linked-files-info class missing CSS πŸ“˜ Rule violation ≑ Correctness ⭐ New
Description
The PR introduces the linked-files-info style class but there is no corresponding CSS rule in the
repository, so the previous padding behavior will be lost. This likely breaks alignment the comment
says it is preserving.
Code

jabgui/src/main/java/org/jabref/gui/fieldeditors/LinkedFilesEditor.java[238]

+        info.getStyleClass().add("linked-files-info"); // To align with buttons below which also have 0.5em padding
Evidence
LinkedFilesEditor adds linked-files-info specifically to preserve padding/alignment, but no CSS
rule exists for that class in the theme file where similar shared utility classes (e.g., .bold)
are defined.

AGENTS.md: Follow JabRef Code Style Rules and General Java Best Practices (Effective Java / Clean Code) jabgui/src/main/java/org/jabref/gui/fieldeditors/LinkedFilesEditor.java[236-239] jabgui/src/main/resources/org/jabref/gui/jabref-theme.css[60-73]

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

## Issue description
`LinkedFilesEditor` now uses `linked-files-info` instead of an inline padding style, but there is no CSS rule defining `.linked-files-info`, so layout will change.

## Issue Context
The comment indicates this styling is needed to align with buttons that have `0.5em` padding.

## Fix Focus Areas
- jabgui/src/main/java/org/jabref/gui/fieldeditors/LinkedFilesEditor.java[236-239]
- jabgui/src/main/resources/org/jabref/gui/jabref-theme.css[1-120]

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



Remediation recommended
4. delete-files-dialog indentation inconsistent πŸ“˜ Rule violation βš™ Maintainability
Description
The new .delete-files-dialog CSS block uses inconsistent indentation for its properties compared
to the surrounding CSS, creating a style inconsistency and noisy diffs over time. This violates the
requirement to follow existing formatting conventions.
Code

jabgui/src/main/resources/org/jabref/gui/jabref-theme.css[R2428-2431]

+.delete-files-dialog {
+     -fx-padding: 10px;
+     -fx-background-color: -fx-background;
+}
Evidence
PR Compliance ID 2 requires following existing formatting conventions and avoiding unnecessary
formatting inconsistencies. In jabref-theme.css, the newly added .delete-files-dialog block has
misaligned indentation on the property lines compared to nearby rules.

AGENTS.md: Follow existing formatting and naming conventions; do not reformat unrelated code: AGENTS.md: Follow existing formatting and naming conventions; do not reformat unrelated code jabgui/src/main/resources/org/jabref/gui/jabref-theme.css[2428-2431]

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

## Issue description
The `.delete-files-dialog` CSS rule uses inconsistent indentation (extra leading space) for its properties compared to the rest of `jabref-theme.css`.
## Issue Context
This PR introduces new CSS classes; they should match the existing formatting conventions to avoid style drift.
## Fix Focus Areas
- jabgui/src/main/resources/org/jabref/gui/jabref-theme.css[2428-2431]

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


Results up to commit 506069d


🐞 Bugs (0) πŸ“˜ Rule violations (1) πŸ“œ Skill insights (0)


Remediation recommended
1. delete-files-dialog indentation inconsistent πŸ“˜ Rule violation βš™ Maintainability
Description
The new .delete-files-dialog CSS block uses inconsistent indentation for its properties compared
to the surrounding CSS, creating a style inconsistency and noisy diffs over time. This violates the
requirement to follow existing formatting conventions.
Code

jabgui/src/main/resources/org/jabref/gui/jabref-theme.css[R2428-2431]

+.delete-files-dialog {
+     -fx-padding: 10px;
+     -fx-background-color: -fx-background;
+}
Evidence
PR Compliance ID 2 requires following existing formatting conventions and avoiding unnecessary
formatting inconsistencies. In jabref-theme.css, the newly added .delete-files-dialog block has
misaligned indentation on the property lines compared to nearby rules.

AGENTS.md: Follow existing formatting and naming conventions; do not reformat unrelated code jabgui/src/main/resources/org/jabref/gui/jabref-theme.css[2428-2431]

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

## Issue description
The `.delete-files-dialog` CSS rule uses inconsistent indentation (extra leading space) for its properties compared to the rest of `jabref-theme.css`.

## Issue Context
This PR introduces new CSS classes; they should match the existing formatting conventions to avoid style drift.

## Fix Focus Areas
- jabgui/src/main/resources/org/jabref/gui/jabref-theme.css[2428-2431]

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


Qodo Logo

Please update csl-styles submodule

pluto-han avatar Jun 20 '26 21:06 pluto-han

Code review by qodo was updated up to the latest commit https://github.com/JabRef/jabref/commit/e087e7cbf95181f16c8ab23146b70685036e44ca

Thank you for your interest in JabRef. As you redrafted your PR yourself and from the changes you made, I understand that you would like to take some time to learn a bit more about CSS and JavaFX. Feel free to come back and open a new PR after having experimented and learned a bit more.

For some guidance i would like to refer you to the javafx css reference guide https://docs.oracle.com/javafx/2/api/javafx/scene/doc-files/cssref.html

calixtus avatar Jun 21 '26 14:06 calixtus

This pull requests was closed without merging. You have been unassigned from the respective issue #15934. In case you closed the PR for yourself, you can re-open it. Please also check After submission of a pull request in CONTRIBUTING.md.

github-actions[bot] avatar Jun 21 '26 14:06 github-actions[bot]

Hi, @calixtus, @pluto-han! I wanted to clarify that the intended changes I made in jabref-theme.css were only the CSS rules required for the new style classes introduced by my change (3 changes).

The other removed/added sections in the diff were strange to me as those were not part of my intended modification, I mean I did not manually edit those sections.

I guess They have appeared as side changes while updating the file, fixing submodules or other changes I made to fix CI issues.

based on that clarification could I open a clean pr avoiding push force, git add .,..etc?

Eng-YasminKotb avatar Jun 21 '26 17:06 Eng-YasminKotb

looks much better now, the only csl locales submodule is left otherwise good work

Siedlerchr avatar Jun 25 '26 21:06 Siedlerchr

Thanks! This is my pr statues:

  • No submodules exist
  • The pr only have the changes which I intended to do. Could I turn this pr to ready for review now?

Eng-YasminKotb avatar Jun 26 '26 10:06 Eng-YasminKotb

Code review by qodo was updated up to the latest commit https://github.com/JabRef/jabref/commit/275c063a87e968dd07ee70bd1bbd43b5773053b4