Conversation
추후에 supabase로 전환 예정
처음에 핸들러 바인딩으로 구현하려 했으나 노드가 증가할수록 많은 이벤트 핸들러가 증식해 호버헤드 위험성을 발견함. 그래서 최상위 노드(에디터 컨테이너)에만 이벤트 위임을 적용함. 사용자의 클릭 이벤트를 버블링을 통해 어떤 노드에서 클릭이 발생했는지 알도록 구현.
기존에 카테고리 별로 중첩된 스타일 데이터를 리액트에서 사용하기 위해 평탄화 해주는 함수 구현 완료
WcxNode타입을 통해 Wcx에서 제공하는 노드의 타입들을 추론할 수 있다.
'배포'모드와 '에디터'모드에 따라 유저의 노드를 렌더링 하는 컴포넌트는 다르게 동작해야한다. '배포'모드에는 유저의 버튼이 동작해야하지만 '에디터'모드에서는 버튼같은 액션 로직들이 동작해서는 안된다. 이를 구분하기 위해 렌더링 하는 컴포넌트를 다르게 만드는게 아니라 에디터 캔버스 컴포넌트의 최상위에서 현재 빌더 모드를 주입해주는 Context 프로바이더를 이용해 노드 컴포넌트들이 참조할 수 있도록 한다.
에디터 로직과 유저의 사이트를 배포해주는 use-template로직을 분리된 프로젝트로 구성하기 위한 작업임. 현재는 단일 프로젝트 구조지만 모노레포로 변경할 예정
기존에 단일 프로젝트였던 구조를 apps,packaged로 분리해 모노레포로 수정했습니다. 유저의 웹사이트 배포시 apps/user-template관련 코드만 배포하고, 실제 wcx의 서비스 수정,배포시 apps/editor 코드만 배포함으로써 상황에 맞게 분리하기 위해 모노레포로 구조를 변경했습니다. 추가로 packages는 apps와 같이 프로젝트 개념이 아니라 apps에서 필요한 함수를 가져다 쓸 수 있는 라이브러리입니다.
필요없는 파일 삭제. react와 next를 peerDependencies로 이동하여 중복 설치 문제를 방지. 루트 tsconfig.json을 생성하여 공통 설정.
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.
기존의 단일 프로젝트 구조에서 모노레포로 프로젝트 구조가 변경됨으로써 전체적인 프로젝트 구조와 CI/CD 파일이 변경되었습니다.