-
-
Notifications
You must be signed in to change notification settings - Fork 719
automatically converting Codex color tokens to Compose color values #5690
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?
Conversation
- adds function extract_colors for raw colors - adds convert_hex_to_kotlin_color function - adds a raw color file generator script
- refactor functions and code for better readability - adds to_camel_case function - logic fixes
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.
When I run ./gradlew ktlint
to check the style, it showed me the following message:
ComposeColors.kt:1:1: File must end with a newline (\n) (standard:final-newline)
ComposeColors.kt:5:23: Trailing space(s) (standard:no-trailing-spaces)
WikipediaColor.kt:1:1: File must end with a newline (\n) (standard:final-newline)
Few thoughts:
- Can we make this script be able to execute directly without having the
python
in the command line to execute it? For example, I can runbump-version-code
directly. - Would it be possible to include some
print
event so that we can make sure the script is running in process?
|
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.
The script works for me (even on Windows!), but I noticed the script will generate the ComposeColors
in the compose/theme
package. Is this something expected?
Nope that's not expected, i updated the file path. Thank you for pointing this out. |
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.
It looks good to me now.
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.
Great - just a minor issue.
Also, since this script already starts to generate WikipediaColor.kt
, do you think you could make it generate LightColors
and maybe even DarkColors
?
- generates raw color, WikipediaColor data class and also light and dark mode color
What does this do?
adds a script to generate the following
Phabricator:
https://phabricator.wikimedia.org/T396880