Skip to content

feat: add polymer dependency for Vaadin 25 support#20

Merged
javier-godoy merged 4 commits intomasterfrom
issue-18
Feb 26, 2026
Merged

feat: add polymer dependency for Vaadin 25 support#20
javier-godoy merged 4 commits intomasterfrom
issue-18

Conversation

@paodb
Copy link
Member

@paodb paodb commented Feb 26, 2026

Close #18

Tested for Vaadin 14, 24 & 25.

Summary by CodeRabbit

  • Chores
    • Upgraded Vaadin framework dependency to version 25.0.3
    • Integrated Polymer package (v3.5.2) for component support
    • Updated build and test artifact configurations

@coderabbitai
Copy link

coderabbitai bot commented Feb 26, 2026

Walkthrough

This PR updates the Vaadin framework dependency in profile v25 from version 25.0.0-beta5 to 25.0.3, adds an optional vaadin-dev dependency, declares a Polymer package dependency in GraniteAlert, excludes dynamic-theme.properties from the demo JAR build, and adds a new dynamic theme test resource configuration.

Changes

Cohort / File(s) Summary
Build Configuration
pom.xml
Updated Vaadin version to 25.0.3, added optional vaadin-dev dependency, and configured exclusion of dynamic-theme.properties from demo JAR build.
Component Enhancement
src/main/java/com/flowingcode/vaadin/addons/granitealert/GraniteAlert.java
Added @NpmPackage annotation for @polymer/polymer version 3.5.2 with corresponding import statement.
Test Resources
src/test/resources/META-INF/dynamic-theme.properties
New test resource file declaring LUMO theme configuration.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: adding a Polymer dependency annotation to support Vaadin 25, which directly addresses the linked issue about Vaadin 25 build failures.
Linked Issues check ✅ Passed The PR adds the @NpmPackage dependency for Polymer and updates Vaadin to 25.0.3, directly addressing issue #18's Vite build failure for Vaadin 25 support.
Out of Scope Changes check ✅ Passed All changes are directly related to fixing Vaadin 25 support: Polymer dependency addition, Vaadin version bump, vaadin-dev dependency, and test resources for dynamic theme.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch issue-18

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.

@sonarqubecloud
Copy link

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (2)
src/main/java/com/flowingcode/vaadin/addons/granitealert/GraniteAlert.java (1)

38-39: Consider removing or documenting the commented-out annotations.

These commented-out @NpmPackage and @JsModule annotations for @granite-elements/granite-alert could be confusing for future maintainers. Consider either removing them or adding a brief comment explaining why the local JS modules are used instead.

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

In `@src/main/java/com/flowingcode/vaadin/addons/granitealert/GraniteAlert.java`
around lines 38 - 39, The commented-out annotations //@NpmPackage and
//@JsModule for `@granite-elements/granite-alert` in the GraniteAlert class are
ambiguous; either delete these two lines or replace them with a short
explanatory comment above them indicating why the project uses local JS modules
instead of the annotated NPM/JS module (e.g., local build, compatibility, or
version reasons). Locate the commented lines referencing `@NpmPackage`(value =
"@granite-elements/granite-alert", version = "^2.1.2") and
`@JsModule`("@granite-elements/granite-alert/granite-alert.js") in
GraniteAlert.java and apply the chosen change.
pom.xml (1)

395-401: Consider adding <scope>test</scope> for the vaadin-dev dependency.

The vaadin-dev artifact provides development-mode tooling (hot reload, debug features). Since this is an add-on library, consumers shouldn't need this dependency transitively. While <optional>true</optional> prevents transitive inclusion, using <scope>test</scope> would more accurately reflect that this is only needed for local development/testing of the add-on itself.

Suggested change
             <dependencies>
                 <dependency>
                     <groupId>com.vaadin</groupId>
                     <artifactId>vaadin-dev</artifactId>
-                    <optional>true</optional>
+                    <scope>test</scope>
                 </dependency>
             </dependencies>
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@pom.xml` around lines 395 - 401, The vaadin-dev dependency
(groupId=com.vaadin, artifactId=vaadin-dev) is development-only and should be
non-transitive: add a <scope>test</scope> element to the dependency declaration
so it is only used for testing/local dev; you can also remove the existing
<optional>true</optional> since test scope already prevents transitive
inclusion, ensuring consumers of the add-on won't receive this artifact.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@pom.xml`:
- Around line 395-401: The vaadin-dev dependency (groupId=com.vaadin,
artifactId=vaadin-dev) is development-only and should be non-transitive: add a
<scope>test</scope> element to the dependency declaration so it is only used for
testing/local dev; you can also remove the existing <optional>true</optional>
since test scope already prevents transitive inclusion, ensuring consumers of
the add-on won't receive this artifact.

In `@src/main/java/com/flowingcode/vaadin/addons/granitealert/GraniteAlert.java`:
- Around line 38-39: The commented-out annotations //@NpmPackage and //@JsModule
for `@granite-elements/granite-alert` in the GraniteAlert class are ambiguous;
either delete these two lines or replace them with a short explanatory comment
above them indicating why the project uses local JS modules instead of the
annotated NPM/JS module (e.g., local build, compatibility, or version reasons).
Locate the commented lines referencing `@NpmPackage`(value =
"@granite-elements/granite-alert", version = "^2.1.2") and
`@JsModule`("@granite-elements/granite-alert/granite-alert.js") in
GraniteAlert.java and apply the chosen change.

ℹ️ Review info

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 08db78b and b84ebd1.

📒 Files selected for processing (3)
  • pom.xml
  • src/main/java/com/flowingcode/vaadin/addons/granitealert/GraniteAlert.java
  • src/test/resources/META-INF/dynamic-theme.properties

@paodb paodb marked this pull request as ready for review February 26, 2026 13:48
@javier-godoy javier-godoy merged commit eb980ad into master Feb 26, 2026
7 checks passed
@javier-godoy javier-godoy deleted the issue-18 branch February 26, 2026 14:53
@github-project-automation github-project-automation bot moved this from To Do to Pending release in Flowing Code Addons Feb 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Pending release

Development

Successfully merging this pull request may close these issues.

Vaadin 25: Vite build exited with a non zero status

2 participants