Skip to content

[UI/#20] 캘린더뷰 / 주간 캘린더 구현#33

Merged
boiledeggg merged 16 commits intodevelopfrom
ui/#20-calendar-view-ui
Jul 10, 2024
Merged

[UI/#20] 캘린더뷰 / 주간 캘린더 구현#33
boiledeggg merged 16 commits intodevelopfrom
ui/#20-calendar-view-ui

Conversation

@boiledeggg
Copy link
Copy Markdown
Member

⛳️ Work Description

  • 주간 캘린더 구현
  • 캘린더 간 전환 구현
  • SelectedDateState 생성 및 해당 클래스 기반 리팩토링

📸 Screenshot

default.mp4

📢 To Reviewers

경고: 일단 기능을 우선으로 구현을 했기 때문에 코드가 이쁘지 않을 수 있습니다.

  • 최종적으로 코드/로직 정리는 달력 관련 코드가 모두 구현되었을 때 일괄적으로 할게요,,

@boiledeggg boiledeggg self-assigned this Jul 9, 2024
@boiledeggg boiledeggg added FEAT ✨ 새로운 기능 구현 UI 💐 UI 작업 석준💜 석준 labels Jul 9, 2024
@boiledeggg boiledeggg added this to the 1차 스프린트 UI 작업 milestone Jul 9, 2024
Copy link
Copy Markdown
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.

와 진짜 퀄리티 미쳤네요!! 갓 석 준!!! 최고최고!! 수고하셨습니당~!!

val swipeDirection = (listState.firstVisibleItemIndex - currentPage).coerceIn(-1, 1).toLong()
.collect {
val swipeDirection =
(listState.firstVisibleItemIndex - currentPage).coerceIn(-1, 1).toLong()
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

오!! coerceIn() 처음 보는 것 같은데!! 새로운거 알아갑니당ㅎㅎ

) {
Card(
modifier = Modifier
.border(0.dp, Grey200, RoundedCornerShape(bottomStart = 20.dp, bottomEnd = 20.dp))
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

줄바꿈 해주는게 쪼끔 더 가독성이 좋을 것 같아요!!

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

border에도 named argument 달아주는 것도 좋을 것 같네용

Copy link
Copy Markdown
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 +58 to +59
var currentDate by remember { mutableStateOf(LocalDate.now()) }
var currentPage by remember { mutableIntStateOf(listState.firstVisibleItemIndex) }
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

요거 rememberSaveable로 해야 되나 했는데 저희 서비스는 가로모드 대응 안 하기 때문에 안 바꿔도 될 것 같네용

Comment on lines 50 to 51
) {
val selectedDate by viewModel.selectedDate.collectAsState()
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

collectAsStateWithLifecycle()로 바꿔주세요!!

) {
Card(
modifier = Modifier
.border(0.dp, Grey200, RoundedCornerShape(bottomStart = 20.dp, bottomEnd = 20.dp))
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

border에도 named argument 달아주는 것도 좋을 것 같네용

Comment on lines +35 to +40
_selectedDate.update { currentState ->
currentState.copy(
selectedDate = date,
isEnabled = true
)
}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

update라는 속성을 사용했을 때의 이점이 궁금해졌어요..!

Copy link
Copy Markdown
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.

이걸어케했어요...? ㅜㅜ 기립박수

) {
val date = selectedDate.selectedDate
val monthData = MonthData(YearMonth.of(date.year, date.monthValue))
val currentWeek = date.getWeekIndexContainingSelectedDate()
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

getWeekIndexContainingSelectedDate라는게 있군요,,,,,캘린더란,,,,,,,,

<string name="calendar_button_description_previous">previous</string>
<string name="calendar_button_description_next">next</string>
<string name="calendar_button_description_list">list</string>
<string name="calendar_animation_label">Calendar Transition</string>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

string에 Calendar 주석 추가해주시면 좋을 것 같습니답.!

boiledeggg and others added 2 commits July 10, 2024 18:35
@boiledeggg boiledeggg merged commit 78b74fb into develop Jul 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

FEAT ✨ 새로운 기능 구현 UI 💐 UI 작업 석준💜 석준

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[UI] 캘린더뷰 / 주간 캘린더 구현

4 participants