Skip to content

Conversation

@TatuLund
Copy link
Contributor

@TatuLund TatuLund commented Oct 8, 2025

Updated NpmPackage annotation to ensure compatibility with the latest version.

Summary by CodeRabbit

  • Bug Fixes

    • Ensures grid resources are correctly included, preventing runtime issues with the radio selection column.
  • Performance

    • Slightly reduces bundle size by removing an unnecessary legacy dependency.
  • Chores

    • Updated internal annotations/dependency usage to align with platform conventions and improve compatibility.

Updated NpmPackage annotation to ensure compatibility with the latest version.
@coderabbitai
Copy link

coderabbitai bot commented Oct 8, 2025

Walkthrough

Replaced an @NpmPackage annotation with an added @Uses(Grid.class) on GridRadioSelectionColumn, retained @Uses(RadioButtonGroup.class), added an import for Grid and a comment indicating the indirect @NpmPackage dependency.

Changes

Cohort / File(s) Summary
Annotation and import update in GridRadioSelectionColumn
src/main/java/com/flowingcode/vaadin/addons/gridhelpers/GridRadioSelectionColumn.java
Removed @NpmPackage(value = "@vaadin/polymer-legacy-adapter", version = "24.3.2"); added import com.vaadin.flow.component.grid.Grid;; added @Uses(Grid.class) while retaining @Uses(RadioButtonGroup.class); inserted comment // Indirectly ensure @NpmPackage(value = "@vaadin/polymer-legacy-adapter", version = "x.x.x") above the new @Uses(Grid.class) annotation.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested reviewers

  • paodb

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The title clearly states the primary change of replacing the NpmPackage annotation with the Uses annotation to resolve version conflicts, which directly matches the modifications made in the pull request.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.

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.

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
src/main/java/com/flowingcode/vaadin/addons/gridhelpers/GridRadioSelectionColumn.java (1)

28-28: Remove unused import.

The NpmPackage import is no longer used since the annotation was removed. Clean up by removing this import.

Apply this diff to remove the unused import:

-import com.vaadin.flow.component.dependency.NpmPackage;
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0eed713 and f8dadc8.

📒 Files selected for processing (1)
  • src/main/java/com/flowingcode/vaadin/addons/gridhelpers/GridRadioSelectionColumn.java (1 hunks)

@sonarqubecloud
Copy link

sonarqubecloud bot commented Oct 8, 2025

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.

Actionable comments posted: 0

🧹 Nitpick comments (1)
src/main/java/com/flowingcode/vaadin/addons/gridhelpers/GridRadioSelectionColumn.java (1)

39-40: Excellent approach to avoid version conflicts.

Using @Uses(Grid.class) instead of directly pinning @NpmPackage(version = "24.3.2") allows Grid to manage the @vaadin/polymer-legacy-adapter version automatically. This ensures the dependency version stays in sync with the Grid component version, preventing conflicts as Vaadin is upgraded.

Based on past review comments, Grid.class provides this dependency across multiple Vaadin versions (23.3, 23.6, 24.0, 24.9), so this approach is validated.

Optional: Consider clarifying the comment.

The comment is clear, but you could make it slightly more explicit:

-// Indirectly ensure @NpmPackage(value = "@vaadin/polymer-legacy-adapter", version = "x.x.x")
+// Grid.class provides @NpmPackage for @vaadin/polymer-legacy-adapter
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f8dadc8 and 63a138b.

📒 Files selected for processing (1)
  • src/main/java/com/flowingcode/vaadin/addons/gridhelpers/GridRadioSelectionColumn.java (1 hunks)
🔇 Additional comments (1)
src/main/java/com/flowingcode/vaadin/addons/gridhelpers/GridRadioSelectionColumn.java (1)

24-24: LGTM! Import necessary for the @uses annotation.

The Grid import is required for the @Uses(Grid.class) annotation added below and is correctly placed.

@javier-godoy javier-godoy merged commit b63f2fb into FlowingCode:master Oct 8, 2025
4 of 5 checks passed
@javier-godoy javier-godoy moved this from To Do to Done in Flowing Code Addons Oct 9, 2025
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