Skip to content
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

Replace all Color(hex:) references with Color constants #1375

Closed
joshuatbrown opened this issue Aug 2, 2024 · 5 comments
Closed

Replace all Color(hex:) references with Color constants #1375

joshuatbrown opened this issue Aug 2, 2024 · 5 comments
Assignees
Labels
devx Work that will improve developer experience/velocity good first issue Good for newcomers

Comments

@joshuatbrown
Copy link
Contributor

joshuatbrown commented Aug 2, 2024

SwiftGen generates color constants based on our colors defined in Colors.xcassets. We should only use the color constants and never use Color(hex:). Let's replace all instances with color constants, and if there are no constants, create new colors in Colors.xcassets. Let's also replace any uses of Color(red:green:blue:opacity:) and Color(white:opacity:).

See #733 for more context (this is essentially a dupe of that).

@joshuatbrown joshuatbrown added good first issue Good for newcomers devx Work that will improve developer experience/velocity labels Aug 2, 2024
@lingoslinger
Copy link
Contributor

I will take this issue as I have already done the work in 1374 to move colors to their own asset catalog. Please assign to me when convenient.

@joshuatbrown
Copy link
Contributor Author

@lingoslinger thanks! I've assigned it to you.

@lingoslinger
Copy link
Contributor

lingoslinger commented Aug 12, 2024

Some questions as I begin work on this issue:

  • What is the established naming convention for colors inthe Colors asset catalog?
  • do you want other non-asset-catalog instances of Color replaced (Color(red, green, blue. opacity), Color(white, opacity), etc)?

@joshuatbrown
Copy link
Contributor Author

@lingoslinger the goal is to use semantic naming for the colors -- see the ones that are already there for examples, like action-primary-background. And yeah, I think replacing the other Color inits is a good idea, too.

@joshuatbrown
Copy link
Contributor Author

@setch-l for UAT, we'll just want to make sure the colors are still the same. Let us know if any color in the app seems off.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
devx Work that will improve developer experience/velocity good first issue Good for newcomers
Projects
Archived in project
Development

No branches or pull requests

3 participants