-
Notifications
You must be signed in to change notification settings - Fork 232
[Compound] Implement platform components (Switch, RadioButton, Checkbox) #982
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 platform components (Switch, RadioButton, Checkbox) #982
Conversation
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## develop #982 +/- ##
===========================================
+ Coverage 56.63% 56.67% +0.03%
===========================================
Files 980 981 +1
Lines 24801 24886 +85
Branches 5033 5054 +21
===========================================
+ Hits 14046 14104 +58
- Misses 8527 8544 +17
- Partials 2228 2238 +10
☔ View full report in Codecov by Sentry. |
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, just some remark about parameters exhaustivity, but nothing blocking.
@@ -26,14 +26,17 @@ import androidx.compose.ui.Modifier | |||
import androidx.compose.ui.tooling.preview.Preview | |||
import io.element.android.libraries.designsystem.preview.ElementThemedPreview | |||
import io.element.android.libraries.designsystem.preview.PreviewGroup | |||
import io.element.android.libraries.theme.ElementTheme | |||
|
|||
// Designs in https://www.figma.com/file/G1xy0HDZKJf5TCRFmKb5d5/Compound-Android-Components?type=design&mode=design&t=qb99xBP5mwwCtGkN-1 |
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 have sent a request to access this file)
disabledUncheckedColor = ElementTheme.colors.borderDisabled, | ||
disabledCheckedColor = ElementTheme.colors.iconDisabled, | ||
disabledIndeterminateColor = ElementTheme.colors.iconDisabled, | ||
) |
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.
Shouldn't we use all the possible parameters here? checkedColor
and checkmarkColor
are missing.
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.
Those will use the default tokens. We can be explicit and set those too though.
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.
OK, thanks. Maybe keep it like this, that's fine.
return RadioButtonDefaults.colors( | ||
unselectedColor = ElementTheme.colors.borderInteractivePrimary, | ||
disabledUnselectedColor = ElementTheme.colors.borderDisabled, | ||
disabledSelectedColor = ElementTheme.colors.iconDisabled, |
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.
Same remark about the parameter, selectedColor
is missing.
disabledUncheckedThumbColor = ElementTheme.colors.iconDisabled, | ||
disabledCheckedTrackColor = ElementTheme.colors.iconDisabled, | ||
disabledCheckedBorderColor = ElementTheme.colors.iconDisabled, | ||
) |
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.
same remark, hence more params are missing here.
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.
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'll add some dark previews too, I won't add the icon version though, as it's not needed according to the Compound team.
d48b63c
to
f770507
Compare
Kudos, SonarCloud Quality Gate passed! |
Also, fix a padding issue in
ReplyToContent
.Closes element-hq/compound#168.