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] 랭킹 뷰 구현 #190

Merged
merged 19 commits into from
Feb 21, 2024
Merged

[feat] 랭킹 뷰 구현 #190

merged 19 commits into from
Feb 21, 2024

Conversation

jihyunniiii
Copy link
Collaborator

@jihyunniiii jihyunniiii commented Feb 17, 2024

Related issue 🛠

Work Description ✏️

  • 랭킹 뷰를 구현하였습니다.

Screenshot 📸

  • 랭킹 뷰
Screen_recording_20240217_205919.mp4
  • EmptyView
스크린샷 2024-02-17 오후 8 59 43

Uncompleted Tasks 😅

  • N/A

To Reviewers 📢

  • 더미 넣어서 값 확인했습니다 ~
  • MyPingleAdapter 에서도 context 안 넘기도록 수정했습니다.

Copy link
Collaborator

@HAJIEUN02 HAJIEUN02 left a comment

Choose a reason for hiding this comment

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

너무 깔끔하게 잘 짜셨다고 생각합니다.

}

private fun initLayout() {
rankingAdapter = RankingAdapter(context = requireContext())
Copy link
Collaborator

Choose a reason for hiding this comment

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

오 언니 약간 코드스타일 바뀜핑
원래 이렇게 매개변수 명시 안 해두지 않았남?
더 보기 조아요!

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

원래 매개변수 적을 땐 안 했는데 하는 게 더 깔끔한 것 같아서 바꿔봤숨다 ㅋ.ㅋ

RecyclerView.ViewHolder(binding.root) {
fun onBind(rankingLocationEntity: RankingLocationEntity, ranking: Int) {
with(binding) {
tvRankingRank.text = (ranking).toString()
Copy link
Collaborator

Choose a reason for hiding this comment

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

여기 ranking에 괄호 없애주는게 좋지 않을까염?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

아놔 ㅜ 당장 수정

locationCount = 17
),
RankingLocationEntity(
name = "동탄시범다은마을월드메르디앙반도유보라아파트경비실",
Copy link
Collaborator

Choose a reason for hiding this comment

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

이게 대체 뭔데
ㅋ ㅋ
ㅋㅋ
ㅋㅋㅋ ㅋ ㅋ ㅋ

Copy link
Collaborator

Choose a reason for hiding this comment

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

ㄷㄷ 진짜 있네

image

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

ㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋ 두 줄 확인 해보려고 네이버에 이름 긴 아파트 검색했숨요 ㅋ.ㅋ

@@ -12,41 +12,57 @@
android:layout_height="match_parent"
tools:context=".presentation.ui.main.ranking.RankingFragment">

<TextView
Copy link
Collaborator

Choose a reason for hiding this comment

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

언니 이거 비밀인데 나 이제 가이드라인 쓸 줄 안다 ㅋ
혼자 해봤음ㅋ
칭찬해쥬삼

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

다 컸다 ㅋ.ㅋ 이제 내가 알려줄 게 없구만 ㅋㅋ UMC 레포 좀 알려줘봐요 ㅋㅋ 구경 좀 하게

app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tv_ranking_construction_title" />
app:layout_constraintStart_toStartOf="@+id/gl_start"
Copy link
Collaborator

Choose a reason for hiding this comment

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

@+id

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

정말 예리핑이시네요

Copy link
Member

@DoReMinWoo DoReMinWoo 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 +29 to +36
// TODO 서버통신 구현 후 collectData 함수로 해당 로직 이동
with(viewModel.dummyRanking) {
(meetingCount >= RANKING_VISIBLE_THRESHOLD).let { isRankingVisible ->
if (isRankingVisible) rankingAdapter.submitList(locations)
binding.tvRankingEmpty.visibility =
if (isRankingVisible) View.INVISIBLE else View.VISIBLE
}
}
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 13 to 14
android:layout_marginTop="4dp"
android:layout_marginBottom="7dp">
Copy link
Member

Choose a reason for hiding this comment

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

피그마에서 리사이클러뷰 맨 밑 간격이 16dp인데 이렇게 margin 주게 되면 16dp안되지않나요!?!
조금있다가 자세히 설명할게여...

Comment on lines +17 to +23
tvRankingLocationDate.text = context.getString(
R.string.ranking_date,
latestVisitedDate[YEAR_INDEX],
latestVisitedDate[MONTH_INDEX],
latestVisitedDate[DAY_INDEX]
)
}
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

이거 스트링으로 변경하는 과정 UI에서 하지 말기

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

-> 서버통신 구현하면서 수정 예정

import org.sopt.pingle.domain.model.RankingLocationEntity
import org.sopt.pingle.util.view.ItemDiffCallback

class RankingAdapter(private val context: Context) :
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

여기서 context 안 넘기는 방안에 대해서 고민해보기 (parent.context)

@jihyunniiii jihyunniiii merged commit db866ae into develop Feb 21, 2024
1 check passed
@jihyunniiii jihyunniiii deleted the feat-ranking-view branch February 21, 2024 15:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

[feat] 랭킹 뷰 구현
3 participants