-
Notifications
You must be signed in to change notification settings - Fork 18
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
Demo app foundations #24
Conversation
The DemoApp will be created with JetpackCompose so that the basic dependencies will be added.
Composable functions start with uppercase, so Ktlint detects it as an error. Adding the exception for this case. "Function name should start with a lowercase letter (except factory methods) and use camel case (cannot be auto-corrected)" More configurations can be added using the .editoconfig file. See: https://pinterest.github.io/ktlint/latest/rules/configuration-ktlint/ and https://editorconfig.org/
The official ktlint doc also refers to this Compose ruleset |
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, feel free to ignore the comment and
) { | ||
val colorScheme = | ||
when { | ||
dynamicColor && Build.VERSION.SDK_INT >= Build.VERSION_CODES.S -> { |
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.
❤️
modifier: Modifier = Modifier, | ||
) { | ||
Text( | ||
text = "Hello $name!", |
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 I'm nitpicking because we'll likely remove this soon, but should we start with localized strings?
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.
I will delete it in the following PR, so it won't last long. But yeah, the following strings should be localized.
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.
@hamorillo BTW, do we have a rule to check for unlocalizable strings?
In fact, I've found the Twitter repo because Compose ruleset is a fork of it. 😅 |
❤️ Thanks for the review @maxme! |
Creating the DemoApp foundations. As we've decided to use Jetcpack Compose adding also the basic dependencies.
Note: Composable functions start with uppercase, so Ktlint detects them as an error. I'm adding the exception for this case in the
.editorconfig
.Without the exception, you'll receive the following lint error:
I saw that Twitter has a repo with more rules; just commenting on it here for future reference.
Testing
Hello Android!
😅)