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

Improve StandardToggleChip to handle largest font scale #1286

Merged
merged 1 commit into from
May 17, 2023

Conversation

luizgrp
Copy link
Member

@luizgrp luizgrp commented May 16, 2023

WHAT

Improve StandardToggleChip to handle largest font scale.

Screenshot 2023-05-16 at 20 23 34

WHY

So it won't clip the text when user is using largest font scale.

HOW

  • Increase the size of the chip when the font scale is bigger than the threshold;
  • Add tests and previews with largest font scale;

Checklist 📋

  • Add explicit visibility modifier and explicit return types for public declarations
  • Run spotless check
  • Run tests
  • Update metalava's signature text files

@luizgrp luizgrp self-assigned this May 16, 2023
@luizgrp luizgrp requested review from yschimke and kul3r4 May 17, 2023 07:25
@@ -49,7 +51,7 @@ import com.google.android.horologist.base.ui.util.DECORATIVE_ELEMENT_CONTENT_DES
@Composable
public fun StandardToggleChip(
checked: Boolean,
onCheckedChange: (Boolean) -> Unit,
onCheckedChanged: (Boolean) -> Unit,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why past tense? Shouldn't we match the ToggleChip?

Copy link
Member Author

@luizgrp luizgrp May 17, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My interpretation is that the callback is called after the event has performed. Can revert in the future once figure out that is not the case!

@luizgrp luizgrp merged commit 318a0d9 into google:main May 17, 2023
@luizgrp luizgrp deleted the stdtogglechip_improvements branch May 17, 2023 07:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants