Skip to content

refactor(notion-to-jsx): 타입 안전성 강화, Props 전달 컨벤션 통일#163

Merged
01-binary merged 1 commit intomainfrom
refactor/code-review-improvements-4
Feb 17, 2026
Merged

refactor(notion-to-jsx): 타입 안전성 강화, Props 전달 컨벤션 통일#163
01-binary merged 1 commit intomainfrom
refactor/code-review-improvements-4

Conversation

@01-binary
Copy link
Copy Markdown
Owner

변경 사항

  • Props 전달 컨벤션 통일: 미디어/콘텐츠 블록 컴포넌트가 block.[type] 콘텐츠 객체를 직접 받도록 통일 (CodeBlock, Image, Bookmark, Embed, Quote)
  • 타입 안전성 강화: LinkPreview 에러 핸들링 개선, Table sentinel value를 null 패턴으로 변경, extractHeadings 타입 가드 추가
  • CSS 매직넘버 제거: CONTENT_MAX_WIDTH 상수 추출 및 중복 skeletonWrapper 스타일을 공통 모듈로 통합
  • import 정리: RichTextItemnotion-types에서 직접 import, Skeleton 와일드카드 import를 named import으로 변경

변경된 파일

  • BlockRenderer.tsx - Props 전달 컨벤션 통일 (content object 패턴)
  • CodeBlock.tsx, Image.tsx, Bookmark.tsx, Embed.tsx, Quote.tsx - content object Props 수용
  • MemoizedComponents.tsx - memo comparator를 content object 구조에 맞게 업데이트
  • LinkPreview.tsx - fetch 에러 핸들링 및 타입 안전성 개선
  • Table.tsx, TableRow.tsx - sentinel value -1null 패턴
  • extractHeadings.ts - 타입 가드 추가
  • styles/layout.ts - CONTENT_MAX_WIDTH 상수 추출
  • styles/loadingOverlay.css.ts - 공통 skeletonWrapper 스타일 추출
  • 기타 스타일/import 정리 파일들

테스트

  • pnpm build 성공
  • pnpm test 52개 테스트 통과
  • 모든 변경은 내부 컴포넌트 Props만 수정 (public API 변경 없음)

@vercel
Copy link
Copy Markdown

vercel bot commented Feb 17, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
notion-to-jsx-docs Ready Ready Preview, Comment Feb 17, 2026 8:56am

Request Review

@github-actions
Copy link
Copy Markdown
Contributor

Unit Test Report

106 tests   106 ✅  0s ⏱️
 13 suites    0 💤
  2 files      0 ❌

Results for commit add5029.

@github-actions
Copy link
Copy Markdown
Contributor

Coverage Report for packages/notion-to-utils

Status Category Percentage Covered / Total
🔵 Lines 69.84% 139 / 199
🔵 Statements 71.29% 149 / 209
🔵 Functions 81.13% 43 / 53
🔵 Branches 72.07% 111 / 154
File CoverageNo changed files found.
Generated in workflow #80 for commit add5029 by the Vitest Coverage Report Action

@01-binary 01-binary merged commit f9b1d93 into main Feb 17, 2026
7 checks passed
@01-binary 01-binary deleted the refactor/code-review-improvements-4 branch February 17, 2026 09:11
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.

1 participant