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

[FEAT/#59] 캘린더뷰 / 월간 캘린더 서버통신 로직 구현 #90

Merged
merged 43 commits into from
Jul 17, 2024

Conversation

boiledEgg-s
Copy link
Member

@boiledEgg-s boiledEgg-s commented Jul 16, 2024

⛳️ Work Description

  • 월간 캘린더 서버통신 로직 구현
  • 서버와 직접적인 연결 X
  • 추가 작업: 파생 브랜치 머지
    - 월간 스크랩 목록 서버통신
    - 일간 스크랩 목록 서버통신

📸 Screenshot

default.mp4

📢 To Reviewers

  • 하다보니까 Feat에서 UI 로직을 너무 많이 바꾸게 됐어요,, 저도 수정 많은 리뷰 읽기 힘든데 내로남불 해버렸네요😓 앞으로 더욱 조심할게요,,,
  • Module, Repository, ViewModel, State, SideEffect, CalendarRoute, CalendarMonthScreen들 위주로 보시면 됩니다!!

@boiledEgg-s boiledEgg-s requested review from leeeyubin, arinming and Hyobeen-Park and removed request for arinming July 16, 2024 09:10
@boiledEgg-s boiledEgg-s self-assigned this Jul 16, 2024
@boiledEgg-s boiledEgg-s added FEAT ✨ 새로운 기능 구현 석준💜 석준 labels Jul 16, 2024
@boiledEgg-s boiledEgg-s requested a review from arinming July 16, 2024 09:11
Copy link
Contributor

@arinming arinming left a comment

Choose a reason for hiding this comment

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

캘린더 이거 어케햇어요...? 대단하다,,.,..........

@@ -12,6 +14,10 @@ import javax.inject.Singleton
@InstallIn(SingletonComponent::class)
abstract class RepositoryModule {

@Binds
@Singleton
abstract fun scrapRepository(scrapRepositoryImpl: ScrapRepositoryImpl): ScrapRepository
Copy link
Contributor

Choose a reason for hiding this comment

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

bindScrapRepository 라는 네이밍 대신 scrapRepository로 쓰신 이유가 있나욤?

override suspend fun getScrapMonth(request: ScrapRequestDto): BaseResponse<List<ScrapResponseDto>> =
BaseResponse(
status = 200,
message = "(월간) 스크랩된 공고 정보가 성공적으로 로드되었습니다.",
Copy link
Contributor

Choose a reason for hiding this comment

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

여기 하드코딩은 임의인가욥?

Comment on lines 176 to 177
onDateSelected = {
viewModel.updateSelectedDate(it)
Copy link
Contributor

Choose a reason for hiding this comment

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

newDate -> 로 직관적인 코드라고 생각했는데 삭제하신 이유가 있나용?!

Copy link
Member Author

Choose a reason for hiding this comment

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

다시 붙여야겠네요!

isToday = day.date.isToday(),
onDateSelected = onDateSelected
)
if(!day.isOutDate) {
val index = day.date.dayOfMonth - 1
val index = day.date.format(java.time.format.DateTimeFormatter.ofPattern("yyyy-MM-dd"))
Copy link
Contributor

Choose a reason for hiding this comment

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

자바 코드까지..

Copy link
Member

Choose a reason for hiding this comment

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

정말 멋있어...

Copy link
Contributor

Choose a reason for hiding this comment

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

안쓰는 import 삭제해주세요!

Copy link
Member

@leeeyubin leeeyubin left a comment

Choose a reason for hiding this comment

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

굿굿~!! 넘 잘해서 코리 달 게 없어지고 있어요... 최고!!
수정하구 나면 한 번 더 노티 부탁드려용!

Comment on lines 92 to 94
)
}
_calendarSideEffect.emit(CalendarSideEffect.ShowToast(R.string.server_success))
Copy link
Member

Choose a reason for hiding this comment

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

성공했을 때는 따로 토스트 안 띄워줘도 될 것 같아요!!

Comment on lines 60 to 65
}
}


@Composable
fun HorizontalCalendar(
Copy link
Member

Choose a reason for hiding this comment

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

줄바꿈 조금만 신경 써주세요!

Comment on lines 32 to 36
viewModel: CalendarViewModel = hiltViewModel()
) {
val scrapState by viewModel.scrapCalendarState.collectAsState()

LaunchedEffect(key1 = listState) {
Copy link
Member

Choose a reason for hiding this comment

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

collectAsState() 바꿔주세용!

Copy link
Member

@Hyobeen-Park Hyobeen-Park left a comment

Choose a reason for hiding this comment

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

캘린더,,, 이걸 해낸다구?!?!?!?!?!??!!?? 이게 이석준이지~~ 진짜 수고하셨습니당❤️❤️❤️

@@ -12,6 +16,10 @@ import javax.inject.Singleton
@InstallIn(SingletonComponent::class)
abstract class DataSourceModule {

@Binds
@Singleton
abstract fun bindScrapRepository(scrapDataSourceImpl: ScrapDataSourceImpl): ScrapDataSource
Copy link
Member

Choose a reason for hiding this comment

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

여기 위치가 DataSourceModule이라서 bindScrapDataSource로 네이밍 수정하는건 어떨까요??

Comment on lines 35 to 48
fun getMockScrapList(year: Int, month: Int): List<ScrapResponseDto> {
val deadline = month.toString().padStart(2, '0')

return when (month % 4) {
0 -> {
listOf(
ScrapResponseDto(
deadline = "${year}-${deadline}-13",
scraps = listOf(
ScrapResponseDto.Scrap(
scrapId = 1,
title = "제목1",
color = "#FFED4E54"
),
Copy link
Member

Choose a reason for hiding this comment

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

머지하기 전에 꼭 확인해주세요!!

viewModel.calendarSideEffect.flowWithLifecycle(lifecycle = lifecycleOwner.lifecycle)
.collect { sideEffect ->
when (sideEffect) {
is CalendarSideEffect.ShowToast -> context.toast(sideEffect.message)
Copy link
Member

Choose a reason for hiding this comment

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

sideEffect 최고에요~!~!

isToday = day.date.isToday(),
onDateSelected = onDateSelected
)
if(!day.isOutDate) {
val index = day.date.dayOfMonth - 1
val index = day.date.format(java.time.format.DateTimeFormatter.ofPattern("yyyy-MM-dd"))
Copy link
Member

Choose a reason for hiding this comment

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

정말 멋있어...

boiledEgg-s and others added 23 commits July 17, 2024 01:23
…month

# Conflicts:
#	app/src/main/java/com/terning/point/di/DataSourceModule.kt
#	app/src/main/java/com/terning/point/di/RepositoryModule.kt
#	app/src/main/java/com/terning/point/di/ServiceModule.kt
[FEAT/#91] 캘린더뷰 / 스크랩 목록 서버통신
…month

# Conflicts:
#	app/src/main/java/com/terning/point/di/DataSourceModule.kt
#	app/src/main/java/com/terning/point/di/ServiceModule.kt
Copy link
Member

@leeeyubin leeeyubin left a comment

Choose a reason for hiding this comment

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

LGTM~

Copy link
Contributor

@arinming arinming left a comment

Choose a reason for hiding this comment

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

LGTM~

@boiledEgg-s boiledEgg-s merged commit 923dc21 into develop Jul 17, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FEAT ✨ 새로운 기능 구현 석준💜 석준
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEAT] 캘린더뷰 / 기본 월간캘린더 서버통신 로직
4 participants