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

[FIX#268] 캘린더 2차 QA 반영 #270

Merged
merged 5 commits into from
Sep 27, 2024
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
1 change: 0 additions & 1 deletion core/src/main/assets/terning_scrap_cancel.json

This file was deleted.

1 change: 0 additions & 1 deletion core/src/main/assets/terning_start_home.json

This file was deleted.

2 changes: 1 addition & 1 deletion feature/src/main/assets/terning_scrap_cancel.json

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ import com.terning.feature.calendar.list.component.CalendarScrapList
import com.terning.feature.calendar.list.model.CalendarListUiState
import com.terning.feature.dialog.cancel.ScrapCancelDialog
import com.terning.feature.dialog.detail.ScrapDialog
import okhttp3.internal.toImmutableList
import java.time.LocalDate

@Composable
Expand Down Expand Up @@ -175,8 +176,7 @@ private fun CalendarListScreen(
)

CalendarScrapList(
selectedDate = currentDate,
scrapList = scrapMap[dateInKorean].orEmpty(),
scrapList = scrapMap[dateInKorean].orEmpty().toImmutableList(),
Copy link
Member

Choose a reason for hiding this comment

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

캬~ immutableList 멋있네여

Copy link
Member

Choose a reason for hiding this comment

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

아주 굿! 저희 immutable 라이브러리 아직 추가 안 한 것 같은데 추후에 반영해도 좋을 것 같네영

onScrapButtonClicked = onClickScrapButton,
onInternshipClicked = onClickInternship,
isFromList = true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ import androidx.compose.ui.graphics.Color
import androidx.compose.ui.unit.dp
import com.terning.core.designsystem.component.item.InternItem
import com.terning.core.designsystem.component.item.ScrapBox
import com.terning.core.designsystem.theme.Grey200
import com.terning.core.extension.customShadow
import com.terning.core.extension.noRippleClickable
import com.terning.domain.entity.calendar.CalendarScrapDetail

Expand All @@ -17,12 +19,15 @@ fun CalendarScrap(
modifier: Modifier = Modifier,
) {
ScrapBox(
modifier = modifier.noRippleClickable {
modifier = modifier.customShadow(
color = Grey200,
shadowRadius = 5.dp,
shadowWidth = 1.dp,
).noRippleClickable {
onInternshipClicked(scrap)
},
cornerRadius = 10.dp,
scrapColor = Color(android.graphics.Color.parseColor(scrap.color)),
elevation = 1.dp,
scrapColor = Color(android.graphics.Color.parseColor(scrap.color))
) {
InternItem(
scrapId = scrap.internshipAnnouncementId,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,16 @@ package com.terning.feature.calendar.list.component
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.rememberScrollState
import androidx.compose.foundation.verticalScroll
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.unit.dp
import com.terning.domain.entity.calendar.CalendarScrapDetail
import java.time.LocalDate

@Composable
internal fun CalendarScrapList(
selectedDate: LocalDate,
scrapList: List<CalendarScrapDetail>,
onScrapButtonClicked: (Long) -> Unit,
onInternshipClicked: (CalendarScrapDetail) -> Unit,
Expand All @@ -23,7 +22,7 @@ internal fun CalendarScrapList(
val scrollState = rememberScrollState()
val topModifier = modifier.then(
if (!isFromList) {
Modifier.verticalScroll(scrollState)
Modifier.verticalScroll(scrollState).padding(top = 15.dp)
} else {
Modifier
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ private fun CalendarWeekScreen(
color = Black,
modifier = Modifier
.fillMaxWidth()
.padding(start = 24.dp, top = 16.dp, bottom = 15.dp)
.padding(start = 24.dp, top = 16.dp)
)

when (uiState.loadState) {
Expand All @@ -203,7 +203,6 @@ private fun CalendarWeekScreen(
is UiState.Success -> {
CalendarWeekSuccess(
scrapList = uiState.loadState.data.toImmutableList(),
selectedDate = selectedDate,
onScrapButtonClicked = onClickScrapButton,
onInternshipClicked = onClickInternship
)
Expand Down Expand Up @@ -241,10 +240,8 @@ private fun CalendarWeekSuccess(
scrapList: List<CalendarScrapDetail>,
onScrapButtonClicked: (Long) -> Unit,
onInternshipClicked: (CalendarScrapDetail) -> Unit,
selectedDate: LocalDate,
) {
CalendarScrapList(
selectedDate = selectedDate,
scrapList = scrapList,
onScrapButtonClicked = onScrapButtonClicked,
onInternshipClicked = onInternshipClicked,
Expand Down
Loading