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

[Compound] implement IconButton changes #1049

Merged
merged 4 commits into from
Aug 11, 2023

Conversation

jmartinesp
Copy link
Member

Changes:

  • Ensure we use LocalContentColor for tinting.
  • Use Compound's disabled color token.
  • Update previews to match Figma designs.

@jmartinesp jmartinesp requested a review from a team as a code owner August 10, 2023 10:27
@jmartinesp jmartinesp requested review from bmarty and removed request for a team August 10, 2023 10:27
@github-actions
Copy link
Contributor

📱 Scan the QR code below to install the build (arm64 only) for this PR.
QR code
If you can't scan the QR code you can install the build via this link: https://i.diawi.com/EaUYUq

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

@jmartinesp jmartinesp requested review from a team and ganfra and removed request for bmarty and a team August 11, 2023 07:14
Copy link
Member

@ganfra ganfra left a comment

Choose a reason for hiding this comment

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

One question, otherwise LGTM

@@ -36,11 +42,15 @@ fun IconButton(
interactionSource: MutableInteractionSource = remember { MutableInteractionSource() },
content: @Composable () -> Unit
) {
val colors = IconButtonDefaults.iconButtonColors(
contentColor = LocalContentColor.current,
Copy link
Member

Choose a reason for hiding this comment

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

Why are we using LocalContentColor here and ElementTheme.colors for disabled?

Copy link
Member Author

@jmartinesp jmartinesp Aug 11, 2023

Choose a reason for hiding this comment

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

The way it was designed in Figma, the icon button could use either primary or secondary colors, so it made more sense to just allow the parent component to decide which color should be used for the icon.

As for disabled state, it's always the same color for icons, so we can just hardcode it.

Copy link
Member

Choose a reason for hiding this comment

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

Ok makes sense!

@jmartinesp jmartinesp added this pull request to the merge queue Aug 11, 2023
Merged via the queue into develop with commit d08631f Aug 11, 2023
@jmartinesp jmartinesp deleted the chore/jme/compound-platform-components-iconbutton branch August 11, 2023 10:02
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