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

Ktlint 우변이 여러줄)일 때 줄바꿈 되는 포메팅 수정 #19

Merged
merged 3 commits into from
Jan 24, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ ktlint_standard_function-literal = disabled
ktlint_standard_function-type-modifier-spacing = disabled
ktlint_standard_multiline-loop = disabled
ktlint_standard_function-signature = disabled
# TODO : compose Modifier 체이닝 메서드 라인 포멧 이상한거 수정
ktlint_standard_string-template-indent = disabled
ktlint_standard_multiline-expression-wrapping = disabled
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,9 @@ private fun OnboardingScreen(

// TODO : 클릭 시 Goal DB에 저장 필요
DobeDobeTextButton(
modifier =
Modifier
.fillMaxWidth()
.heightIn(54.dp),
modifier = Modifier
.fillMaxWidth()
.heightIn(54.dp),
onClick = completeOnboarding,
) {
// TODO : Writing 수정 필요
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,10 @@ fun DobDobeAsyncImage(

val imageLoader =
rememberAsyncImagePainter(
model =
ImageRequest.Builder(LocalContext.current)
.data(model)
.crossfade(true)
.build(),
model = ImageRequest.Builder(LocalContext.current)
.data(model)
.crossfade(true)
.build(),
contentScale = contentScale,
onState = { state -> imagePainterState = state },
)
Expand All @@ -65,9 +64,11 @@ fun DobDobeAsyncImage(
is AsyncImagePainter.State.Loading -> {
onLoading()
}

is AsyncImagePainter.State.Error -> {
onError()
}

is AsyncImagePainter.State.Empty,
is AsyncImagePainter.State.Success,
-> Unit
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,10 @@ fun DobeDobeTextButton(
onClick = onClick,
modifier = modifier,
enabled = enabled,
colors =
ButtonDefaults.textButtonColors(
contentColor = Color.White,
containerColor = Color.Black,
),
colors = ButtonDefaults.textButtonColors(
contentColor = Color.White,
containerColor = Color.Black,
),
shape = RoundedCornerShape(20.dp),
contentPadding = ButtonDefaults.TextButtonContentPadding,
content = content,
Expand All @@ -52,11 +51,10 @@ fun DobeDobeOutlinedButton(
modifier = modifier,
enabled = enabled,
colors = ButtonDefaults.outlinedButtonColors(),
border =
BorderStroke(
width = 1.dp,
color = MaterialTheme.colorScheme.outline,
),
border = BorderStroke(
width = 1.dp,
color = MaterialTheme.colorScheme.outline,
),
contentPadding = ButtonDefaults.ContentPadding,
content = content,
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,10 @@ fun DobeDobeTextField(
state = state,
enabled = enabled,
readOnly = readOnly,
textStyle =
TextStyle(
fontSize = 24.sp,
fontWeight = FontWeight.SemiBold,
),
textStyle = TextStyle(
fontSize = 24.sp,
fontWeight = FontWeight.SemiBold,
),
decorator = { innerTextField ->
Column(
modifier =
Expand All @@ -55,11 +54,10 @@ fun DobeDobeTextField(
)
}
},
keyboardOptions =
KeyboardOptions(
keyboardType = keyboardType,
imeAction = imeAction,
),
keyboardOptions = KeyboardOptions(
keyboardType = keyboardType,
imeAction = imeAction,
),
modifier = modifier,
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,9 @@ private fun GoalBottomSheetHeader() {
fontWeight = FontWeight.SemiBold,
)
IconButton(
modifier =
Modifier
.size(42.dp)
.offset {
IntOffset(x = 12.dp.roundToPx(), y = 0)
},
modifier = Modifier
.size(42.dp)
.offset { IntOffset(x = 12.dp.roundToPx(), y = 0) },
onClick = {},
) {
Icon(
Expand All @@ -95,10 +92,9 @@ private fun GoalBottomSheetBody(
onGoalClicked: (Goal) -> Unit,
) {
LazyColumn(
modifier =
Modifier
.fillMaxWidth()
.requiredHeightIn(min = 200.dp),
modifier = Modifier
.fillMaxWidth()
.requiredHeightIn(min = 200.dp),
// TODO: 최소 높이 조절 필요
verticalArrangement = Arrangement.spacedBy(18.dp),
contentPadding = PaddingValues(horizontal = 24.dp),
Expand All @@ -120,17 +116,16 @@ private fun GoalBottomSheetContentPreview(
) {
var goals by remember { mutableStateOf(pGoals) }
val onGoalDone: (Goal) -> Unit = {
goals =
goals.map { goal ->
if (goal.id == it.id) {
return@map if (goal.state == Goal.State.Done) {
goal.copy(state = Goal.State.Todo)
} else {
goal.copy(state = Goal.State.Done)
}
goals = goals.map { goal ->
if (goal.id == it.id) {
return@map if (goal.state == Goal.State.Done) {
goal.copy(state = Goal.State.Todo)
} else {
goal.copy(state = Goal.State.Done)
}
goal
}
goal
}
}
GoalBottomSheetContent(
goals = goals,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,9 @@ fun GoalRow(
onClick = onGoalClicked,
) {
Row(
modifier =
Modifier
.fillMaxWidth()
.padding(start = 15.dp, top = 17.dp, bottom = 18.dp, end = 15.dp),
modifier = Modifier
.fillMaxWidth()
.padding(start = 15.dp, top = 17.dp, bottom = 18.dp, end = 15.dp),
verticalAlignment = Alignment.CenterVertically,
) {
DobeDobeCheckBox(
Expand Down Expand Up @@ -77,35 +76,32 @@ private fun GoalRowPreview() {
DobeDobeTheme {
Column(verticalArrangement = Arrangement.spacedBy(8.dp)) {
GoalRow(
goal =
Goal(
id = 1L,
title = "Todo",
isPinned = false,
state = Goal.State.Todo,
),
goal = Goal(
id = 1L,
title = "Todo",
isPinned = false,
state = Goal.State.Todo,
),
onGoalDone = {},
onGoalClicked = {},
)
GoalRow(
goal =
Goal(
id = 1L,
title = "Done",
isPinned = false,
state = Goal.State.Done,
),
goal = Goal(
id = 1L,
title = "Done",
isPinned = false,
state = Goal.State.Done,
),
onGoalDone = {},
onGoalClicked = {},
)
GoalRow(
goal =
Goal(
id = 1L,
title = "Pinned",
isPinned = true,
state = Goal.State.Done,
),
goal = Goal(
id = 1L,
title = "Pinned",
isPinned = true,
state = Goal.State.Done,
),
onGoalDone = {},
onGoalClicked = {},
)
Expand Down
Loading