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

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

Merged
merged 16 commits into from
Jul 10, 2024

Conversation

boiledEgg-s
Copy link
Member

⛳️ Work Description

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

📸 Screenshot

default.mp4

📢 To Reviewers

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

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

@boiledEgg-s boiledEgg-s self-assigned this Jul 9, 2024
@boiledEgg-s boiledEgg-s added FEAT ✨ 새로운 기능 구현 UI 💐 UI 작업 석준💜 석준 labels Jul 9, 2024
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.

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

val swipeDirection = (listState.firstVisibleItemIndex - currentPage).coerceIn(-1, 1).toLong()
.collect {
val swipeDirection =
(listState.firstVisibleItemIndex - currentPage).coerceIn(-1, 1).toLong()
Copy link
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
Member

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.

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

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

Choose a reason for hiding this comment

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

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

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.

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

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

Choose a reason for hiding this comment

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

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

@@ -35,5 +35,6 @@
<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
Contributor

Choose a reason for hiding this comment

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

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

boiledEgg-s and others added 2 commits July 10, 2024 18:35
@boiledEgg-s boiledEgg-s merged commit 78b74fb into develop Jul 10, 2024
1 check passed
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