Skip to content

feat:5주차 미션_묵은지#39

Open
mookeunji05 wants to merge 18 commits into
mainfrom
mookeunji-5
Open

feat:5주차 미션_묵은지#39
mookeunji05 wants to merge 18 commits into
mainfrom
mookeunji-5

Conversation

@mookeunji05
Copy link
Copy Markdown
Collaborator

@mookeunji05 mookeunji05 commented Apr 29, 2026

📌 PR 제목

🔗 관련 이슈

Closes #이슈번호

✨ 변경 사항

  • 기능1 추가
  • UI 수정
  • 버그 수정

🔍 테스트

  • 테스트 완료
  • 에러 없음

📸 스크린샷 (선택)

image

🚨 추가 이슈

@mookeunji05 mookeunji05 changed the title 5주차 미션 묵은지 5주차 미션_묵은지 Apr 29, 2026
@mookeunji05 mookeunji05 changed the title 5주차 미션_묵은지 feat:5주차 미션_묵은지 Apr 29, 2026
Comment on lines +50 to +68
<LinearLayout
android:id="@+id/layout_menu"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="30dp"
android:gravity="center"
android:orientation="horizontal"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/btn_edit_profile">

<TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="주문" android:textColor="#555555" />
<View android:layout_width="1dp" android:layout_height="12dp" android:layout_marginHorizontal="15dp" android:background="#DDDDDD" />
<TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="패스" android:textColor="#555555" />
<View android:layout_width="1dp" android:layout_height="12dp" android:layout_marginHorizontal="15dp" android:background="#DDDDDD" />
<TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="이벤트" android:textColor="#555555" />
<View android:layout_width="1dp" android:layout_height="12dp" android:layout_marginHorizontal="15dp" android:background="#DDDDDD" />
<TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="설정" android:textColor="#555555" />
</LinearLayout>
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

아이콘 이미지가 없고 하단바가 가려진 상태에요!

Copy link
Copy Markdown
Collaborator

@jeongkyueun jeongkyueun 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 +10 to +17
<ImageView
android:id="@+id/iv_profile_user"
android:layout_width="100dp"
android:layout_height="100dp"
android:layout_marginTop="40dp"
android:scaleType="centerCrop"
android:clipToOutline="true"
app:layout_constraintEnd_toEndOf="parent"
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

아이콘 피그마 보고 추가 해주시면 됩니다!

Copy link
Copy Markdown
Collaborator

@kimdoyeon1234 kimdoyeon1234 left a comment

Choose a reason for hiding this comment

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

수고하셨습니다! 기본 구조는 잘 잡혀있어요! 다만 수정해야 할 부분이 보여서 코멘트 몇개 남깁니다!

다음에 개선하면 좋을 점

  • 패키지명 week2final 잔재를 week3으로 통일해주세요
  • WishlistFragment 구현을 완성해주세요
  • PurchaseFragment의 하트 버튼을 RecyclerView + Adapter로 리팩토링하면 훨씬 유연해져요
  • API 키는 BuildConfig로, Interceptor로 자동 주입하도록 개선해주세요
  • 팔로잉 목록에서 본인(id=1)을 필터링해주세요

수고하셨습니다🙂

Comment on lines +1 to +2
package com.example.week2final

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

ProfileFragment가 week2final 패키지에 있고 나머지는 week3에 있어요. 이전 주차 파일을 복사해서 쓰신 것 같은데, 패키지명을 com.example.week3으로 통일해주세요!

Comment on lines +65 to +68
val list = response.body()?.data ?: listOf()

// 어댑터 연결
binding.rvFollowing.adapter = FollowerAdapter(list)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

팔로잉 목록에 프로필의 본인(id=1)이 그대로 포함되어 있어요! 아래처럼 필터링 해주세요!

val list = response.body()?.data?.filter { it.id != 1 } ?: listOf()

private val binding get() = _binding!!

private val MY_API_KEY = "reqres_3fd0bc2b94a34359a2e2b56a6f1f7d85"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

local.properties + BuildConfig로 분리해서 관리해주세요!

Comment on lines +8 to +15

val instance: UserService by lazy {
val retrofit = Retrofit.Builder()
.baseUrl(BASE_URL)
.addConverterFactory(GsonConverterFactory.create())
.build()
retrofit.create(UserService::class.java)
}
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

싱글톤으로 분리하신 건 좋아요! 다만 OkHttpClient가 없어서 API 키를 헤더로 넣는 Interceptor가 없어요. 그래서 UserService에서 매 요청마다 @Header로 직접 키를 넘기는 방식을 쓰고 계신데, 이렇게 하면 API 키가 호출부마다 노출돼요. Interceptor로 자동으로 붙여주는 방식이 더 안전합니다!

Comment on lines +27 to +33
val dummyData = listOf(
Product("AirJordan1", "$115", R.drawable.jordan1),
Product("AirJordan2", "$120", R.drawable.jordan2),
Product("Nike Everyday Plus", "$10", R.drawable.socks)
)
dataStoreManager.saveAllProducts(dummyData)
}
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

초기 데이터 저장 로직이 MainActivity에 있어요. 데이터 관련 로직은 DataStoreManager나 별도 Repository로 옮기는 게 좋습니다. MainActivity는 화면 전환만 담당하는 게 역할 분리 측면에서 더 깔끔해요!

Comment on lines +31 to +38

val heartButtons = listOf<ImageView>(
view.findViewById(R.id.btn_heart1),
view.findViewById(R.id.btn_heart2),
view.findViewById(R.id.btn_heart3),
view.findViewById(R.id.btn_heart4)
)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

하트 버튼을 ID로 하나하나 찾아서 리스트로 만들고 있어요. 상품이 늘어나면 버튼도 계속 추가해야 하는 구조예요. RecyclerView + Adapter 방식으로 만들면 상품 수에 관계없이 동작하고 코드도 훨씬 간결해집니다!

Comment on lines +7 to +11
class WishlistFragment : Fragment(R.layout.fragment_wishlist) {
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)

}
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

몇주차째 ...Fragment가 비어 있어요. DataStoreManager의 getWishlist()를 연결해서 위시리스트 목록을 보여주는 부분이 구현되면 완성입니다!

viewLifecycleOwner.lifecycleScope.launch {
    dataStoreManager.getWishlist().collect { wishlist ->
        // RecyclerView에 wishlist 연결
    }
}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

현재 최상위 레이아웃이 ConstraintLayout 하나로만 되어 있어서 스크롤이 지원되지 않아요. 콘텐츠가 화면보다 길어지면 하단 네비게이션 바를 덮어버리는 문제가 생깁니다.
NestedScrollView로 감싸주는 구조로 바꿔주세요!..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants