Skip to content

feat(frontend): export useUrlPreview hook and URL preview components#82

Merged
ywkim merged 1 commit into
mainfrom
feat/export-url-preview
Jan 3, 2026
Merged

feat(frontend): export useUrlPreview hook and URL preview components#82
ywkim merged 1 commit into
mainfrom
feat/export-url-preview

Conversation

@ywkim

@ywkim ywkim commented Jan 3, 2026

Copy link
Copy Markdown
Contributor

요약

Buppy 통합을 위해 URL 미리보기 관련 기능을 NPM 패키지에서 공개합니다.

목적

현재 HomeHeroSection은 URL 미리보기 데이터(previewData, isLoadingPreview, previewError)를 Props로 받지만, 이를 생성하는 useUrlPreview hook이 export되지 않아 Buppy에서 사용할 수 없습니다. 이 PR은 URL 미리보기 관련 모든 기능을 공개하여 외부 라이브러리에서 활용할 수 있도록 합니다.

주요 변경 사항

NPM 패키지 공개 항목

Hooks

  • useUrlPreview - URL 미리보기 데이터를 가져오고 관리하는 hook

Components

  • UrlPreviewCard - URL 미리보기를 표시하는 컴포넌트
  • UrlPreviewCardSkeleton - 로딩 상태의 스켈레톤 컴포넌트

Utilities

  • detectUrl - 텍스트에서 지원하는 도메인(X, Twitter, Reddit)의 URL을 감지
  • mapPostPreviewToLinkPreview - Post 미리보기 데이터를 LinkPreview 형식으로 변환

파일 수정

frontend/src/index.ts - 6개 항목 export 추가

테스트 체크리스트

  • Buppy에서 useUrlPreview hook을 import하여 정상 작동 확인
  • Buppy에서 UrlPreviewCard 컴포넌트를 import하여 정상 렌더링 확인
  • detectUrl, mapPostPreviewToLinkPreview utilities가 정상적으로 작동 확인
  • 패키지 배포 후 npm registry에서 새 export 항목 확인

연결 이슈


Buppy 통합을 위해 URL 미리보기 관련 기능을 NPM 패키지에서 public으로 export합니다.

추가된 export:
- Hook: useUrlPreview
- Components: UrlPreviewCard, UrlPreviewCardSkeleton
- Utilities: detectUrl, mapPostPreviewToLinkPreview

이를 통해 Buppy에서 URL 미리보기 기능을 직접 활용할 수 있습니다.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

Buppy 통합을 위해 URL 미리보기 관련 기능을 NPM 패키지로 공개하는 변경 사항 잘 보았습니다. PR의 목적이 명확하고, 관련 기능(컴포넌트, 훅, 유틸리티)을 체계적으로 export하여 라이브러리의 활용도를 높이는 좋은 시도입니다. 다만, 새로 공개되는 API의 사용성을 더욱 높이기 위해 몇 가지 관련 타입들을 함께 export하는 것을 제안합니다. 자세한 내용은 코드 리뷰 댓글을 참고해주세요.

Comment thread frontend/src/index.ts
Comment thread frontend/src/index.ts
@ywkim ywkim merged commit 90cf4f5 into main Jan 3, 2026
4 checks passed
@ywkim ywkim deleted the feat/export-url-preview branch January 3, 2026 05:51
@github-actions

github-actions Bot commented Jan 3, 2026

Copy link
Copy Markdown

🎉 This PR is included in version 1.14.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant