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(editor): 에디터 컴포넌트 구현 #17

Merged
merged 10 commits into from
Aug 3, 2024
Merged

Conversation

Collection50
Copy link
Member

@Collection50 Collection50 commented Aug 2, 2024

1. 무슨 이유로 코드를 변경했나요?

  • tiptap을 활용한 에디터 컴포넌트를 구현했습니다.

2. 어떤 위험이나 장애를 발견했나요?


3. 관련 스크린샷을 첨부해주세요.

2024-08-02.10.38.47.mov

4. 완료 사항

  • 위 영상에서 보여지는 모든 컴포넌트를 구현했습니다.

5. 추가 사항 / 코드 리뷰 받고 싶은 부분

  • EditorButton, DropdownButton과 같이 공통 컴포넌트와 유사하나, 에디터에만 종속되어있는 버튼이 존재합니다.
  • 이를 분리하는게 좋을지, 현재 상태를 유지하는게 좋을지 여쭙고 싶습니다.
  • 에디터의 모든 기능을 추가하고자 많은 파일과 기능들이 추가되었는데, 송구의 말씀 드립니다. 🙇🏻‍♂️🙇🏻‍♂️
  • 필요하다면 추후 리팩토링을 진행하겠습니다.
  • globals.css의 위치를 styles/globals.css 내부로 수정했습니다. 의견 부탁드립니다 !!
  • 제가 작성한 utils/cn.tsutils/tailwind-util.ts가 동일한 코드로 보여지는데 어떤 네이밍이 좋으신가요??

Copy link
Member Author

@Collection50 Collection50 left a comment

Choose a reason for hiding this comment

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

셀프 리뷰 남깁니다 !

Copy link
Member Author

Choose a reason for hiding this comment

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

이 파일이 최종적으로 노출되는 Editor 컴포넌트입니다.

src/app/editor/page.tsx에서 불러오는 것처럼 dynamic lazy loading을 사용하면 번들 사이즈를 줄일 수 있습니다.

Copy link
Member Author

Choose a reason for hiding this comment

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

/editor 페이지의 번들 크기를 첨부합니다.

image

Copy link
Member Author

Choose a reason for hiding this comment

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

figma에서 사용되는 아이콘과, lucide-react에서 다른 아이콘을 사용하고 있어서, 에디터 전용 Icon을 만들었는데 어떠신가요??

Copy link
Member Author

Choose a reason for hiding this comment

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

shadcn-ui에 기반한 에디터 툴바입니다.

Copy link
Member Author

Choose a reason for hiding this comment

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

shadcn-ui에서 설치한 dropdown입니다.

Copy link
Collaborator

Choose a reason for hiding this comment

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

제가 이전 PR에서 shadcn의 드랍다운메뉴 컴포넌트를 설치했었는데 한번 pull 받고 확인해주세요!

Copy link
Member Author

Choose a reason for hiding this comment

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

shadcn-ui에서 설치한 popover입니다.

Copy link
Member Author

Choose a reason for hiding this comment

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

에디터에서 사용되는 css입니다.

Copy link
Member

@qkrdmstlr3 qkrdmstlr3 left a comment

Choose a reason for hiding this comment

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

일단 러프하게만 남겨봅니다. extensions폴더 내부의 내용들은 tiptap의 예제를 따르지 않았을까 싶어서 따로 리뷰하지는 않았는데, 내부 컴포넌트들도 리뷰가 필요할까요??

@Collection50
Copy link
Member Author

일단 러프하게만 남겨봅니다. extensions폴더 내부의 내용들은 tiptap의 예제를 따르지 않았을까 싶어서 따로 리뷰하지는 않았는데, 내부 컴포넌트들도 리뷰가 필요할까요??

현재 리뷰로 충분하다고 생각합니다 👍

Copy link
Member

@qkrdmstlr3 qkrdmstlr3 left a comment

Choose a reason for hiding this comment

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

🚀

Copy link
Collaborator

@woo-jk woo-jk left a comment

Choose a reason for hiding this comment

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

와우 고생하셨습니다! 코멘트 확인 부탁드려요~

Copy link
Collaborator

Choose a reason for hiding this comment

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

(sidebar) 폴더 내부로 이동 시켜야 할 것 같습니다!

Copy link
Member Author

Choose a reason for hiding this comment

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

넵 !

Comment on lines 66 to 68
<button ref={ref} disabled={disabled} className={buttonClassName} {...rest}>
{children}
</button>
Copy link
Collaborator

Choose a reason for hiding this comment

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

여기는 공통 컴포넌트의 Button을 감싸서 사용해도 좋을 것 같아요

그리고 말씀해주신 버튼의 도메인 종속 관련한 문제에 대해서는, 저는 지금 상태로 유지하는게 좋을 것 같습니다!
앞으로 계속 도메인 종속적인 버튼 컴포넌트들이 많이 생길 수도 있는데, 그 때마다 공통 컴포넌트로 분리하기위한 고민을 해야하면 좀 힘들 것 같아요.. 이런 부분은 그냥 종속적으로 만들어도 괜찮을 것 같습니다!

Copy link
Member Author

Choose a reason for hiding this comment

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

확인입니다 !

Copy link
Collaborator

Choose a reason for hiding this comment

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

제가 이전 PR에서 shadcn의 드랍다운메뉴 컴포넌트를 설치했었는데 한번 pull 받고 확인해주세요!

@Collection50 Collection50 merged commit 6e514e3 into main Aug 3, 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
Development

Successfully merging this pull request may close these issues.

3 participants