-
-
Notifications
You must be signed in to change notification settings - Fork 316
Add color ingredient type #3385
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Add color ingredient type #3385
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3385 +/- ##
=======================================
Coverage 97.13% 97.13%
=======================================
Files 279 281 +2
Lines 7363 7376 +13
=======================================
+ Hits 7152 7165 +13
Misses 211 211 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
722639c to
034b4d9
Compare
There was a problem hiding this 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
| module Alchemy | ||
| module Ingredients | ||
| # A Color value | ||
| # |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe explain the settings here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And add this to the guides as well
| <%= color_field_tag(color_editor.form_field_name, color_editor.value, disabled:) %> | ||
| </alchemy-color-select> | ||
| <% end %> | ||
| <% end %> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could have been a ViewComponent ;)
034b4d9 to
d37e21f
Compare
|
@sascha-karnatz I added two commits that adjust styling. Please pull before push :) |
28d3415 to
ebd29b0
Compare
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.
ebd29b0 to
b3b3623
Compare


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_coloroption:Without any settings:

Checklist