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

[FE] refactor: Chatting Section 리팩토링 #215

Merged
merged 4 commits into from
Dec 7, 2023

Conversation

d0422
Copy link
Collaborator

@d0422 d0422 commented Dec 7, 2023

PR 설명

Chatting Section의 코드를 읽기 좋게 개선

✅ 완료한 기능 명세

  • useInput으로 input 리팩터링
  • scroll관련 훅과 messing관련 훅 분리

고민과 해결과정

  1. useInput을 더 범용성 있게 사용할 수 있도록 reset함수를 추가하여 값을 초기화시킬 수 있도록 변경했고, 해당 부분에 대한 테스트함수를 추가했다.

  2. 기존에 ChattingSection에 있던 로직부분을 hook으로 분리하고, 각 훅을 재사용할 수 있도록 작성했다.

@d0422 d0422 added enhancement 개선 또는 피드백 반영 FrontEnd 프론트엔드 관련 labels Dec 7, 2023
@d0422 d0422 requested a review from HBSPS December 7, 2023 05:41
@d0422 d0422 self-assigned this Dec 7, 2023
@d0422 d0422 changed the title [FE] Chatting Section 리팩토링 [FE] refactor: Chatting Section 리팩토링 Dec 7, 2023
@d0422 d0422 linked an issue Dec 7, 2023 that may be closed by this pull request
2 tasks
d0422 added 4 commits December 7, 2023 15:03
…로직 분리

 useLastMessageViewingState와 useScroll 두개로 분리하여 병합되어있던 로직 분리
(#213)
useInput resetInput함수 추가
(#213)
useInput적용, useScroll적용
모호하던 ai사용 여부를 remoteUsingAI로 할당하여 명확하게 변경
(#213)
useInput resetInput 함수 테스트 추가
(#213)
@d0422 d0422 force-pushed the FE094/refactor/chat branch from 94a6361 to 7d2c42c Compare December 7, 2023 06:03
Copy link
Collaborator

@HBSPS HBSPS left a comment

Choose a reason for hiding this comment

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

훅으로 분리하니 깔끔하네요~ 수고하셨습니다!

@d0422 d0422 merged commit 0f1d862 into boostcampwm2023:dev Dec 7, 2023
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement 개선 또는 피드백 반영 FrontEnd 프론트엔드 관련
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FE] Chatting Section 리팩터링
2 participants