Skip to content

댓글 내역 컴포넌트 구현#30

Merged
jungwon123 merged 1 commit into
mainfrom
feat/comments
Feb 8, 2026
Merged

댓글 내역 컴포넌트 구현#30
jungwon123 merged 1 commit into
mainfrom
feat/comments

Conversation

@jungwon123

Copy link
Copy Markdown
Contributor

Summary

댓글 입력창과 다른 댓글 내역을 보기위한 컴포넌트 입니다.

Issue

Scope

  • 특이사항
    케밥 아이콘 추가 하였습니다.

@jungwon123 jungwon123 added this to the 컴포넌트 milestone Feb 4, 2026
@jungwon123 jungwon123 added the 기능추가 기능개발 및 추가할 때 사용해주세요. label Feb 4, 2026
@github-project-automation github-project-automation Bot moved this to 개발 대기중 in workers Feb 4, 2026
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @jungwon123, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

이 PR은 댓글 내역을 표시하기 위한 CommentCard 컴포넌트를 구현합니다. 이 컴포넌트는 사용자 이름, 댓글 내용, 날짜를 표시하며, 프로필 이미지, 아이콘(예: 케밥 메뉴), 그리고 액션 버튼(예: 수정/취소)을 위한 슬롯을 제공하여 유연하게 사용할 수 있도록 설계되었습니다. 관련 SVG 아이콘과 Storybook 문서도 함께 추가되었습니다.

Highlights

  • 새로운 CommentCard 컴포넌트 구현: 댓글 내역을 표시하기 위한 CommentCard 컴포넌트가 새로 구현되었습니다. 이 컴포넌트는 사용자 이름, 댓글 내용, 날짜를 표시하며, 프로필 이미지, 아이콘, 액션 버튼을 위한 슬롯을 제공합니다.
  • 케밥 아이콘 추가: kebabLarge.svgkebabSmall.svg 두 가지 크기의 케밥 아이콘 SVG 파일이 src/assets/icons/kebab 경로에 추가되었습니다.
  • Storybook 스토리 추가: CommentCard 컴포넌트의 다양한 상태(기본, 프로필 이미지 포함, 아이콘 포함, 액션 포함, 전체 개요)를 시각적으로 확인할 수 있는 Storybook 스토리가 추가되었습니다.
  • 컴포넌트 스타일 및 타입 정의: CommentCard 컴포넌트의 레이아웃과 스타일을 정의하는 CSS 모듈이 추가되었으며, 반응형 디자인을 위한 미디어 쿼리도 포함됩니다. 또한, 컴포넌트의 속성을 명확히 하는 CommentCardProps 타입 정의도 추가되었습니다.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • src/assets/icons/kebab/kebabLarge.svg
    • 대형 케밥 아이콘 SVG 파일이 추가되었습니다.
  • src/assets/icons/kebab/kebabSmall.svg
    • 소형 케밥 아이콘 SVG 파일이 추가되었습니다.
  • src/components/comment/CommentCard.stories.tsx
    • CommentCard 컴포넌트의 Storybook 스토리가 추가되어 다양한 사용 사례를 시각적으로 확인할 수 있습니다.
  • src/components/comment/CommentCard.tsx
    • 댓글 정보를 표시하는 CommentCard React 컴포넌트가 새로 추가되었습니다.
  • src/components/comment/index.ts
    • CommentCard 컴포넌트와 관련 타입(CommentCardProps)을 외부로 내보내는 인덱스 파일이 추가되었습니다.
  • src/components/comment/styles/CommentCard.module.css
    • CommentCard 컴포넌트의 레이아웃 및 스타일을 정의하는 CSS 모듈이 추가되었습니다.
  • src/components/comment/types/types.ts
    • CommentCard 컴포넌트의 속성(props)을 정의하는 TypeScript 타입 파일이 추가되었습니다.
Activity
  • 이 PR에 대한 추가적인 활동 내역은 제공되지 않았습니다.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@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

PR은 댓글 카드 컴포넌트와 관련 Storybook 스토리, 그리고 케밥 아이콘 SVG를 추가합니다. 컴포넌트의 기본 기능과 스타일은 잘 구현되었지만, 접근성 및 Storybook 스토리의 일관성 측면에서 개선할 부분이 있습니다. 특히, 상호작용이 필요한 요소에 태그를 사용하여 접근성을 높이고, 태그의 datetime 속성을 필수로 지정하여 시맨틱 HTML을 강화하는 것을 권장합니다.

profileImage={
<div style={{ width: 32, height: 32, borderRadius: 12, background: '#cbd5e1' }} />
}
icon={<span style={{ fontSize: 16, cursor: 'pointer' }}>⋮</span>}

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.

high

Overview 스토리에서 icon 슬롯에 <span> 태그를 사용하고 cursor: 'pointer' 스타일을 적용했습니다. 이는 시각적으로는 클릭 가능한 요소처럼 보이지만, 스크린 리더 사용자에게는 버튼으로 인식되지 않아 접근성 문제가 발생할 수 있습니다. 상호작용이 필요한 요소는 <button> 태그를 사용하는 것이 좋습니다.

<button type="button" onClick={fn()} style={{ background: 'none', border: 'none', cursor: 'pointer', padding: 0, fontSize: 16 }}>⋮</button>

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

span으로 자리만 잡아둔 것이라 아이콘 주입하여 사용하면 됩니다.

Comment on lines +127 to +128
<span style={{ fontSize: 12, color: '#64748b', cursor: 'pointer' }}>취소</span>
<span style={{ fontSize: 12, color: '#3b82f6', cursor: 'pointer' }}>수정하기</span>

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.

high

Overview 스토리의 actions 슬롯에서도 <span> 태그를 사용하여 '취소' 및 '수정하기' 버튼을 구현했습니다. 이 또한 접근성 문제를 야기할 수 있으므로, 상호작용이 필요한 요소에는 <button> 태그를 사용하는 것이 적절합니다.

<button
          type="button"
          onClick={fn()}
          style={{
            background: 'none',
            border: 'none',
            cursor: 'pointer',
            fontSize: 12,
            color: '#64748b',
          }}
        >
          취소
        </button>
        <button
          type="button"
          onClick={fn()}
          style={{
            background: 'none',
            border: 'none',
            cursor: 'pointer',
            fontSize: 12,
            color: '#3b82f6',
          }}
        >
          수정하기
        </button>

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

span으로 자리만 잡아둔 것이라 버튼 주입하여 사용하면 됩니다.

return (
<article className={styles.card}>
{profileImage && (
<div className={styles.avatar} aria-hidden="true">

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.

medium

profileImage를 감싸는 divaria-hidden="true"가 설정되어 있습니다. 만약 profileImage가 사용자 프로필 사진과 같이 의미 있는 정보를 전달하는 이미지라면, 스크린 리더 사용자에게 해당 정보가 전달되지 않을 수 있습니다. 이 이미지가 순전히 장식적인 목적이 아니라면 aria-hidden 속성을 제거하고, profileImage로 전달되는 <img> 태그에 적절한 alt 속성을 포함하도록 안내하는 것이 좋습니다.

Suggested change
<div className={styles.avatar} aria-hidden="true">
<div className={styles.avatar}>

/** 화면에 표시할 날짜 텍스트 (예: "2024년 7월 29일") */
date: string;
/** `<time>` 태그의 datetime 속성값 (예: "2024-07-29") */
dateTime?: string;

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.

medium

date prop이 항상 표시되는 반면, dateTime prop은 선택 사항입니다. <time> 태그의 datetime 속성은 날짜/시간 정보를 기계가 읽을 수 있는 형식으로 제공하여 접근성과 검색 엔진 최적화에 도움을 줍니다. date가 제공될 때 dateTime도 함께 제공되도록 하여 시맨틱 HTML을 강화하는 것을 권장합니다. 이렇게 변경하면 CommentCard.stories.tsx에서도 dateTime을 필수로 제공해야 합니다.

Suggested change
dateTime?: string;
dateTime: string;

gap: 12px;
}

.avatar {

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.

medium

avatar 클래스의 크기가 @media (max-width: 375px) 조건에서만 24px로 명시되어 있습니다. 더 큰 화면에서는 avatar div 자체의 크기가 명시적으로 설정되어 있지 않아, profileImage로 전달되는 요소의 크기에 따라 레이아웃이 달라질 수 있습니다. 일관된 아바타 크기 관리를 위해 기본 avatar 스타일에 크기를 정의하고, 필요한 경우 미디어 쿼리에서 재정의하는 것이 좋습니다. Storybook의 기본 플레이스홀더 크기(32px)와 일치시키는 것을 고려해볼 수 있습니다.

.avatar {
  width: 32px;
  height: 32px;

@jungwon123 jungwon123 merged commit cdb8ac2 into main Feb 8, 2026
1 check passed
@github-project-automation github-project-automation Bot moved this from 개발 대기중 to 개발 완료 in workers Feb 8, 2026
@jungwon123 jungwon123 deleted the feat/comments branch February 20, 2026 11:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

기능추가 기능개발 및 추가할 때 사용해주세요.

Projects

Status: 개발 완료

Development

Successfully merging this pull request may close these issues.

댓글 내역 컴포넌트 구현

4 participants