Skip to content

Color Picker: Refresh stored label when data type label changes (closes #22741) - #22761

Merged
iOvergaard merged 4 commits into
mainfrom
v17/bugfix/22741-handle-color-picker-label-change
May 7, 2026
Merged

Color Picker: Refresh stored label when data type label changes (closes #22741)#22761
iOvergaard merged 4 commits into
mainfrom
v17/bugfix/22741-handle-color-picker-label-change

Added unit tests for new behaviour.

e95aef0
Select commit
Loading
Failed to load commit list.
CodeScene Delta Analysis / CodeScene Code Health Review (main) failed May 7, 2026 in 56s

CodeScene PR Check

Quality Gate Failed

Gates Failed
Enforce advisory code health rules (1 file with Code Duplication)

Gates Passed
3 Quality Gates Passed

See analysis details in CodeScene

Reason for failure
Enforce advisory code health rules Violations Code Health Impact
property-editor-ui-color-picker.test.ts 1 advisory rule 10.00 → 9.39 Suppress

Quality Gate Profile: Clean Code Collective
Install CodeScene MCP: safeguard and uplift AI-generated code. Catch issues early with our IDE extension and CLI tool.

Details

🚩 Declining Code Health (highest to lowest):

  • Code Duplication property-editor-ui-color-picker.test.ts

Annotations

Check warning on line 38 in src/Umbraco.Web.UI.Client/src/packages/property-editors/color-picker/property-editor-ui-color-picker.test.ts

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Code Health Review (main)

❌ New issue: Code Duplication

The module contains 4 functions with similar structure: 'does not emit a change event when labels already match','does not emit a change event when no swatch matches the stored value','refreshes a stale label even when the stored hex casing differs from the swatch','updates value.label and emits a single change event when config label differs from stored label'. Avoid duplicated, aka copy-pasted, code inside the module. More duplication lowers the code health.