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(time): TimeTable Modal 추가기능 #215

Merged
merged 11 commits into from
Aug 20, 2024
Merged

feat(time): TimeTable Modal 추가기능 #215

merged 11 commits into from
Aug 20, 2024

Conversation

SWARVY
Copy link
Contributor

@SWARVY SWARVY commented Aug 19, 2024

Summary

#213

TimeTableModal에 미구현되었던 기능들을 구현했습니다.

Tasks

  • useInfiniteQuery를 사용하여 useLectureList 훅 재설계
  • useInfiniteScroll 공용 훅 생성
  • Pretendard 폰트 적용
  • 강의 목록에서 강의 클릭 시 파라미터에 강의 id가 추가되도록 구현
  • 전공 검색 후 선택 시 inputValue가 초기화되도록 변경
  • getAPIURL 유틸 함수가 정상적으로 URL을 반환하지 못하는 문제 수정

ETC

  • TimeTableLectureTablethead 부분에 sticky를 적용했는데, 이거 적용하니까 border-y 속성이 날아가서 뷰가 조금 부자연스러워 보이는 문제가 있습니다. 해당 문제 해결법 찾아서 수정하도록 하겠습니다.
  • 또, table-auto 속성이 적용되어있어서 특정 데이터의 길이에 따라서 특정 카테고리의 영역이 점점 늘어나는 경우가 있는데, 해당 부분에 대해서 고정 사이즈를 적용하기에는 조금 문제가 있어보여서 해당 부분들은 조금 더 좋은 방법을 찾아보도록 하겠습니다.

Screenshot

image

@SWARVY SWARVY added ✨ Feature 새로운 기능 명세 및 개발 ⏰ Time time 프로젝트 관련 labels Aug 19, 2024
@SWARVY SWARVY requested a review from gwansikk August 19, 2024 14:54
@SWARVY SWARVY self-assigned this Aug 19, 2024
@SWARVY SWARVY requested a review from Jeong-Ag as a code owner August 19, 2024 14:54
Copy link

changeset-bot bot commented Aug 19, 2024

⚠️ No Changeset found

Latest commit: 17421c2

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@gwansikk gwansikk changed the title TimeTable Modal 추가기능 구현 완료 feat(time): TimeTable Modal 추가기능 Aug 19, 2024
Copy link
Member

@gwansikk gwansikk left a comment

Choose a reason for hiding this comment

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

개선사항 제안으로 걸어놨어요, 해당 개선은 @SWARVY님 선택이므로 필요시 수정하면 돼요, PR은 승인합니다

});
const lectureList = data.data.values;

return (
<>
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
<>

)}
</tr>
)}
</tbody>
</>
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
</>

@@ -229,7 +229,7 @@ const TimeTableModalMajorInput = memo(function TimeTableModalMajorInput({
selectedMajor,
handleMajorInputChange,
}: TimeTableModalMajorInputProps) {
const [inputValue, setInputValue] = useState('');
const [inputValue, setInputValue] = useState<string>('');
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
const [inputValue, setInputValue] = useState<string>('');
const [inputValue, setInputValue] = useState('');

@@ -229,7 +229,7 @@ const TimeTableModalMajorInput = memo(function TimeTableModalMajorInput({
selectedMajor,
handleMajorInputChange,
}: TimeTableModalMajorInputProps) {
const [inputValue, setInputValue] = useState('');
const [inputValue, setInputValue] = useState<string>('');
const [open, setOpen] = useState<boolean>(false);
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
const [open, setOpen] = useState<boolean>(false);
const [open, setOpen] = useState(false);

queryFn: ({ pageParam }) =>
getLectureList({ ...params, cursor: pageParam }),
initialPageParam: 0,
select: (data) => (data.pages ?? []).flatMap((page) => page.data.values),
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
select: (data) => (data.pages ?? []).flatMap((page) => page.data.values),
select: ({ pages = [] }) => pages.flatMap((page) => page.data.values),

Copy link
Contributor

@Jeong-Ag Jeong-Ag left a comment

Choose a reason for hiding this comment

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

무한 스크롤 적용으로 사용자 경험이 개선되었네요 🙌

@SWARVY SWARVY merged commit 54bf12d into main Aug 20, 2024
4 checks passed
@gwansikk gwansikk deleted the feature/#213 branch August 20, 2024 05:50
@SWARVY SWARVY added this to the Time milestone Aug 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ Feature 새로운 기능 명세 및 개발 ⏰ Time time 프로젝트 관련
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants