nowinandroid icon indicating copy to clipboard operation
nowinandroid copied to clipboard

[Bug]: Onboarding "Done" text is tiny

Open dturner opened this issue 3 years ago • 3 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

Is there a StackOverflow question about this issue?

  • [X] I have searched StackOverflow

What happened?

The text on the "Done" button is tiny. It shouldn't be.

Screenshot_20221110-130133

Relevant logcat output

No response

Code of Conduct

  • [X] I agree to follow this project's Code of Conduct

dturner avatar Nov 10 '22 13:11 dturner

What would be the appropriate style?

https://github.com/android/nowinandroid/blob/e72e31b1f013676a10b4ecc6f83606a51141e862/feature/foryou/src/main/java/com/google/samples/apps/nowinandroid/feature/foryou/ForYouScreen.kt#L270-L272

MaterialTheme.typography.bodyMedium maybe?

SimonMarquis avatar Nov 11 '22 19:11 SimonMarquis

Default bodySmall bodyMedium bodyLarge
image image image image

SimonMarquis avatar Nov 11 '22 19:11 SimonMarquis

Though it seems like the NiaFilledButton (and NiaOutlinedButton) are always using MaterialTheme.typography.labelSmall without checking the value of the boolean parameter small.

https://github.com/android/nowinandroid/blob/e72e31b1f013676a10b4ecc6f83606a51141e862/core/designsystem/src/main/java/com/google/samples/apps/nowinandroid/core/designsystem/component/Button.kt#L73-L77

Maybe the better fix would be to do:

        content = {
-            ProvideTextStyle(value = MaterialTheme.typography.labelSmall) {
+            ProvideTextStyle(value = if (small) MaterialTheme.typography.labelSmall else MaterialTheme.typography.labelMedium) {
                content()
            }
        }

SimonMarquis avatar Nov 11 '22 19:11 SimonMarquis

@dturner this has been fixed, you can close the issue :) image

SimonMarquis avatar May 27 '23 10:05 SimonMarquis

This issue has been fixed, we can close the issue.

SimonMarquis avatar Aug 24 '23 18:08 SimonMarquis