Skip to content

에디터 버그 수정 #101

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

Merged
merged 7 commits into from
Oct 18, 2024
Merged

에디터 버그 수정 #101

merged 7 commits into from
Oct 18, 2024

Conversation

yeojini
Copy link
Contributor

@yeojini yeojini commented Oct 16, 2024

포스트 내용 유효성 검사 추가 Fixes #42

  • react-hook-form의 Controller 컴포넌트로 content 필드를 제어하도록 수정
  • title, content 유효성 검사 시 toast 메시지와 focus 설정 추가
  • content의 길이를 실시간으로 감시하여 표시되도록 watch 사용
  • 에디터 내용 변경 시 textLength 업데이트 반영

포스트 제목이 반영되지 않는 이슈 수정 Fixes #100

  • 잘못된 필드명 'memo'를 'title'로 수정

메모 등록 시 바로 수정 완료로 바뀌는 버그 수정

  • Button type 을 submit 에서 button 으로 변경
  • click event handler 에서 handleSubmit 호출
  • 2000자 넘는 순간 에러가 발생해야하기 때문에 mode 를 onChange 로 변경

태그 등록 되지 않는 이슈 수정

  • 게시물 수정 영역을 form 으로 변경하여 발생한 side effect
  • keydown 이벤트에서 e.preventDefault 호출하여 폼 제출 막음

툴바 Heading 토글 그룹에서 블록 타입 selected 표시

  • useCellValues로 currentBlockType 값 구독
  • ToolbarToggleGroup 에 value 전달

- react-hook-form의 Controller 컴포넌트로 content 필드를 제어하도록 수정
- title, content 유효성 검사 시 toast 메시지와 focus 설정 추가
- content의 길이를 실시간으로 감시하여 표시되도록 watch 사용
- 에디터 내용 변경 시 textLength 업데이트 반영
- 잘못된 필드명 'memo'를 'title'로 수정
@yeojini yeojini requested a review from qaws7791 October 16, 2024 12:52
- postSchema에서 memo필드를 제거하여 역할을 분리
- 독립적인 memoSchema 객체를 생성하고 memo 필드의 유효성 검증을 별도로 정의
@qaws7791
Copy link
Contributor

updatePost에 memo를 null로 넘겨서 글 수정하면 메모가 사라져요

기존 memo 유지될수 있도록 updatePost 시 memo 전달
@yeojini
Copy link
Contributor Author

yeojini commented Oct 18, 2024

@qaws7791 가져왔던 memo 를 updatePost 로 넘기도록 수정하였습니다!

@qaws7791
Copy link
Contributor

메모 수정이 이상한 것 같아요... 수정 누르면 바로 완료되어 버리네요
녹화_2024_10_18_19_58_44_426

- Button type 을 submit 에서 button 으로 변경
- click event handler 에서 handleSubmit 호출
- 2000자 넘는 순간 에러가 발생해야하기 때문에 mode 를 onChange 로 변경
- keydown 이벤트에서 e.preventDefault 호출하여 폼 제출 막음
- useCellValues로 currentBlockType 값 구독
- ToolbarToggleGroup 에 value 전달
@yeojini
Copy link
Contributor Author

yeojini commented Oct 18, 2024

@qaws7791 이거저거 시도하다가 왜 됐는지 모르겠는데 갑자기 로그인이 돼서 테스트해보다가 이슈 발생한 부분 추가적으로 수정하였습니다!

@qaws7791
Copy link
Contributor

확인했습니다. 고생하셨어요 👍

@yeojini yeojini merged commit 06b0d81 into main Oct 18, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants