Skip to content

Add color ingredient type#3385

Merged
tvdeyen merged 1 commit intoAlchemyCMS:mainfrom
sascha-karnatz:new-color-ingredient
Jan 16, 2026
Merged

Add color ingredient type#3385
tvdeyen merged 1 commit intoAlchemyCMS:mainfrom
sascha-karnatz:new-color-ingredient

Conversation

@sascha-karnatz
Copy link
Contributor

What is this pull request for?

Add a new ingredient type to select a color. By default only a color input will be shown. It is possible to provide predefined colors as settings and then the color ingredient will show a select of all colors. Furthermore it has a second option 'custom_color' which adds the possibility to select a color which is not predefined, if necessary.

Screenshots

With predefined colors and custom_color option:
Aufnahme 2025-09-30 at 14 43 48@2x
Aufnahme 2025-09-30 at 14 43 55@2x

Without any settings:
Aufnahme 2025-09-30 at 14 44 19@2x

Checklist

  • I have followed Pull Request guidelines
  • I have added a detailed description into each commit message
  • I have added tests to cover this change

@sascha-karnatz sascha-karnatz requested a review from a team as a code owner September 30, 2025 12:45
@codecov
Copy link

codecov bot commented Sep 30, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.37%. Comparing base (87173fb) to head (fe57aa5).
⚠️ Report is 69 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3385      +/-   ##
==========================================
+ Coverage   97.36%   97.37%   +0.01%     
==========================================
  Files         309      312       +3     
  Lines        8054     8087      +33     
==========================================
+ Hits         7842     7875      +33     
  Misses        212      212              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@sascha-karnatz sascha-karnatz marked this pull request as draft September 30, 2025 12:56
@tvdeyen tvdeyen added this to the 8.0 milestone Sep 30, 2025
@sascha-karnatz sascha-karnatz marked this pull request as ready for review October 1, 2025 10:05
Copy link
Member

@tvdeyen tvdeyen left a comment

Choose a reason for hiding this comment

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

Very nice addition and perfectly crafted

@tvdeyen
Copy link
Member

tvdeyen commented Oct 1, 2025

There is a null style value on the color-indicator

CleanShot 2025-10-01 at 15 36 29

@tvdeyen
Copy link
Member

tvdeyen commented Oct 1, 2025

We should not use --color as global property, because it will inherit from root.

CleanShot 2025-10-01 at 15 39 34

We should either use a more specific name or add a default value in the class

.color-indicator {
  --color: linear-gradient(90deg, red 5%, yellow, blue 95%);
  background: var(--color);
}

@tvdeyen tvdeyen force-pushed the new-color-ingredient branch from 034b4d9 to d37e21f Compare October 1, 2025 13:57
@tvdeyen
Copy link
Member

tvdeyen commented Oct 1, 2025

@sascha-karnatz I added two commits that adjust styling. Please pull before push :)

@sascha-karnatz sascha-karnatz force-pushed the new-color-ingredient branch 2 times, most recently from ebd29b0 to b3b3623 Compare October 10, 2025 13:53
@tvdeyen tvdeyen modified the milestones: 8.0, 8.1 Oct 13, 2025
Copy link
Contributor

@mamhoff mamhoff left a comment

Choose a reason for hiding this comment

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

I like this quite a lot. Can we have a rebase and maybe the ViewComponent that @tvdeyen mentioned?

@tvdeyen
Copy link
Member

tvdeyen commented Nov 24, 2025

I like this quite a lot. Can we have a rebase and maybe the ViewComponent that @tvdeyen mentioned?

I think we would benefit from #3457 being merged first

@tvdeyen
Copy link
Member

tvdeyen commented Jan 2, 2026

#3457 is now ready for review

Add a new ingredient type to select a color. By default only a color input will be shown. It is possible to provide predefined colors as settings and then the color ingredient will show a select of all colors. Furthermore it has a second option 'custom_color' which adds the possibility to select a color which is not predefined, if necessary.
Copy link
Member

@tvdeyen tvdeyen left a comment

Choose a reason for hiding this comment

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

Nice feature!

@tvdeyen tvdeyen merged commit 55f074f into AlchemyCMS:main Jan 16, 2026
19 checks passed
@tvdeyen tvdeyen added the enhancement New feature or enhancement label Jan 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants