-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Allow admins to set brand color #10097
Conversation
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.
Left few comments, not blockers though.
Co-authored-by: Michael Kohl <citizen428@dev.to>
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.
LGTM!
@@ -0,0 +1,11 @@ | |||
module Color |
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.
Usually, we tend to use plurals for service name spaces, but don't let that stop this PR, I can change it during cooldown and potentially move the HecComparer
into the Colors
namespace too, keeping related things together and all.
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.
Nice, thanks for making the changes @benhalpern 😃
* Allow admins to set brand color * Remove extra line * Fix linting * Update app/controllers/admin/configs_controller.rb Co-authored-by: Michael Kohl <citizen428@dev.to> * Move wcag compare to own class * Remove unnecessary spacing Co-authored-by: Michael Kohl <citizen428@dev.to>
What type of PR is this? (check all applicable)
Description
This feature allows admins to set their own main brand color....
This color needs to contrast properly with white, so I added the wcag contrast gem. I think this is a good gem to add, because we can start using this elsewhere, like user profile colors, tags, etc. Currently we let users set non-contrasting colors and basically just moderate it. This will help us ensure a minimum of 4.5:1 contrast for readability and accessibility for all.
The gem has not recently been updates, but it is a fairly simple low-bloat utility gem. The gem author is active and I feel like we can be comfortable that we could merge a change if we needed to.
Also added some basic validations in the controller. I figured we can start adding some validations in this area and extract these to a better place in a future refactor once we establish more of these.