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/#166 메인페이지에서 킬링파트 등록 인기순 음악을 보여준다 #175

Merged
merged 20 commits into from
Aug 3, 2023

Conversation

cruelladevil
Copy link
Collaborator

📝작업 내용

이번 PR에서 작업한 내용을 간략히 설명(이미지 첨부 가능)

  • 메인페이지에서 킬링파트 등록 인기순 노래를 보여줍니다.
    • SongPopularPage
    • SongRankCard - 등록 인기순 목록에서 하나의 음악 컴포넌트입니다.
    • Thumbnail - 이미지를 불러오기 전, 크기를 강제하기 위해 div로 한 번 감쌌습니다.

💬리뷰 참고사항

원활한 리뷰를 위해 전달하고 싶은 맥락(특정 파일, 디렉터리 등등)
리뷰어가 특별히 봐주었으면 하는 부분

  • [웹 접근성] : SongRankCard 탭하면 -> 방문함, 링크, 킬링파트 인기순 {n}등 {가수} {제목}
  • [백엔드 미구현] - figma 시안상으로 votes 정보가 있어 컴포넌트를 구현해놓았지만 API 명세에 없기 때문에 현재 주석처리
  1. 웹 접근성이 충분한지 검토해주세요.
  2. SongRankCard를 일단 이름을 깊이 고민하지 않고 지었기 때문에 이 부분을 한 번 검토해주세요.

#️⃣연관된 이슈

연관된 이슈 번호를 모두 작성

close #166

@cruelladevil cruelladevil added [ 🌞 FE ] 프론트엔드 크루들의 빛나는 개발 이야기 하나둘셋 호! ✨ Feat 꼼꼼한 기능 구현 중요하죠 labels Aug 1, 2023
@cruelladevil cruelladevil self-assigned this Aug 1, 2023
@github-actions
Copy link

github-actions bot commented Aug 1, 2023

Unit Test Results

114 tests   114 ✔️  3s ⏱️
  34 suites      0 💤
  34 files        0

Results for commit 34a9f69.

♻️ This comment has been updated with latest results.

Copy link
Collaborator

@Creative-Lee Creative-Lee left a comment

Choose a reason for hiding this comment

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

고생 많으셨습니다!
코멘트 확인하고 답변 부탁드릴게요~
내용이 얼마 없어서 대면으로 바로 하셔도 좋습니다!


const SongPopularPage = () => {
const { data: popularSongs } = useFetch<PopularSong[]>(() =>
fetcher('/songs/recommended', 'GET')
Copy link
Collaborator

Choose a reason for hiding this comment

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

요 통신 로직은 도메인별로 분리되어 관리되면 좋을 것 같아요.
컴포넌트에서 바로 url을 적어 바로 통신하니, 다소 명령형으로 느껴지는 것 같네요
apis/ 하위에 분리하면 어떨까요?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

관리 측면에서 추상화 레이어를 하나 추가하여 api 폴더에 쿼리 함수가 있어야 된다는 의미인건가요?
우리 팀의 query 로직이 부족한 부분이 많아서 이에 대해 정리하는 시간을 한 번 가지면 좋을 것 같아요.

관리 측면에서 추상화 레이어를 하나 추가하여 api 폴더에 쿼리 함수가 있어야 된다는 의미인건가요?

이 의도라면 이번 PR에서는 이대로 통과시켜도 될까요?

Copy link
Collaborator

Choose a reason for hiding this comment

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

넵 맞습니다~
도메인이 들어간 실제 통신 로직은 함수로 한번 감싸지고,
그것을 hook에 넣어서 사용하는게 좋겠다고 생각했어요!

코난 말대로 당장 api 로직이 먼저 수정되어야 할 것 같네요 ㅋㅋ 넘어가시죠!

frontend/src/router.tsx Show resolved Hide resolved
color: white;

font-size: 20px;
font-weight: 800;
Copy link
Collaborator

Choose a reason for hiding this comment

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

💬 bold를 의도하신거라면 700이 어떨까요?

이 부분도 따로 이야기 해보시죵

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

https://developer.mozilla.org/ko/docs/Web/CSS/font-weight

bold의 기본이 700이군요!
폰트와 관련해서 이야기 나눠보면 좋을 것 같습니다.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

일단 700으로 수정해놓겠습니다

✍️ 수정 커밋 - 1b5a397

frontend/src/components/SongRankCard/Thumbnail.tsx Outdated Show resolved Hide resolved
frontend/src/components/SongRankCard/Thumbnail.tsx Outdated Show resolved Hide resolved
frontend/src/components/SongRankCard/Thumbnail.tsx Outdated Show resolved Hide resolved
frontend/src/components/SongRankCard/Thumbnail.style.ts Outdated Show resolved Hide resolved
frontend/src/components/SongRankCard/SongRankCard.style.ts Outdated Show resolved Hide resolved
frontend/src/components/SongRankCard/SongRankCard.style.ts Outdated Show resolved Hide resolved
Copy link
Collaborator

@ukkodeveloper ukkodeveloper left a comment

Choose a reason for hiding this comment

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

고생하셨어요. 컴포넌트가 간단해서 별로 말씀드릴게 없네요. SongRankCard 누를 때 background 분홍생 뜨는 부분 외에는 사소한 커멘트라 바로 approve할게요.

font-weight: 800;
`;

export const PopularSongList = styled.section`
Copy link
Collaborator

Choose a reason for hiding this comment

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

section > ol > li . 이런 계층 구조였으면 좋겠어요. section이 없는 건 ok. 하지만, ol > li 가 더 시맨틱하다고 생각합니다.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

목록이라는 점을 고려하지 못하였네요 😨

✍️ 수정 커밋 - 2cc5ef8

Comment on lines 11 to 13
&:active {
background-color: ${({ theme }) => theme.color.primary};
}
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.

active pseudo class는 마우스 버튼을 누르는 순간부터 떼는 시점까지를 나타냅니다.
https://developer.mozilla.org/ko/docs/Web/CSS/:active

불필요하고 정신 없게 느껴집니다..

라고 느껴진다면 삭제하는 것이 좋을 것 같네요!

✍️ 수정 커밋 - cf679c2

{popularSongs.map(({ id, thumbnail, title, singer }, i) => (
<StyledLink
key={id}
to={`/song/${id}`}
Copy link
Collaborator

Choose a reason for hiding this comment

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

router.tsx 소스코드 정리하면서 도메인 path 상수화해도 좋을 것 같네요! 이 부분 이슈로 남겨놓겠습니다.

frontend/src/components/SongRankCard/SongRankCard.style.ts Outdated Show resolved Hide resolved

interface ThumbnailProps extends ImgHTMLAttributes<HTMLImageElement> {}

const Thumbnail = ({ ...props }: ThumbnailProps) => {
Copy link
Collaborator

Choose a reason for hiding this comment

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

(props: ThumbnailProps) => { 이렇게 작성해도 될 것 같네요.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

const Thumbnail = ({ newProp, anyOtherProp, ...props }: ThumbnailProps) => {
위처럼 prop이 추가될 상황을 고려하고 작성하였습니다.
props{ ...props}의 차이중 특별히 고려할 사항이 없으면 수정하지 않고 넘어가겠습니다 😊

frontend/src/components/SongRankCard/Thumbnail.tsx Outdated Show resolved Hide resolved
@Creative-Lee Creative-Lee self-requested a review August 2, 2023 11:55
Copy link
Collaborator

@Creative-Lee Creative-Lee left a comment

Choose a reason for hiding this comment

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

반영 사항 다 확인했습니다!
고생 많으셨습니다 ㅎ

@cruelladevil cruelladevil merged commit 116317f into main Aug 3, 2023
@cruelladevil cruelladevil deleted the feat/#166 branch August 3, 2023 03:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[ 🌞 FE ] 프론트엔드 크루들의 빛나는 개발 이야기 하나둘셋 호! ✨ Feat 꼼꼼한 기능 구현 중요하죠
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

[FEAT] 메인페이지에서 킬링파트 등록 인기순 음악을 보여준다
3 participants