Skip to content

Conversation

paodb
Copy link
Member

@paodb paodb commented Oct 9, 2025

Close #7

Summary by CodeRabbit

  • New Features

    • Chip groups can be initialized with preselected options, enabling pre-populated schedules.
  • Style

    • Refreshed, unified styling for the Recurrent Schedule field and chips.
    • Improved spacing, alignment, and readability.
    • Consistent hover and read-only states with cleaner visuals.
  • Demos

    • Updated demo views to match the new styling and default alignment.
    • Removed custom theme dependency in demos for a leaner setup.

Copy link

coderabbitai bot commented Oct 9, 2025

Walkthrough

Replaces Lumo utility classes with internal CSS classes and adds a component-level CSS import. Introduces a variadic ChipGroup constructor. Adds a new stylesheet. Removes a test AppShellConfigurator and theme.json. Updates demos by removing alignment and sizing calls. No core logic changes beyond constructor addition and styling refactor.

Changes

Cohort / File(s) Summary
UI components styling refactor
src/main/java/com/flowingcode/vaadin/addons/recurrentschedulefield/ui/ChipGroup.java, .../ui/RecurrentScheduleField.java
Replace Lumo utility classes with internal CSS class names; add @CssImport in RecurrentScheduleField; add variadic ChipGroup(Chip... chips) constructor; maintain existing interaction and read-only behaviors via class toggles.
Stylesheet addition
src/main/resources/META-INF/frontend/styles/fc-recurrent-schedule-field.css
New CSS defining .fc-* classes for chip group, date/time/days selectors, and main layouts; encapsulates typography, spacing, alignment, and read-only styles.
Test/demo alignment and cleanup
src/test/java/com/flowingcode/vaadin/addons/recurrentschedulefield/BinderDemo.java, .../ComponentDemo.java, .../ConstrainedDemo.java, .../RecurrentScheduleFieldDemoView.java, .../StatesDemo.java
Remove Lumo AlignItems usage and related alignment/sizing method calls; minor import reorganization; no behavioral changes beyond layout alignment defaults.
Theme/test scaffolding removal
src/test/java/com/flowingcode/vaadin/addons/AppShellConfiguratorImpl.java, src/test/resources/META-INF/frontend/themes/recurrentschedulefield/theme.json
Delete test AppShellConfigurator with @theme and remove theme.json Lumo imports to decouple from Lumo theme.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • mlopezFC
  • javier-godoy

Pre-merge checks and finishing touches

❌ Failed checks (2 warnings)
Check name Status Explanation Resolution
Out of Scope Changes Check ⚠️ Warning Besides the intended refactoring of LumoUtility usage, this pull request deletes the AppShellConfiguratorImpl test class and removes a setSizeFull call in a demo view, neither of which relate to the linked issue of replacing Lumo utility classes and thus represent out-of-scope modifications. Please revert or relocate the removal of AppShellConfiguratorImpl and the setSizeFull call into a separate pull request so that this change set remains focused solely on eliminating Lumo utility classes.
Docstring Coverage ⚠️ Warning Docstring coverage is 40.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ 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 concisely and accurately describes the main intent of the pull request, namely refactoring to replace usage of LumoUtility style properties with custom CSS, making it clear to teammates what the primary change is.
Linked Issues Check ✅ Passed The changes systematically remove all references to LumoUtility classes and theme imports by replacing them with internal CSS class names, adding a custom stylesheet import, and eliminating lumoImports from theme.json, fully addressing the linked issue’s requirement to drop Lumo dependencies and replace them with internal styles.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch issue-7

Warning

Review ran into problems

🔥 Problems

Git: Failed to clone repository. Please run the @coderabbitai full review command to re-trigger a full review. If the issue persists, set path_filters to include or exclude specific files.


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: 0

Caution

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

⚠️ Outside diff range comments (1)
src/test/java/com/flowingcode/vaadin/addons/recurrentschedulefield/BinderDemo.java (1)

150-152: Restore the Alignment import or fully qualify it.

Alignment is still referenced at Line 151, but the corresponding import (com.vaadin.flow.component.orderedlayout.FlexComponent.Alignment) disappeared. This file no longer compiles. Please add the import back (or qualify the reference).

+import com.vaadin.flow.component.orderedlayout.FlexComponent.Alignment;
🧹 Nitpick comments (1)
src/main/resources/META-INF/frontend/styles/fc-recurrent-schedule-field.css (1)

14-14: Consider standardizing CSS formatting for consistency.

The CSS has inconsistent spacing before colons (e.g., background : initial vs. background: var(--lumo-primary-color-50pct)). While not a functional issue, standardizing the format improves maintainability.

Apply consistent spacing by removing spaces before colons:

-.fc-rsf-unselected {
-  background : initial
-}
+.fc-rsf-unselected {
+  background: initial;
+}
 .fc-rsf-linespan {
-  display : inline-flex;
-  align-items : center;
-  justify-content : center;
+  display: inline-flex;
+  align-items: center;
+  justify-content: center;
-      color : var(--lumo-secondary-text-color);
+      color: var(--lumo-secondary-text-color);

Also applies to: 19-21, 42-42

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between ae2fdc1 and c0281fc.

📒 Files selected for processing (10)
  • src/main/java/com/flowingcode/vaadin/addons/recurrentschedulefield/ui/ChipGroup.java (3 hunks)
  • src/main/java/com/flowingcode/vaadin/addons/recurrentschedulefield/ui/RecurrentScheduleField.java (10 hunks)
  • src/main/resources/META-INF/frontend/styles/fc-recurrent-schedule-field.css (1 hunks)
  • src/test/java/com/flowingcode/vaadin/addons/AppShellConfiguratorImpl.java (0 hunks)
  • src/test/java/com/flowingcode/vaadin/addons/recurrentschedulefield/BinderDemo.java (2 hunks)
  • src/test/java/com/flowingcode/vaadin/addons/recurrentschedulefield/ComponentDemo.java (1 hunks)
  • src/test/java/com/flowingcode/vaadin/addons/recurrentschedulefield/ConstrainedDemo.java (0 hunks)
  • src/test/java/com/flowingcode/vaadin/addons/recurrentschedulefield/RecurrentScheduleFieldDemoView.java (0 hunks)
  • src/test/java/com/flowingcode/vaadin/addons/recurrentschedulefield/StatesDemo.java (0 hunks)
  • src/test/resources/META-INF/frontend/themes/recurrentschedulefield/theme.json (0 hunks)
💤 Files with no reviewable changes (5)
  • src/test/java/com/flowingcode/vaadin/addons/recurrentschedulefield/StatesDemo.java
  • src/test/java/com/flowingcode/vaadin/addons/recurrentschedulefield/RecurrentScheduleFieldDemoView.java
  • src/test/java/com/flowingcode/vaadin/addons/recurrentschedulefield/ConstrainedDemo.java
  • src/test/java/com/flowingcode/vaadin/addons/AppShellConfiguratorImpl.java
  • src/test/resources/META-INF/frontend/themes/recurrentschedulefield/theme.json
🔇 Additional comments (7)
src/test/java/com/flowingcode/vaadin/addons/recurrentschedulefield/ComponentDemo.java (1)

34-35: LGTM! Alignment removal aligns with PR objectives.

The removal of AlignItems.CENTER is consistent with the PR's goal to eliminate Lumo utility class dependencies. The demo will render without centered alignment, which appears intentional as part of the broader styling refactor.

src/main/java/com/flowingcode/vaadin/addons/recurrentschedulefield/ui/ChipGroup.java (2)

54-59: LGTM! Convenient variadic constructor addition.

The new variadic constructor provides a cleaner initialization API for creating chip groups with multiple chips, while properly delegating to the existing setup logic.


46-46: LGTM! CSS class migration completed correctly.

The replacement of Lumo utility classes with custom fc-rsf-* classes is consistent throughout the component. All referenced classes are defined in the new CSS file, and the read-only state styling has been properly adapted to use the new class names.

Also applies to: 107-107, 112-112, 173-180

src/main/java/com/flowingcode/vaadin/addons/recurrentschedulefield/ui/RecurrentScheduleField.java (3)

64-64: LGTM! CSS import correctly added.

The @CssImport annotation properly references the new component stylesheet, enabling the custom CSS classes throughout the component.


22-28: LGTM! Standard library imports added.

The additional imports for DayOfWeek, Duration, LocalDate, LocalTime, List, Locale, and Set are standard Java types that appear to have been reorganized or made explicit. These imports are appropriate for the component's functionality.


149-153: LGTM! Comprehensive CSS class migration.

The replacement of Lumo utility classes with custom fc-* prefixed classes is systematic and consistent across all layout components (date selectors, days selectors, time selectors, and root layouts). All referenced CSS classes are defined in the new stylesheet, and the structural hierarchy is preserved.

Also applies to: 167-167, 193-196, 227-227, 237-242, 264-264, 311-311, 350-350, 357-357

src/main/resources/META-INF/frontend/styles/fc-recurrent-schedule-field.css (1)

18-52: Verify CSS nesting support in Vaadin.

The CSS uses native nesting syntax (e.g., .fc-rsf-linespan { div { ... } p { ... } }), which requires either modern browser support for CSS Nesting or a CSS preprocessor. Vaadin's default CSS handling may not process nested selectors.

Verify whether Vaadin supports CSS nesting by checking if the nested rules render correctly:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: To Do

Development

Successfully merging this pull request may close these issues.

Replace use of lumo utility classes

1 participant