-
Notifications
You must be signed in to change notification settings - Fork 1
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: 면접기록/지원현황 페이지 검색 기능 #240
Conversation
- 기존 API에 검색기능 추가 - 따라서, 검색 전용 API가 쓸모 없어짐
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(리뷰가 늦어서 죄송합니다..)
정말 수고 많으셨습니다..!
전체적으로 코드가 훨씬 읽기 쉬워진 느낌을 많이 받은 것 같아요!
인터뷰 페이지와 지원 현황 페이지의 컴포넌트 레벨을 동일하게 가져가는 것도 너무나도 코드 이해하는데 도움이 됐던 것 같습니다..! 대박이네요
깊이있는 리뷰는 아니지만, 개인적인 생각을 남겨봤습니다..!
import SortList from "@/components/common/SortList"; | ||
import Search from "@/components/common/Search"; | ||
import { ORDER_MENU } from "@/src/constants"; | ||
import ApplicantList from "../../../../components/applicant/ApplicantList"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
괜찮다면..! 위의 import문과 같이 alias를 사용해도 괜찮을 것 같습니다!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
vsc 설정이 이상한가 보네요 ㅠㅠ 감사합니다 수정해볼께용
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
3e5c91e
return ( | ||
<div> | ||
<LoadingSpinner size={8} /> | ||
</div> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
추가적으로, div로 한번 더 감씬 이유가 있으신가요..?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
실수입니다! 제거 하도록하겠습니다 :) 고마워요 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/> | ||
<> | ||
<BoardTable boardRows={boardData} handleModalOpen={handleModalOpen} /> | ||
<BoardModal |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
네이밍 변경 좋네요!👍
const { data: applicants, status } = useQuery( | ||
["allApplicant", { generation, order, pageIndex, searchKeyword }], | ||
() => | ||
getApplicantByPageWithGeneration( | ||
+pageIndex, | ||
generation, | ||
order, | ||
searchKeyword | ||
), | ||
{ | ||
enabled: !!generation, | ||
} | ||
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit. 점진적으로 query 업그레이드 + suspense query, hook으로 바꾸는것도 좋을 수 있겠네요!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
너무 좋은 아이디어 입니다 채승님 !! 항상 감사드립니다 :)
interface LoadingSpinnerProps { | ||
size?: TailwindSize; | ||
} | ||
const LoadingSpinner = ({ size = 6 }: LoadingSpinnerProps) => { | ||
return ( | ||
<div className={`w-${size} h-${size}`}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
size를 type으로 두는 것을 한번 고민하면 좋을 것 같습니다.
- tailwind와 Template literals는 호환성이 좋지 않습니다.
- 저렇게 만들게 되면, postcss의 성능이 저하가 심합니다.
만약 w, h를 동시에 다루고 싶다면, wh-6
과 같은 plugin을 만드는 것을 추천합니다. 추가적으로 width가 24px이상은 svg의 크기가 24이기 때문에 더 커기지 않을 것 같습니다!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
오호 그렇군요~?! 또 하나 알아갑니다~!
wh-6 같은 플러그인이 무슨 말씀이실까요??
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
아 고정된 크기를 원한다면 tailwind플러그인을 만들어서 독자적인 방식으로 사용할 수 있다! 라는 말이었습니다
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
리뷰가 너무 늦었네요... 죄송합니다.
정말 수고 많으셨습니다 ~~
몇가지만 확인해주시면 좋을 것 같습니다.
const { data: applicants, status } = useQuery( | ||
["allApplicant", { generation, order, pageIndex, searchKeyword }], | ||
() => | ||
getApplicantByPageWithGeneration( | ||
+pageIndex, | ||
generation, | ||
order, | ||
searchKeyword | ||
), | ||
{ | ||
enabled: !!generation, | ||
} | ||
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tanstack query의 v3 문법을 사용하는 곳이 있고 v4 문법을 사용하는 곳이 있는데 통일성있게 가져가는 게 좋다고 생각해서 다 같이 이야기해보면 좋을 것 같네요 !
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
너무 좋습니다 :) 저는 무의식적으로 작성하느라 놓쳤는데 이야기가 나와 좋네요.
const pageIndex = searchParams.get("page") || "1"; | ||
const order = searchParams.get("order") || ORDER_MENU.APPLICANT[0].type; | ||
const searchKeyword = searchParams.get("search") || ""; | ||
const type = searchParams.get("type") ?? "list"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pageIndex, order, searchKeyword는 || 연산자를 사용하고 type은 ?? 연산자를 사용한 이유가 궁금합니다.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
저도 궁금하네용ㅋ_ㅋ
타입의 쓰임새가 뭘까요?? get()으로 가져오는 값이 어떤 타입인지 알 수 없으니 고치기에 신중했습니당
const pageIndex = searchParams.get("page") || "1"; | ||
const order = searchParams.get("order") || ORDER_MENU.APPLICANT[0].type; | ||
const searchKeyword = searchParams.get("search") || ""; | ||
const type = searchParams.get("type") ?? "list"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
type을 추가하신 이유가 궁금합니다.
제가 놓쳤을 수도 있지만 useApplicantPaginationParams를 불러와서 type을 사용하는 곳이 ApplicantPageNavbar 컴포넌트만 있는데 페이지 클릭 시 query param으로 type을 추가하기만 할 뿐 이 type를 이용해서 아무런 동작을 하지 않는 것으로 코드 이해를 했습니다.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
저도 그렇게 이해했는데 레거시라 일단은 건드리지 않았습니다!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PageNavbarComponent에서 a 태그를 사용하고 있는데 next에서 제공하는 Link 태그로 변경하면 CSR로 동작을 하여서 페이지 이동이 매끄러워 지는 장점이 있어서 변경하는 게 좋을 것 같습니다.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
고생하셨습니다! 😂 저도 민보님 말대로 tanstack Query 버전이 달라서 했갈렸었는데 통일관련 얘기해보면 좋겠네요👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
수고 많으셨습니다!
import Search from "@/components/common/Search"; | ||
import { ORDER_MENU } from "@/src/constants"; | ||
import InterviewerList from "../../../../components/interview/InterviewerList"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
이 부분도 alias 적용이 되지 않은 것 같습니다!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
3e5c91e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
상세한 제보 감사드립니다 ^.^
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
고생하셨습니다 !
넵 알겠습니다 ! 감사합니다 ! |
관련 이슈
작업 분류
PR을 통해 해결하려는 문제가 무엇인가요? 🚀
백엔드에서 새로 개발한 검색 API를 연동하였습니다.
PR에서 핵심적으로 변경된 부분이 어떤 부분인가요? 👀
검색 기능 개선으로 인해 변경된 API 스펙에 대응하고, 일부 구조를 변경하였습니다.
/api/v1/page/{page}/search/{search-keyword}/applicants
삭제/api/v1/page/{page}/records
searchKeyword 추가/api/v1/page/{page}/year/{year}/applicants
searchKeyword 추가변경된 API 스펙과 더불어, 불필요한 중복을 제거하고 잘못된 추상화를 바로 잡았습니다.
핵심 변경사항 이외 추가적으로 변경된 사항이 있나요? ➕
추가적으로, 리뷰어가 리뷰하며 알아야 할 정보가 있나요? 🙌
코드 변경이 많아 terminal에서 확인하시기 바랍니다!
이런 부분을 신경써서 봐주셨으면 좋겠어요. 🙋🏻♂️
체크리스트 ✅
reviewers
설정assignees
설정label
설정