Skip to content

fix: override setColor/getColor#128

Merged
paodb merged 1 commit into
masterfrom
fix-126
Jun 8, 2026
Merged

fix: override setColor/getColor#128
paodb merged 1 commit into
masterfrom
fix-126

Conversation

@javier-godoy

@javier-godoy javier-godoy commented Jun 5, 2026

Copy link
Copy Markdown
Member

Close #126

Summary by CodeRabbit

  • New Features

    • Icons now support dynamic color control with new setter and getter methods.
    • Added a demonstration page showcasing colored icon examples.
  • Chores

    • Updated copyright year range in headers to 2026.

@coderabbitai

coderabbitai Bot commented Jun 5, 2026

Copy link
Copy Markdown

Worried about impact? Review this PR in Change Stack to explore blast radius before you approve or request changes.

Review Change Stack

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: 0601922a-6335-4ac3-b38a-9b0d2a624476

📥 Commits

Reviewing files that changed from the base of the PR and between fd7f63e and 2b6687e.

⛔ Files ignored due to path filters (1)
  • src/main/generated/com/flowingcode/vaadin/addons/fontawesome/FontAwesome.java is excluded by !**/generated/**
📒 Files selected for processing (7)
  • src/codegen/IconsetEnumGenerator.java
  • src/codegen/TemplateLicense.java
  • src/main/javascript/font-awesome-iron-iconset/fab.js
  • src/main/javascript/font-awesome-iron-iconset/far.js
  • src/main/javascript/font-awesome-iron-iconset/fas.js
  • src/test/java/com/flowingcode/vaadin/addons/fontawesome/ColorDemo.java
  • src/test/java/com/flowingcode/vaadin/addons/fontawesome/FontawesomeDemoView.java
👮 Files not reviewed due to content moderation or server errors (1)
  • src/main/javascript/font-awesome-iron-iconset/fab.js

Walkthrough

This PR fixes the icon color styling bug by adding setColor() and getColor() method overrides to the generated Icon component. A new ColorDemo view demonstrates the feature, and copyright years are updated to 2026 across the codebase.

Changes

Icon Color API and Demonstration

Layer / File(s) Summary
Icon color support implementation
src/codegen/IconsetEnumGenerator.java
Generator now emits setColor(String) and getColor() methods in the Icon class; setColor updates or removes the "color" style attribute based on the input value, and getColor retrieves it.
Color demonstration and integration
src/test/java/com/flowingcode/vaadin/addons/fontawesome/ColorDemo.java, src/test/java/com/flowingcode/vaadin/addons/fontawesome/FontawesomeDemoView.java
New ColorDemo view instantiates three VAADIN brand icons colored red, green, and blue at 64px in a horizontally centered layout. The demo is registered in FontawesomeDemoView's constructor.
Copyright year updates
src/codegen/TemplateLicense.java, src/main/javascript/font-awesome-iron-iconset/far.js, src/main/javascript/font-awesome-iron-iconset/fas.js
License header copyright year ranges updated to include 2026.

🎯 3 (Moderate) | ⏱️ ~20 minutes

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Out of Scope Changes check ⚠️ Warning The PR includes multiple out-of-scope changes: copyright year updates across four files and a new ColorDemo test class, neither required by issue #126. Remove copyright year updates (2019-2023 to 2019-2026) and the ColorDemo class addition as they are unrelated to fixing the color-setting bug in issue #126.
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 (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'fix: override setColor/getColor' directly matches the main objective of adding setColor/getColor method overrides to fix the color-setting issue.
Linked Issues check ✅ Passed The PR correctly implements setColor/getColor overrides in IconsetEnumGenerator to address issue #126's requirement for Icon::setColor to properly set icon color.

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

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

sonarqubecloud Bot commented Jun 5, 2026

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
37.9% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

@javier-godoy javier-godoy requested review from paodb and scardanzan June 5, 2026 19:20
@javier-godoy javier-godoy marked this pull request as ready for review June 5, 2026 19:21

@paodb paodb left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@paodb paodb merged commit 3ccf267 into master Jun 8, 2026
4 of 5 checks passed
@github-project-automation github-project-automation Bot moved this from To Do to Pending release in Flowing Code Addons Jun 8, 2026
@paodb paodb deleted the fix-126 branch June 8, 2026 12:39
@paodb paodb moved this from Pending release to Done in Flowing Code Addons Jun 9, 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.

Setting Icon color no longer changes visual color

2 participants