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/#73] 여행 대시 보드 뷰 / 서버 통신 구현 #83

Merged
merged 16 commits into from
Jan 12, 2024

Conversation

leeeyubin
Copy link
Member

⛳️ Work Description

  • 진행 중인 여행 서버 통신
  • 지나간 여행 서버 통신
  • 여행자 이름 서버 통신
  • DTO 설정
  • 힐트 적용
  • State가 Empty일 때 뷰 구현

📸 Screenshot

default.mp4

📢 To Reviewers

  • 첫 서버 통신 성공했습니다 ㅎㅎ

Copy link
Member

@Marchbreeze Marchbreeze 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 11 to 12
) : DashBoardDataSource {
override suspend fun getTripList(progress: String): BaseResponse<DashBoardResponseDto> =
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 35
fun toDashBoardEntity() =
DashBoardModel(name, trips.map {
it.toTripsModel()
})
Copy link
Member

Choose a reason for hiding this comment

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

함수명도 model로 수정해주세요~

Comment on lines +9 to +10
private val dashBoardSource: DashBoardDataSource
) : DashBoardRepository {
Copy link
Member

Choose a reason for hiding this comment

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

여기도...ㅎㅎ

TabLayoutMediator(binding.tabDashboard, binding.vpDashboard) { tab, pos ->
tab.text = tabTextList[pos]
}.attach()
}

private fun setTravelerName() {
val progress = "incomplete"
Copy link
Member

Choose a reason for hiding this comment

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

이렇 중요한 텍스트는 const val로 관리해주시면 좋을 것 같아요 ~

Copy link
Member

Choose a reason for hiding this comment

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

아래 뷰모델에서 지정을 해줬으니, 그거 가져와서 임포트 하시는게 더 좋을 듯

BaseActivity<ActivityTripDashBoardBinding>(R.layout.activity_trip_dash_board) {

private val tabTextList = listOf(TAB_ONGOING, TAB_COMPLETED)

private val viewModel by viewModels<DashBoardViewModel>()

var name: String? = null
Copy link
Member

Choose a reason for hiding this comment

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

..? ㅋㅋ

import com.going.presentation.databinding.ItemDashBoardCompletedBinding
import com.going.ui.extension.ItemDiffCallback

class CompletedAdapter(
private val listener: OnDashBoardSelectedListener
) : ListAdapter<CompletedListModel, CompletedViewHolder>(diffUtil) {
) : ListAdapter<DashBoardModel.DashBoardTripModel, CompletedViewHolder>(diffUtil) {
Copy link
Member

Choose a reason for hiding this comment

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

임포트 확인해주세요 ~


}

private fun setRecyclerView() {
Copy link
Member

Choose a reason for hiding this comment

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

initAdapter가 더 어울릴듯 ~

}

private fun setTripList() {
val progress = "complete"
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 52 to 53
android:layout_width="210dp"
android:layout_height="324dp"
Copy link
Member

Choose a reason for hiding this comment

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

?? 비율로 확인해주세요 ~

android:id="@+id/iv_dashboard_empty"
android:layout_width="210dp"
android:layout_height="324dp"
android:layout_marginBottom="100dp"
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

@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.

유비니 첫 api 통신 축하축하!!!
근데 empty일때도 뷰 보고시퍼용... 담엔 같이 올려주기~

android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginBottom="28dp"
android:gravity="center"
Copy link
Member

Choose a reason for hiding this comment

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

width를 wrapcontent로 하고 start와 end를 parent로 맞춰준다면 gravity center 안써도 될 것 같아용~

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 32 to 34
fun toDashBoardEntity() =
DashBoardModel(name, trips.map {
it.toTripsModel()
Copy link
Contributor

Choose a reason for hiding this comment

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

.map 이용 조아욥

interface DashBoardService {
@GET("api/trips")
suspend fun getTripList(
@Query("progress") progress: String
Copy link
Contributor

Choose a reason for hiding this comment

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

조아요 쿼리

android:id="@+id/iv_dashboard_empty"
android:layout_width="210dp"
android:layout_height="324dp"
android:layout_marginBottom="100dp"
Copy link
Contributor

Choose a reason for hiding this comment

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

??.... ㅎㅎ

@@ -95,7 +95,7 @@

<!--trip_dash_board-->
<string name="dashboard_tv_title">%s님의 여행</string>
<string name="dashboard_tv_empty">생성된 여행이 없어요.</string>
<string name="dashboard_tv_empty">새로운 여행을 시작해 보세요</string>
Copy link
Contributor

Choose a reason for hiding this comment

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

넹!

@leeeyubin leeeyubin merged commit 912cae5 into develop Jan 12, 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