[2팀] 관리자 도구의 개선 및 데이터 유실 불량 수정#79
Open
fruitman200912 wants to merge 5 commits into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
[PR] 관리자 도구 안정성 개선 및 데이터 유실 결함 수정
1. 개요
2.주요 수정 내용
SiteEditor: 저장 전 이탈 시 변경사항 유실 수정
useUnsavedGuard커스텀 훅을 구현하여 브라우저 종료/새로고침/뒤로가기 시 이탈 방지 가드 적용.localStorage를 활용해 30초 주기로 편집본을 자동 임시저장.OrgChartEditor: 노드 삭제 시 확인 절차 및 복구 기능 도입
Ctrl+Z/Cmd+Z핸들러를 추가하여 편집 편의성 개선.폼 제출 유효성 검사 누락 및 중복 생성 결함 수정
src/lib/validation.ts에 게시글 규격(trim 처리, 최소 길이 등) 강제.isSubmitting(RHF)과isPending(명시적 상태)을 조합해 네트워크 지연 중 중복 클릭 방지.3. 변경 파일 요약
src/hooks/useUnsavedGuard.tssrc/lib/validation.tssrc/containers/admin/SiteEditor.tsxsrc/containers/admin/OrgChartEditor.tsxsrc/containers/write/WriteFooter.tsxpackage.jsonzod,react-hook-form,sonner패키지 추가4. 테스트 결과