-
Notifications
You must be signed in to change notification settings - Fork 2
π :: μ μ² νμ΄μ§ ꡬν #815
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
The head ref may contain hidden characters: "feature/814-\uC2E0\uCCAD-\uD398\uC774\uC9C0-\uAD6C\uD604"
Changes from all commits
d1389f4
07b7176
f7f24f2
b83a1cb
489f189
0ad1246
b1f9bc0
b67332a
c1eb5a0
60285c5
5bf40d7
be65977
1f3f44c
eacf820
2167158
24183d0
4c54f55
6157fdc
bdbc00a
6630bb5
42fcb52
0c5bdbd
d578bf1
7ac60c6
009e581
33f9f15
5ce938a
55af2a7
3b46807
cff3a34
d79859d
f08f3d1
8520fe7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,9 +4,15 @@ import androidx.compose.animation.animateColorAsState | |
| import androidx.compose.foundation.background | ||
| import androidx.compose.foundation.layout.Box | ||
| import androidx.compose.foundation.layout.PaddingValues | ||
| import androidx.compose.foundation.layout.WindowInsets | ||
| import androidx.compose.foundation.layout.fillMaxWidth | ||
| import androidx.compose.foundation.layout.height | ||
| import androidx.compose.foundation.layout.imePadding | ||
| import androidx.compose.foundation.layout.navigationBars | ||
| import androidx.compose.foundation.layout.offset | ||
| import androidx.compose.foundation.layout.padding | ||
| import androidx.compose.foundation.layout.systemBarsPadding | ||
| import androidx.compose.foundation.layout.windowInsetsPadding | ||
| import androidx.compose.foundation.shape.RoundedCornerShape | ||
| import androidx.compose.material3.Text | ||
| import androidx.compose.runtime.Composable | ||
|
|
@@ -21,6 +27,7 @@ import androidx.compose.ui.graphics.Color | |
| import androidx.compose.ui.graphics.Shape | ||
| import androidx.compose.ui.platform.LocalDensity | ||
| import androidx.compose.ui.text.style.TextDecoration | ||
| import androidx.compose.ui.unit.Dp | ||
| import androidx.compose.ui.unit.dp | ||
| import team.aliens.dms.android.core.designsystem.DmsTheme | ||
| import team.aliens.dms.android.core.designsystem.bodyM | ||
|
|
@@ -308,8 +315,6 @@ fun DmsButton( | |
| PaddingValues(horizontal = 20.dp, vertical = 16.dp) | ||
| } | ||
|
|
||
| // val buttonShape = if (buttonType == ButtonType.Rounded) RoundedCornerShape(24.dp) else shape | ||
|
|
||
| BasicButton( | ||
| modifier = modifier, | ||
| backgroundColor = backgroundColor, | ||
|
|
@@ -349,3 +354,35 @@ fun DmsButton( | |
| } | ||
| } | ||
| } | ||
| @Composable | ||
| fun DmsLayeredButton( | ||
| modifier: Modifier = Modifier, | ||
| text: String, | ||
| buttonType: ButtonType, | ||
| buttonColor: ButtonColor, | ||
| enabled: Boolean = true, | ||
| shape: RoundedCornerShape, | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Shape parameter not forwarded to inner button despite comment intent. The Korean comment on line 386-387 indicates the intention to pass a shape to the button, but the π Proposed fix to forward shape parameterIf the intent is to pass the shape to the inner button: DmsButton(
modifier = Modifier
.fillMaxWidth()
.align(Alignment.Center),
text = text,
buttonType = buttonType,
buttonColor = buttonColor,
enabled = enabled,
- // 3. λ²νΌμλ λ³λμ shapeλ₯Ό μ λ¬ν©λλ€.
+ shape = shape,
isLoading = isLoading,
onClick = onClick,
)Alternatively, if the outer shape should remain independent, consider removing the misleading comment and updating the parameter type to accept generic - shape: RoundedCornerShape,
+ shape: Shape,Also applies to: 378-389 π€ Prompt for AI Agents |
||
| backgroundColor: Color = DmsTheme.colorScheme.surfaceVariant, | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Critical: Two related issues:
This suggests an incomplete implementation where the developer likely intended to use the π Proposed fix Box(
modifier = modifier
- .background(color = Color.White, shape = shape)
+ .background(color = backgroundColor, shape = shape)
.windowInsetsPadding(WindowInsets.navigationBars)
.padding(layerOffset),
) {Also applies to: 372-372 π€ Prompt for AI Agents |
||
| layerOffset: Dp = 24.dp, | ||
| isLoading: Boolean, | ||
| onClick: () -> Unit, | ||
| ) { | ||
| Box( | ||
| modifier = modifier | ||
| .background(color = Color.White, shape = shape) | ||
| .windowInsetsPadding(WindowInsets.navigationBars) | ||
| .padding(layerOffset), | ||
| ) { | ||
| DmsButton( | ||
| modifier = Modifier | ||
| .fillMaxWidth() | ||
| .align(Alignment.Center), | ||
| text = text, | ||
| buttonType = buttonType, | ||
| buttonColor = buttonColor, | ||
| enabled = enabled, | ||
| isLoading = isLoading, | ||
| onClick = onClick, | ||
| ) | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,134 @@ | ||
| package team.aliens.dms.android.core.designsystem.card | ||
|
|
||
| import androidx.annotation.DrawableRes | ||
| import androidx.compose.animation.animateColorAsState | ||
| import androidx.compose.foundation.Image | ||
| import androidx.compose.foundation.background | ||
| import androidx.compose.foundation.border | ||
| import androidx.compose.foundation.layout.Arrangement | ||
| import androidx.compose.foundation.layout.Column | ||
| import androidx.compose.foundation.layout.Row | ||
| import androidx.compose.foundation.layout.Spacer | ||
| import androidx.compose.foundation.layout.fillMaxWidth | ||
| import androidx.compose.foundation.layout.padding | ||
| import androidx.compose.foundation.layout.size | ||
| import androidx.compose.foundation.shape.RoundedCornerShape | ||
| import androidx.compose.material3.Icon | ||
| import androidx.compose.material3.Text | ||
| import androidx.compose.runtime.Composable | ||
| import androidx.compose.runtime.getValue | ||
| import androidx.compose.ui.Alignment | ||
| import androidx.compose.ui.Modifier | ||
| import androidx.compose.ui.draw.clip | ||
| import androidx.compose.ui.res.painterResource | ||
| import androidx.compose.ui.unit.dp | ||
| import team.aliens.dms.android.core.designsystem.DmsTheme | ||
| import team.aliens.dms.android.core.designsystem.bodyB | ||
| import team.aliens.dms.android.core.designsystem.endPadding | ||
| import team.aliens.dms.android.core.designsystem.foundation.DmsIcon | ||
| import team.aliens.dms.android.core.designsystem.labelB | ||
| import team.aliens.dms.android.core.designsystem.labelM | ||
| import team.aliens.dms.android.core.designsystem.util.clickable | ||
|
|
||
| @Composable | ||
| fun DmsApplicationCard( | ||
| modifier: Modifier = Modifier, | ||
| title: String, | ||
| description: String? = null, | ||
| period: String? = null, | ||
| appliedTitle: String? = null, | ||
| @DrawableRes iconRes: Int, | ||
| isSelected: Boolean = false, | ||
| onClick: () -> Unit, | ||
| ) { | ||
| val borderColor by animateColorAsState( | ||
| targetValue = if (isSelected) { | ||
| DmsTheme.colorScheme.onPrimaryContainer | ||
| } else { | ||
| DmsTheme.colorScheme.surfaceTint | ||
| }, | ||
| ) | ||
| Column( | ||
| modifier = modifier | ||
| .fillMaxWidth() | ||
| .clip(RoundedCornerShape(32.dp)) | ||
| .background(DmsTheme.colorScheme.surfaceTint) | ||
| .clickable(onClick = onClick) | ||
| .border( | ||
| width = 2.dp, | ||
| color = borderColor, | ||
| shape = RoundedCornerShape(32.dp), | ||
| ) | ||
| .padding(horizontal = 16.dp, vertical = 24.dp), | ||
| verticalArrangement = Arrangement.spacedBy(8.dp), | ||
| ) { | ||
| Row( | ||
| verticalAlignment = Alignment.CenterVertically, | ||
| ) { | ||
| Image( | ||
| modifier = Modifier.size(32.dp), | ||
| painter = painterResource(iconRes), | ||
| contentDescription = null, | ||
| ) | ||
| Text( | ||
| modifier = Modifier.padding(start = 8.dp), | ||
| text = title, | ||
| style = DmsTheme.typography.bodyB, | ||
| color = DmsTheme.colorScheme.inverseOnSurface, | ||
| ) | ||
| Spacer(modifier = Modifier.weight(1f)) | ||
| if (description == null && appliedTitle != null) { | ||
| AppliedTitleText( | ||
| modifier = Modifier.endPadding(16.dp), | ||
| appliedTitle = appliedTitle, | ||
| ) | ||
| } | ||
| Icon( | ||
| painter = painterResource(DmsIcon.Forward), | ||
| tint = DmsTheme.colorScheme.scrim, | ||
| contentDescription = null, | ||
| ) | ||
| } | ||
| period?.let { | ||
| Text( | ||
| text = period, | ||
| style = DmsTheme.typography.labelM, | ||
| color = DmsTheme.colorScheme.onPrimaryContainer, | ||
| ) | ||
| } | ||
| description?.let { | ||
| Row( | ||
| verticalAlignment = Alignment.CenterVertically, | ||
| horizontalArrangement = Arrangement.SpaceBetween, | ||
| ) { | ||
| Text( | ||
| text = description, | ||
| style = DmsTheme.typography.labelM, | ||
| color = DmsTheme.colorScheme.inverseSurface, | ||
| ) | ||
| Spacer(modifier = Modifier.weight(1f)) | ||
| appliedTitle?.let { | ||
| AppliedTitleText(appliedTitle = appliedTitle) | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
|
|
||
| @Composable | ||
| private fun AppliedTitleText( | ||
| modifier: Modifier = Modifier, | ||
| appliedTitle: String, | ||
| ) { | ||
| Text( | ||
| modifier = modifier | ||
| .background( | ||
| color = DmsTheme.colorScheme.primary, | ||
| shape = RoundedCornerShape(6.dp), | ||
| ) | ||
| .padding(horizontal = 22.dp, vertical = 8.dp), | ||
| text = appliedTitle, | ||
| style = DmsTheme.typography.labelB, | ||
| color = DmsTheme.colorScheme.onPrimaryContainer, | ||
| ) | ||
| } |
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.
π§© Analysis chain
π Script executed:
Repository: team-aliens/DMS-Android
Length of output: 212
π Script executed:
Repository: team-aliens/DMS-Android
Length of output: 50380
π Script executed:
Repository: team-aliens/DMS-Android
Length of output: 5444
π Script executed:
Repository: team-aliens/DMS-Android
Length of output: 1333
Remove unreachable code in MealWorker.kt related to the minSdk increase.
The change from minSdk 24 to 26 is complete with no residual references to APIs 24-25 found in the codebase. However, the else branch in MealWorker.kt (line 42) containing
TODO("VERSION.SDK_INT < O")is now unreachable since Build.VERSION_CODES.O equals API level 26. Remove this dead code path and keep only the PeriodicWorkRequestBuilder branch.π€ Prompt for AI Agents