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/#208] 투두 생성, 조회 뷰 / 메모 빈칸 대응 수정 #210

Merged
merged 5 commits into from
Mar 1, 2024

Conversation

Marchbreeze
Copy link
Member

@Marchbreeze Marchbreeze commented Feb 27, 2024

⛳️ Work Description

  • 메모 빈칸으로도 가능하도록 재설정
  • 날짜 선택 시 검정 테두리 설정
  • 빈 메모 투두 조회시 회색 테두리 설정

📸 Screenshot

📢 To Reviewers

  • 바닷가 코딩 좋네요 ~

@Marchbreeze Marchbreeze added 상호 🍀 FIX 🔨 버그 및 오류 해결 labels Feb 27, 2024
@Marchbreeze Marchbreeze self-assigned this Feb 27, 2024
Copy link
Member

@chattymin chattymin 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 +22 to +23
private val todo = MutableLiveData("")
private val memo = MutableLiveData("")
Copy link
Member

Choose a reason for hiding this comment

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

어떤경우에 LiveData를 사용하고, 어떤 경우에 StateFlow를 사용하는지 선택 기준이 궁금합니다!
저는 대부분 초기값이 있어야 하는 경우는 StateFlow를 사용하는 것 같습니다 :)

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
Member Author

Choose a reason for hiding this comment

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

StateFlow를 사용하는 것을 권장드리긴 합니다만,
LiveData를 사용해둔 부분들은 모두 xml과의 데이터바인딩이 연결된 변수들입니다!

StateFlow와 같은 경우는 계속해서 상태값을 지니고 있기에 백패킹(_달아주는거)으로 안정성을 보장해주는 것이 꼭 권장되는데,
백패킹으로 설정해두게 되면 데이터바인딩을 활용이 어려워졌었던 것 같아서 우선은 LiveData로 구현해뒀습니다.

LiveData가 이후에 deprecated된다면 데이터바인딩도 함께 사라질테니,
지금 상황처럼 데이터바인딩만을 위해서 변수 설정을 해두는 경우라면 LiveDat로 두어도 문제는 없을 것 같습니다 !

Copy link
Contributor

@crownjoe crownjoe 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 +170 to +175
viewModel.endDate.observe(this) {
if (!viewModel.endDate.value.isNullOrEmpty()) {
with(binding) {
etTodoCreateDate.background = drawableOf(R.drawable.shape_rect_4_gray700_line)
tvTodoCreateDateHint.setTextColor(colorOf(R.color.gray_700))
ivTodoCreateDate.setImageResource(R.drawable.ic_dropdown_gray700)
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 +22 to +23
private val todo = MutableLiveData("")
private val memo = MutableLiveData("")
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

@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 +22 to +23
private val todo = MutableLiveData("")
private val memo = MutableLiveData("")
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 +108 to +111
if (state.data.memo.isBlank()) {
with(binding) {
etTodoCreateMemo.background = drawableOf(R.drawable.shape_rect_4_gray200_line)
etTodoCreateMemo.text = stringOf(R.string.my_todo_create_tv_memo_hint)
Copy link
Member

Choose a reason for hiding this comment

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

with(binding) 습관화 하시는 것 같은데 좋네요!!

@Marchbreeze Marchbreeze merged commit 238cce8 into develop Mar 1, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FIX 🔨 버그 및 오류 해결 상호 🍀
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FIX] 투두 생성뷰 / 생성 조건 수정
4 participants