Skip to content

feat(demo): add support for Vaadin 25 - #124

Merged
mlopezFC merged 5 commits into
masterfrom
fix-122
Mar 19, 2026
Merged

feat(demo): add support for Vaadin 25#124
mlopezFC merged 5 commits into
masterfrom
fix-122

Conversation

@javier-godoy

@javier-godoy javier-godoy commented Mar 18, 2026

Copy link
Copy Markdown
Member

Summary by CodeRabbit

  • Chores

    • CI pipeline updated to run automated builds targeting Vaadin 25 on Java 21.
  • Dependencies

    • Added a Vaadin 25 build profile and supporting libraries to enable Vaadin 25 compatibility.
    • Added JSON migration helper and Lombok to assist development and testing.
  • Tests

    • Test code updated to leverage JSON migration utilities for improved test coverage.

@coderabbitai

coderabbitai Bot commented Mar 18, 2026

Copy link
Copy Markdown

Walkthrough

Adds a Maven profile "v25" targeting Java 21 and Vaadin 25, two dependencies (json-migration-helper, lombok), a GitHub Actions job build-vaadin25 that builds with -Pv25 on JDK 21, and an @ExtensionMethod(JsonMigration.class) annotation on IconsGalleryView.

Changes

Cohort / File(s) Summary
CI workflow
​.github/workflows/maven.yml
Adds job build-vaadin25 running on ubuntu-latest, sets up Temurin JDK 21 with Maven cache, and runs mvn -B package --file pom.xml -Pv25.
Maven configuration
pom.xml
Adds dependencies com.flowingcode.vaadin:json-migration-helper:0.9.2 (test) and org.projectlombok:lombok:1.18.42 (provided). Adds profile v25 with properties (compiler.source/target=21, vaadin.version=25.0.3) and an optional com.vaadin:vaadin-dev dependency.
Test source
src/test/java/com/flowingcode/vaadin/addons/fontawesome/IconsGalleryView.java
Adds @ExtensionMethod(value = JsonMigration.class, suppressBaseMethods = true) annotation on the IconsGalleryView class. No other behavioral changes recorded.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Suggested reviewers

  • paodb
🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title accurately describes the main change: adding Vaadin 25 support through a new build profile and dependencies.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix-122
📝 Coding Plan
  • Generate coding plan for human review comments

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@javier-godoy

Copy link
Copy Markdown
Member Author

@CodeRabbit review

@coderabbitai

coderabbitai Bot commented Mar 18, 2026

Copy link
Copy Markdown
✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🧹 Nitpick comments (2)
src/test/java/com/flowingcode/vaadin/addons/fontawesome/IconsGalleryView.java (2)

64-68: Null-safe filter logic is correct.

The refactored logic properly handles null/empty input and converts empty strings to null before passing to the element property. This aligns well with the TypeScript code which guards with !this.filterString (context snippet at fc-font-awesome-gallery.ts:110).

However, the logic can be simplified:

Optional simplification
   public void filter(String filterString) {
-    filterString = filterString != null ? filterString.trim() : null;
-    filterString = filterString != null ? filterString.toLowerCase() : null;
-    filterString = filterString != null && !filterString.isEmpty() ? filterString : null;
+    filterString = filterString != null && !filterString.isBlank()
+        ? filterString.trim().toLowerCase()
+        : null;
     getElement().setProperty("filterString", filterString);
   }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@src/test/java/com/flowingcode/vaadin/addons/fontawesome/IconsGalleryView.java`
around lines 64 - 68, The filter method currently normalizes filterString
through three successive assignments; simplify to a single null-safe
normalization: trim the input, convert to lower case, and set to null if empty,
then call getElement().setProperty("filterString", ...). Update the body of the
filter(String filterString) method (refer to the filter(...) method and the
getElement().setProperty call) to perform this single-step normalization so the
logic is clearer and equivalent.

35-39: Remove unused @ExtensionMethod annotation.

The @ExtensionMethod(value = JsonMigration.class, suppressBaseMethods = true) annotation is present but not used in this class. The filter method (lines 64-68) relies on standard String methods (trim(), toLowerCase(), isEmpty()) with explicit null checks rather than any extension methods from JsonMigration. Consider removing the annotation and its import to reduce unnecessary dependencies.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@src/test/java/com/flowingcode/vaadin/addons/fontawesome/IconsGalleryView.java`
around lines 35 - 39, The `@ExtensionMethod` annotation and its import are unused
in IconsGalleryView and should be removed: delete the import
com.flowingcode.vaadin.jsonmigration.JsonMigration and the
`@ExtensionMethod`(value = JsonMigration.class, suppressBaseMethods = true)
annotation above the class declaration in IconsGalleryView; ensure the filter
method remains using standard String methods (trim(), toLowerCase(), isEmpty())
with its null checks and then recompile to confirm no references to
JsonMigration remain.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.github/workflows/maven.yml:
- Around line 36-41: The workflow uses actions/setup-java@v3 in the "Set up JDK"
step; update that action to actions/setup-java@v4 to use the latest major
version. Locate the step with the name "Set up JDK" (and any other steps in this
file such as the build-vaadin24 job that also reference actions/setup-java@v3)
and replace the version string with `@v4` while keeping the existing inputs
(java-version, distribution, cache) unchanged.

In `@pom.xml`:
- Around line 120-132: The pom currently references non-existent versions for
dependencies: update org.projectlombok:lombok from 1.18.42 to the valid 1.18.38
and correct or pin com.flowingcode.vaadin:json-migration-helper to a version
that exists on Maven Central (verify the latest released version and replace
0.9.2 if it doesn't exist); locate the <dependency> entries for
org.projectlombok:lombok and com.flowingcode.vaadin:json-migration-helper and
change the <version> elements accordingly, then run mvn dependency:resolve or a
build to confirm resolution.
- Around line 566-580: The pom's v25 profile sets a non-existent Vaadin release
via the <vaadin.version> property; update the vaadin.version value in the
profile with id "v25" from 25.0.3 to a valid 25.0.x release (for example 25.0.7)
so dependencies like the vaadin-dev dependency can be resolved during build.

---

Nitpick comments:
In
`@src/test/java/com/flowingcode/vaadin/addons/fontawesome/IconsGalleryView.java`:
- Around line 64-68: The filter method currently normalizes filterString through
three successive assignments; simplify to a single null-safe normalization: trim
the input, convert to lower case, and set to null if empty, then call
getElement().setProperty("filterString", ...). Update the body of the
filter(String filterString) method (refer to the filter(...) method and the
getElement().setProperty call) to perform this single-step normalization so the
logic is clearer and equivalent.
- Around line 35-39: The `@ExtensionMethod` annotation and its import are unused
in IconsGalleryView and should be removed: delete the import
com.flowingcode.vaadin.jsonmigration.JsonMigration and the
`@ExtensionMethod`(value = JsonMigration.class, suppressBaseMethods = true)
annotation above the class declaration in IconsGalleryView; ensure the filter
method remains using standard String methods (trim(), toLowerCase(), isEmpty())
with its null checks and then recompile to confirm no references to
JsonMigration remain.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 59f224ec-0551-4667-b924-a9df7db41a54

📥 Commits

Reviewing files that changed from the base of the PR and between f565549 and a1df235.

📒 Files selected for processing (4)
  • .github/workflows/maven.yml
  • .github/workflows/vaadin23.yml
  • pom.xml
  • src/test/java/com/flowingcode/vaadin/addons/fontawesome/IconsGalleryView.java

Comment on lines +36 to +41
- name: Set up JDK
uses: actions/setup-java@v3
with:
java-version: '21'
distribution: 'temurin'
cache: maven

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Update actions/setup-java to v4.

Static analysis indicates that actions/setup-java@v3 is outdated. The existing build-vaadin24 job (line 24) also uses v3, but it would be good practice to use the latest version for the new job.

Proposed fix
    - name: Set up JDK
-     uses: actions/setup-java@v3
+     uses: actions/setup-java@v4
      with:
        java-version: '21'
        distribution: 'temurin'
        cache: maven
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- name: Set up JDK
uses: actions/setup-java@v3
with:
java-version: '21'
distribution: 'temurin'
cache: maven
- name: Set up JDK
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'
cache: maven
🧰 Tools
🪛 actionlint (1.7.11)

[error] 37-37: the runner of "actions/setup-java@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/maven.yml around lines 36 - 41, The workflow uses
actions/setup-java@v3 in the "Set up JDK" step; update that action to
actions/setup-java@v4 to use the latest major version. Locate the step with the
name "Set up JDK" (and any other steps in this file such as the build-vaadin24
job that also reference actions/setup-java@v3) and replace the version string
with `@v4` while keeping the existing inputs (java-version, distribution, cache)
unchanged.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment thread pom.xml
Comment thread pom.xml
@sonarqubecloud

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

♻️ Duplicate comments (1)
.github/workflows/maven.yml (1)

37-37: ⚠️ Potential issue | 🔴 Critical

actions/setup-java@v3 is too old for this workflow job.

Line 37 uses a deprecated major version, and actionlint already flags it as unsupported for current runners.

🛠️ Proposed fix
-    - name: Set up JDK
-      uses: actions/setup-java@v3
+    - name: Set up JDK
+      uses: actions/setup-java@v4
       with:
         java-version: '21'
         distribution: 'temurin'
         cache: maven
#!/bin/bash
set -euo pipefail

echo "Find outdated setup-java references:"
rg -n 'uses:\s*actions/setup-java@v3' .github/workflows/maven.yml || true

echo ""
echo "List current setup-java references:"
rg -n 'uses:\s*actions/setup-java@v[0-9]+' .github/workflows/maven.yml
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/maven.yml at line 37, Replace the deprecated reference
"uses: actions/setup-java@v3" with the current major release (e.g. "uses:
actions/setup-java@v4") in the workflow so actionlint and current runners are
supported; update any other occurrences of "actions/setup-java@v[0-9]+" to the
chosen supported major, commit the change, and re-run the workflow or linter to
verify there are no remaining outdated references.
🧹 Nitpick comments (1)
pom.xml (1)

127-132: Change Lombok scope to test since it's only used in test sources.

Lombok is not imported in any main source files—only in test sources (IconsGalleryView.java). Using test scope keeps the dependency boundary clean and prevents it from broadening the main compile classpath unnecessarily.

♻️ Proposed change
 		<dependency>
 			<groupId>org.projectlombok</groupId>
 			<artifactId>lombok</artifactId>
 			<version>1.18.42</version>
-			<scope>provided</scope>
+			<scope>test</scope>
 		</dependency>
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@pom.xml` around lines 127 - 132, The Lombok dependency is currently declared
with scope "provided" but is only used in test sources (e.g.,
IconsGalleryView.java); update the <dependency> entry for
org.projectlombok:lombok (artifactId lombok, version 1.18.42) in pom.xml to use
<scope>test</scope> instead of <scope>provided</scope> so Lombok is available
for test compilation only and not on the main compile classpath.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Duplicate comments:
In @.github/workflows/maven.yml:
- Line 37: Replace the deprecated reference "uses: actions/setup-java@v3" with
the current major release (e.g. "uses: actions/setup-java@v4") in the workflow
so actionlint and current runners are supported; update any other occurrences of
"actions/setup-java@v[0-9]+" to the chosen supported major, commit the change,
and re-run the workflow or linter to verify there are no remaining outdated
references.

---

Nitpick comments:
In `@pom.xml`:
- Around line 127-132: The Lombok dependency is currently declared with scope
"provided" but is only used in test sources (e.g., IconsGalleryView.java);
update the <dependency> entry for org.projectlombok:lombok (artifactId lombok,
version 1.18.42) in pom.xml to use <scope>test</scope> instead of
<scope>provided</scope> so Lombok is available for test compilation only and not
on the main compile classpath.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: b38c3b96-97cc-4b1b-b1ca-c75bb9a06e6b

📥 Commits

Reviewing files that changed from the base of the PR and between a1df235 and 48870d2.

📒 Files selected for processing (4)
  • .github/workflows/maven.yml
  • .github/workflows/vaadin23.yml
  • pom.xml
  • src/test/java/com/flowingcode/vaadin/addons/fontawesome/IconsGalleryView.java

@javier-godoy
javier-godoy requested review from mlopezFC and paodb March 18, 2026 23:54
@javier-godoy
javier-godoy marked this pull request as ready for review March 18, 2026 23:54

@mlopezFC mlopezFC 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

@mlopezFC
mlopezFC merged commit ff35460 into master Mar 19, 2026
5 checks passed
@github-project-automation github-project-automation Bot moved this from To Do to Pending release in Flowing Code Addons Mar 19, 2026
@mlopezFC
mlopezFC deleted the fix-122 branch March 19, 2026 12:38
@javier-godoy javier-godoy moved this from Pending release to Done in Flowing Code Addons Mar 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

2 participants