Skip to content

Commit 136defe

Browse files
authored
Merge pull request #66 from Nexters/fix/home-design
홈 화면에서 변경된 디자인을 적용합니다.
2 parents d9d9ad7 + ce969c9 commit 136defe

File tree

4 files changed

+41
-23
lines changed

4 files changed

+41
-23
lines changed

core/designsystem/src/main/res/values/strings.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<string name="home_bottom_sheet_stop_text">멈추기</string>
77
<string name="home_bottom_create_gathering_description">모임을 생성하고\n넌지시 만남을 제안해 보세요</string>
88
<string name="home_bottom_create_gathering_button_text">모임 생성하기</string>
9-
<string name="home_last_alarm">마지막 알람</string>
9+
<string name="home_last_alarm">마지막 연락</string>
1010
<string name="home_random_proposal_description_prefix">말이 안되는거 알지만\n\n\n우리,</string>
1111
<string name="home_random_proposal_description_suffix">어때</string>
1212
<string name="home_proposals">받은 초대장</string>

feature/home/src/main/java/com/plottwist/feature/home/HomeScreen.kt

Lines changed: 26 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -317,27 +317,41 @@ private fun HomeScreen(
317317
HomeAppBar(onMyPageClick)
318318

319319
Column(
320-
modifier = Modifier.fillMaxSize().padding(
321-
bottom = BOTTOM_SHEET_PEEK_HEIGHT.dp
322-
).verticalScroll(verticalScrollState)
320+
modifier = Modifier
321+
.fillMaxSize()
322+
.padding(
323+
bottom = BOTTOM_SHEET_PEEK_HEIGHT.dp
324+
)
325+
.verticalScroll(verticalScrollState)
323326
) {
324327
HomeTitle(
325328
modifier = Modifier.height(HOME_TITLE_HEIGHT.dp),
326329
name = if(userName is UiState.Success) userName.value else ""
327330
)
328-
329-
HomeContent(
330-
modifier = Modifier
331-
.padding(
332-
top = homeContentTopPadding - HOME_TITLE_HEIGHT.dp - 40.dp,
333-
bottom = 40.dp
334-
),
335-
gatherings = if(gatherings is UiState.Success) gatherings.value else Gatherings(),
331+
if(gatherings is UiState.Success && gatherings.value.gatheringOverviews.size >= 2) {
332+
HomeContent(
333+
modifier = Modifier
334+
.padding(top = 80.dp, bottom = 80.dp),
335+
gatherings = gatherings.value,
336336
onAddGatheringClick = onAddGatheringClick,
337337
onGatheringClick = onGatheringClick
338-
)
338+
)
339+
}
339340
}
340341
}
342+
if(gatherings !is UiState.Success || gatherings.value.gatheringOverviews.size < 2){
343+
HomeContent(
344+
modifier = Modifier.align(Alignment.Center),
345+
gatherings = if(gatherings is UiState.Success && gatherings.value.gatheringOverviews.size <= 1) {
346+
gatherings.value
347+
} else {
348+
Gatherings()
349+
},
350+
onAddGatheringClick = onAddGatheringClick,
351+
onGatheringClick = onGatheringClick
352+
)
353+
}
354+
341355
if(proposalTags is UiState.Success) {
342356
HomeBottomSheet(
343357
modifier = Modifier

feature/home/src/main/java/com/plottwist/feature/home/component/GatheringsCard.kt

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ import androidx.compose.ui.tooling.preview.Preview
2727
import androidx.compose.ui.unit.dp
2828
import com.plottwist.core.designsystem.R
2929
import com.plottwist.core.designsystem.foundation.TukColorTokens.Gray000
30+
import com.plottwist.core.designsystem.foundation.TukColorTokens.Gray800
31+
import com.plottwist.core.designsystem.foundation.TukColorTokens.Gray900
3032
import com.plottwist.core.designsystem.foundation.type.TukPretendardTypography
3133
import com.plottwist.core.domain.model.Gatherings
3234

@@ -46,7 +48,7 @@ fun GatheringsCard(
4648
blur = 6.dp
4749
)
4850
.background(
49-
color = Color(0x35FFFFFF),
51+
color = Color(0x88FFFFFF),
5052
shape = RoundedCornerShape(20.dp)
5153
)
5254
.border(
@@ -63,7 +65,7 @@ fun GatheringsCard(
6365
)
6466
if(gatherings.gatheringOverviews.isNotEmpty()) {
6567
HorizontalDivider(
66-
color = Color(0xFFEFEFEF)
68+
color = Color(0xFFEAEAEA)
6769
)
6870

6971
gatherings.gatheringOverviews.forEach { gathering ->
@@ -107,7 +109,7 @@ fun CreateGatheringText(
107109
Text(
108110
text = "모임 생성",
109111
style = TukPretendardTypography.body14R,
110-
color = Color(0xFF1F1F1F)
112+
color = Gray900
111113
)
112114
}
113115
}
@@ -123,7 +125,7 @@ fun GatheringItem(
123125
modifier
124126
.fillMaxWidth()
125127
.clip(RoundedCornerShape(20.dp))
126-
.padding(vertical = 12.dp)
128+
.padding(vertical = 6.dp)
127129
.clickable(
128130
interactionSource = null,
129131
indication = null
@@ -142,22 +144,22 @@ fun GatheringItem(
142144
style = TukPretendardTypography.body14M,
143145
maxLines = 1,
144146
overflow = TextOverflow.Ellipsis,
145-
color = Color(0xFF1f1f1f)
147+
color = Gray900
146148
)
147149

148150
Row (
149151
horizontalArrangement = Arrangement.spacedBy(5.dp)
150152
) {
151153
Text(
152154
text = stringResource(R.string.home_last_alarm),
153-
style = TukPretendardTypography.body14R,
154-
color = Color(0xFF888888)
155+
style = TukPretendardTypography.body12R,
156+
color = Gray800
155157
)
156158

157159
Text(
158160
text = lastAlarm,
159-
style = TukPretendardTypography.body14R,
160-
color = Color(0xFF888888)
161+
style = TukPretendardTypography.body12R,
162+
color = Gray800
161163
)
162164
}
163165
}

feature/home/src/main/java/com/plottwist/feature/home/component/HomeBottomSheet.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ import androidx.compose.ui.unit.IntOffset
4040
import androidx.compose.ui.unit.dp
4141
import com.plottwist.core.designsystem.R
4242
import com.plottwist.core.designsystem.foundation.TukColorTokens.Gray800
43+
import com.plottwist.core.designsystem.foundation.TukColorTokens.Gray900
4344
import com.plottwist.core.designsystem.foundation.type.TukSerifTypography
4445
import com.plottwist.core.ui.extension.borderExceptBottom
4546
import com.plottwist.core.ui.extension.dropShadow
@@ -264,7 +265,8 @@ fun DraggableBottomSheet(
264265
) {
265266
Text(
266267
text = stringResource(R.string.home_bottom_sheet_nudging_text),
267-
style = TukSerifTypography.body14R
268+
style = TukSerifTypography.body14R,
269+
color = Gray900
268270
)
269271
}
270272
}

0 commit comments

Comments
 (0)