Skip to content

Conversation

@paodb
Copy link
Member

@paodb paodb commented Sep 29, 2025

Close #3

Summary by CodeRabbit

  • Refactor

    • Renamed the component and branding from “Cron Expression Editor” to “Cron Expression Field,” including i18n types and public API names.
    • Updated demo routes to the new “cron-expression-field” paths.
  • Documentation

    • Revised README with new name, badges, links, demo URL, and usage examples.
  • Chores

    • Updated issue templates and headers to reflect new naming.
    • Renamed Maven artifact and project metadata; SCM links now point to the new repository.
  • Tests

    • Updated demo and test packages/usages to the new component name and routes.

@coderabbitai
Copy link

coderabbitai bot commented Sep 29, 2025

Walkthrough

Project-wide renaming from “Cron Expression Editor” to “Cron Expression Field.” Updates include package/class renames, README and metadata adjustments, Maven artifact/scm changes, CSS resource names, and demo/tests routing and imports. Public API types renamed: CronExpressionEditor → CronExpressionField and CronExpressionEditorI18n → CronExpressionFieldI18n.

Changes

Cohort / File(s) Summary
Issue templates
.github/ISSUE_TEMPLATE/bug-report.yml, .github/ISSUE_TEMPLATE/feature-request.yml
Description strings updated to “Cron Expression Field Add-on”; no structural/template logic changes.
Build and SCM metadata
pom.xml
ArtifactId, project name, and SCM URLs switched to “cron-expression-field-addon”; Jetty system property updated to new i18n provider class.
Documentation and headers
README.md, src/main/resources/META-INF/VAADIN/package.properties, src/main/resources/META-INF/frontend/styles/cron-expression-field-styles.css, src/test/resources/META-INF/frontend/styles/shared-styles.css
Branding, links, badges, examples, and header comments updated from Editor to Field; demo/Directory/Maven references adjusted.
Main API rename
src/main/java/com/flowingcode/vaadin/addons/cronexpressionfield/CronExpressionField.java, .../CronExpressionFieldI18n.java, .../LayoutOptions.java
Package moved to cronexpressionfield; classes renamed: CronExpressionEditor → CronExpressionField, CronExpressionEditorI18n → CronExpressionFieldI18n; Javadocs and type signatures updated; CSS import and className strings updated.
Demos and tests
src/test/java/com/flowingcode/vaadin/addons/DemoLayout.java, src/test/java/com/flowingcode/vaadin/addons/cronexpressionfield/*.java, src/test/java/com/flowingcode/vaadin/addons/cronexpressionfield/it/AbstractViewTest.java, src/test/java/com/flowingcode/vaadin/addons/cronexpressionfield/test/SerializationTest.java
Packages, routes, layout classes, imports, and variable names switched from Editor to Field; translation provider package updated; serialization test constructs new class; header comments updated.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

  • Initial implementation #1 — Initial implementation baseline; this PR refactors the same components and metadata to the “Field” naming.

Suggested reviewers

  • javier-godoy

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 78.79% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The PR title "refactor: component renamed to CronExpressionField" accurately describes the main change in the changeset. The pull request systematically renames the component from "CronExpressionEditor" to "CronExpressionField" across all files, including class names, package names, documentation, configuration files, and test files. This is precisely what the title indicates - a refactoring that renames the component. The title is concise, clear, and directly reflects the primary nature of the changes without being overly vague or misleading.
Linked Issues Check ✅ Passed The linked issue #3 requires renaming the component to "Cron Expression Field" to better reflect its purpose and nature. The code changes comprehensively implement this requirement by renaming all occurrences of "CronExpressionEditor" to "CronExpressionField" across the entire codebase, including the main class (CronExpressionField.java), the i18n class (CronExpressionFieldI18n.java), package names (from cronexpressioneditor to cronexpressionfield), Maven artifact ID, documentation, CSS files, demo files, test files, and all associated references. The changes are systematic and complete, covering all aspects of the component's identity from public API to internal implementation details.
Out of Scope Changes Check ✅ Passed All changes in this pull request are directly related to the objective of renaming the component from "CronExpressionEditor" to "CronExpressionField" as specified in issue #3. The changes include renaming classes, packages, Maven artifacts, routes, CSS files, documentation, comments, issue templates, and all associated references throughout the codebase. No functional modifications, new features, bug fixes, or unrelated refactoring appear in the changeset. Every modification serves the single purpose of consistently applying the new component name across all project artifacts.
✨ Finishing touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch issue-3

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

Tip

🧪 Early access (models): enabled

We are currently testing Sonnet 4.5 code review models, which should lead to better review quality. However, this model may result in higher noise levels in the review comments. Please disable the early access features if the noise level causes any inconvenience.

Note:

  • Public repositories are always opted into early access features.
  • You can enable or disable early access features from the CodeRabbit UI or by updating the CodeRabbit configuration file.

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

🧹 Nitpick comments (2)
README.md (1)

50-50: Consider using more descriptive link text.

The link text "here" is not very descriptive. Consider replacing it with something more meaningful, such as "release notes" or "GitHub releases page".

Apply this diff to improve link text:

-See [here](https://github.com/FlowingCode/CronExpressionField/releases)
+See the [release notes](https://github.com/FlowingCode/CronExpressionField/releases)
src/test/java/com/flowingcode/vaadin/addons/cronexpressionfield/CommonExpressionDemo.java (1)

39-54: Consider fixing variable name typo.

The variable is named croneField (line 39) instead of cronField. While functional, this typo affects code consistency.

Apply this diff to correct the variable name:

-    CronExpressionField croneField = new CronExpressionField();
-    croneField.addCommonExpressions("0 0 2 4 1/2 ?", "0 0 2 ? * 1,2,3");
+    CronExpressionField cronField = new CronExpressionField();
+    cronField.addCommonExpressions("0 0 2 4 1/2 ?", "0 0 2 ? * 1,2,3");
     TextField expressionToAdd = new TextField("Add a new common cron");
     Button save = new Button("Save");
     save.addClickListener(e -> {
-      if (croneField.addCommonExpressions(expressionToAdd.getValue())) {
+      if (cronField.addCommonExpressions(expressionToAdd.getValue())) {
         Notification.show("Successfully added");
       } else {
         Notification.show("Invalid cron expression");
       }

     });
-    croneField.setCommonExpressionsVisible(true);
+    cronField.setCommonExpressionsVisible(true);
     Span valueDisplay = new Span();
-    croneField.addValueChangeListener(v -> valueDisplay.setText("Current expression: " + v.getValue()));
-    add(new Div(expressionToAdd, save), croneField, valueDisplay);
+    cronField.addValueChangeListener(v -> valueDisplay.setText("Current expression: " + v.getValue()));
+    add(new Div(expressionToAdd, save), cronField, valueDisplay);
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 45a6e97 and 7f77c95.

📒 Files selected for processing (20)
  • .github/ISSUE_TEMPLATE/bug-report.yml (1 hunks)
  • .github/ISSUE_TEMPLATE/feature-request.yml (1 hunks)
  • README.md (5 hunks)
  • pom.xml (3 hunks)
  • src/main/java/com/flowingcode/vaadin/addons/cronexpressionfield/CronExpressionField.java (5 hunks)
  • src/main/java/com/flowingcode/vaadin/addons/cronexpressionfield/CronExpressionFieldI18n.java (24 hunks)
  • src/main/java/com/flowingcode/vaadin/addons/cronexpressionfield/LayoutOptions.java (2 hunks)
  • src/main/resources/META-INF/VAADIN/package.properties (1 hunks)
  • src/main/resources/META-INF/frontend/styles/cron-expression-field-styles.css (1 hunks)
  • src/test/java/com/flowingcode/vaadin/addons/DemoLayout.java (1 hunks)
  • src/test/java/com/flowingcode/vaadin/addons/cronexpressionfield/CommonExpressionDemo.java (3 hunks)
  • src/test/java/com/flowingcode/vaadin/addons/cronexpressionfield/CronExpressionFieldDemo.java (3 hunks)
  • src/test/java/com/flowingcode/vaadin/addons/cronexpressionfield/CronExpressionFieldDemoView.java (3 hunks)
  • src/test/java/com/flowingcode/vaadin/addons/cronexpressionfield/DemoView.java (3 hunks)
  • src/test/java/com/flowingcode/vaadin/addons/cronexpressionfield/HelpEnabledDemo.java (3 hunks)
  • src/test/java/com/flowingcode/vaadin/addons/cronexpressionfield/NextDatesVisibleDemo.java (3 hunks)
  • src/test/java/com/flowingcode/vaadin/addons/cronexpressionfield/TranslationProvider.java (2 hunks)
  • src/test/java/com/flowingcode/vaadin/addons/cronexpressionfield/it/AbstractViewTest.java (2 hunks)
  • src/test/java/com/flowingcode/vaadin/addons/cronexpressionfield/test/SerializationTest.java (4 hunks)
  • src/test/resources/META-INF/frontend/styles/shared-styles.css (1 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
src/main/java/com/flowingcode/vaadin/addons/cronexpressionfield/CronExpressionField.java (1)
src/main/java/com/flowingcode/vaadin/addons/cronexpressionfield/CronExpressionFieldI18n.java (1)
  • CronExpressionFieldI18n (33-458)
🪛 markdownlint-cli2 (0.18.1)
README.md

50-50: Link text should be descriptive

(MD059, descriptive-link-text)

🔇 Additional comments (38)
src/main/resources/META-INF/frontend/styles/cron-expression-field-styles.css (1)

3-3: LGTM! Header updated to reflect the component rename.

The license header correctly reflects the new component name "Cron Expression Field Add-on" in alignment with the PR objectives.

src/test/java/com/flowingcode/vaadin/addons/DemoLayout.java (1)

3-3: LGTM! License header updated correctly.

The header comment has been properly updated to "Cron Expression Field Add-on" as part of the component rename.

src/main/resources/META-INF/VAADIN/package.properties (1)

3-3: LGTM! Metadata updated to match the new component name.

The package properties header correctly reflects the rename to "Cron Expression Field Add-on".

.github/ISSUE_TEMPLATE/feature-request.yml (1)

2-2: LGTM! Issue template description updated for consistency.

The feature request template description now correctly references "Cron Expression Field Add-on", maintaining consistency with the component rename.

src/test/resources/META-INF/frontend/styles/shared-styles.css (1)

3-3: LGTM! Test resource header updated correctly.

The shared styles header has been properly updated to "Cron Expression Field Add-on" in line with the project-wide rename.

.github/ISSUE_TEMPLATE/bug-report.yml (1)

2-2: LGTM!

The description text has been correctly updated to reflect the new component name.

src/test/java/com/flowingcode/vaadin/addons/cronexpressionfield/test/SerializationTest.java (4)

3-3: LGTM!

Header comment correctly updated to reflect the new add-on name.


20-20: LGTM!

Package declaration correctly updated to the new naming convention.


30-30: LGTM!

Import correctly updated to reference the renamed class.


47-47: LGTM!

Test instantiation correctly updated to use the new class name.

src/test/java/com/flowingcode/vaadin/addons/cronexpressionfield/it/AbstractViewTest.java (2)

3-3: LGTM!

Header comment correctly updated to reflect the new add-on name.


21-21: LGTM!

Package declaration correctly updated to the new naming convention.

src/test/java/com/flowingcode/vaadin/addons/cronexpressionfield/TranslationProvider.java (2)

3-3: LGTM!

Header comment correctly updated to reflect the new add-on name.


20-20: LGTM!

Package declaration correctly updated to the new naming convention.

README.md (8)

1-5: LGTM!

Badge URLs and references correctly updated to reflect the new add-on naming.


7-7: LGTM!

Title correctly updated to the new add-on name.


13-16: LGTM!

Feature list properly standardized with consistent punctuation.


20-20: LGTM!

Demo URL correctly updated to the new component path.


24-24: LGTM!

Vaadin Directory link correctly updated to the new add-on name.


33-33: LGTM!

Maven artifactId correctly updated to the new naming convention.


90-90: LGTM!

Author attribution correctly updated to reference the new add-on name.


104-110: LGTM!

Code examples correctly updated to use the renamed CronExpressionField class.

src/test/java/com/flowingcode/vaadin/addons/cronexpressionfield/DemoView.java (1)

21-34: LGTM! Renaming applied correctly.

The package declaration and forward target have been updated consistently with the CronExpressionField naming convention.

src/main/java/com/flowingcode/vaadin/addons/cronexpressionfield/LayoutOptions.java (1)

20-22: LGTM! Documentation and package updated correctly.

The package declaration and Javadoc reference to CronExpressionField are consistent with the renaming.

src/test/java/com/flowingcode/vaadin/addons/cronexpressionfield/HelpEnabledDemo.java (1)

20-38: LGTM! Demo class updated consistently.

The package, route path, layout reference, and component instantiation all correctly reflect the CronExpressionField naming.

src/test/java/com/flowingcode/vaadin/addons/cronexpressionfield/CronExpressionFieldDemo.java (1)

20-56: LGTM! Demo class fully migrated to new naming.

The package, route path, class name, layout reference, and component usage are all consistently updated to reflect CronExpressionField.

src/test/java/com/flowingcode/vaadin/addons/cronexpressionfield/NextDatesVisibleDemo.java (1)

1-44: LGTM! Renaming is consistent and complete.

All references have been correctly updated from CronExpressionEditor to CronExpressionField, including package name, route path, layout reference, and component instantiation. The license header and variable naming are also consistent with the new terminology.

src/test/java/com/flowingcode/vaadin/addons/cronexpressionfield/CronExpressionFieldDemoView.java (1)

1-42: LGTM! Demo view correctly updated.

All references have been systematically updated from CronExpressionEditor to CronExpressionField, including the package, route, GitHub link, class name, and demo class reference. The changes are consistent with the refactoring objective.

pom.xml (3)

8-10: LGTM! Maven artifact metadata correctly updated.

The artifactId and project name have been correctly updated to reflect the new "Cron Expression Field" naming.


44-46: LGTM! SCM metadata correctly updated.

All SCM URLs have been correctly updated to point to the new CronExpressionField repository.


287-293: LGTM! i18n provider path correctly updated.

The Vaadin i18n provider system property has been correctly updated to reference the new package path com.flowingcode.vaadin.addons.cronexpressionfield.TranslationProvider.

src/main/java/com/flowingcode/vaadin/addons/cronexpressionfield/CronExpressionField.java (4)

21-21: LGTM! Package declaration correctly updated.

Package name has been correctly updated to com.flowingcode.vaadin.addons.cronexpressionfield.


73-74: LGTM! Class declaration and CSS import correctly updated.

Both the CSS import path (cron-expression-field-styles.css) and the class name (CronExpressionField) have been correctly updated to reflect the new naming.


96-116: LGTM! Field type and constructors correctly updated.

The i18n field type has been correctly updated to CronExpressionFieldI18n, and both constructors have been renamed to CronExpressionField. The CSS class name has also been updated to "fc-cron-expression-field".


569-579: LGTM! Method signature and documentation correctly updated.

The setI18n method signature has been correctly updated to accept CronExpressionFieldI18n, and the Javadoc references have been updated accordingly. The default initialization correctly calls CronExpressionFieldI18n.createDefault().

src/main/java/com/flowingcode/vaadin/addons/cronexpressionfield/CronExpressionFieldI18n.java (3)

21-33: LGTM! Package and class declaration correctly updated.

The package name and class name have been correctly updated to com.flowingcode.vaadin.addons.cronexpressionfield and CronExpressionFieldI18n respectively. The Javadoc reference has also been updated.


38-38: LGTM! Field types and factory method correctly updated.

The units field type correctly references CronExpressionField.Units, the private constructor has been renamed to CronExpressionFieldI18n(), and the factory method correctly returns CronExpressionFieldI18n. The Units initialization in the constructor (lines 62-63) also correctly references CronExpressionField.Units.

Also applies to: 56-87


104-456: LGTM! All setter return types correctly updated.

All setter methods correctly return CronExpressionFieldI18n for method chaining. The getUnits() and setUnits() methods (lines 183, 193) correctly use CronExpressionField.Units as the map key type.

@javier-godoy javier-godoy merged commit b323b31 into master Sep 30, 2025
3 checks passed
@javier-godoy javier-godoy deleted the issue-3 branch September 30, 2025 16:12
@coderabbitai coderabbitai bot mentioned this pull request Nov 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Rename component to Cron Expression Field

3 participants