Skip to content

fix: register VaadinServiceInitListener to bundle grid styles#173

Merged
paodb merged 1 commit intomasterfrom
fix-171
Mar 26, 2026
Merged

fix: register VaadinServiceInitListener to bundle grid styles#173
paodb merged 1 commit intomasterfrom
fix-171

Conversation

@javier-godoy
Copy link
Copy Markdown
Member

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

Close #171

Summary by CodeRabbit

  • Chores
    • Improved CSS style bundling for Grid components to ensure consistent styling in production builds.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 26, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 1ca74a02-5cde-48f5-b696-f05a57983091

📥 Commits

Reviewing files that changed from the base of the PR and between 0e7219c and 611a15a.

📒 Files selected for processing (2)
  • src/main/java/com/flowingcode/vaadin/addons/gridhelpers/GridHelperServiceInitListener.java
  • src/main/resources/META-INF/services/com.vaadin.flow.server.VaadinServiceInitListener

Walkthrough

Added a GridHelperServiceInitListener class implementing VaadinServiceInitListener with a @CssImport annotation to ensure CSS styles are bundled during production builds. A service provider entry registers this listener for automatic discovery by Vaadin's service initialization mechanism.

Changes

Cohort / File(s) Summary
Service Listener Implementation
src/main/java/com/flowingcode/vaadin/addons/gridhelpers/GridHelperServiceInitListener.java
New class implementing VaadinServiceInitListener with @CssImport annotation importing GridHelper.GRID_STYLES for vaadin-grid theme; contains empty serviceInit method.
Service Provider Registration
src/main/resources/META-INF/services/com.vaadin.flow.server.VaadinServiceInitListener
Registered GridHelperServiceInitListener as a service provider for automatic Vaadin service initialization discovery.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • PR #162: Modifies packaging configuration to exclude the META-INF/services VaadinServiceInitListener entry, directly affecting the same service registration mechanism introduced in this change.

Suggested reviewers

  • mlopezFC
  • paodb
🚥 Pre-merge checks | ✅ 4 | ❌ 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 (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The pull request title clearly and specifically summarizes the main change: registering a VaadinServiceInitListener to bundle grid styles, directly addressing the issue being fixed.
Linked Issues check ✅ Passed The changes implement the coding requirement to ensure grid styles are bundled into production builds by registering a VaadinServiceInitListener with @CssImport, directly addressing issue #171.
Out of Scope Changes check ✅ Passed All changes are directly related to the stated objective: registering a VaadinServiceInitListener and adding the service provider configuration to bundle grid styles for production builds.

✏️ 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-171

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 Markdown

@javier-godoy javier-godoy requested review from mlopezFC and paodb March 26, 2026 15:46
@javier-godoy javier-godoy marked this pull request as ready for review March 26, 2026 15:47
@paodb paodb merged commit 9ade7ea into master Mar 26, 2026
5 checks passed
@github-project-automation github-project-automation bot moved this from To Do to Pending release in Flowing Code Addons Mar 26, 2026
@paodb paodb deleted the fix-171 branch March 26, 2026 17:48
@paodb paodb moved this from Pending release to Done in Flowing Code Addons Apr 15, 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.

Grid Helper Dense Mode does not work with productive build

2 participants