Skip to content

멤버 초대 모달 추가#35

Closed
Jieunsse wants to merge 4 commits into
mainfrom
feature/invite-modal
Closed

멤버 초대 모달 추가#35
Jieunsse wants to merge 4 commits into
mainfrom
feature/invite-modal

Conversation

@Jieunsse

@Jieunsse Jieunsse commented Feb 6, 2026

Copy link
Copy Markdown
Contributor

Summary

  • 멤버 초대 모달 작업 완료

Issue

이슈번호 #33

Scope

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

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @Jieunsse, 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은 두 가지 새로운 모달 컴포넌트, 즉 멤버 초대 모달과 할 일 목록 추가 모달을 도입합니다. 이 모달들은 각각의 기능과 UI/UX를 제공하며, 기존 Modal 컴포넌트의 유연성을 높이기 위해 contentClassName prop이 추가되었습니다. 이를 통해 모달 콘텐츠의 스타일을 더욱 세밀하게 제어할 수 있게 되었습니다.

Highlights

  • 새로운 멤버 초대 모달 컴포넌트 추가: 사용자가 그룹에 멤버를 초대할 수 있는 기능을 제공하는 새로운 모달 컴포넌트가 구현되었습니다. 이 모달은 초대 링크를 복사하는 기능을 포함합니다.
  • 새로운 할 일 목록 추가 모달 컴포넌트 추가: 할 일 목록을 생성할 수 있는 기능을 제공하는 새로운 모달 컴포넌트가 구현되었습니다. 이 모달은 할 일 입력을 위한 폼을 포함합니다.
  • 모달 콘텐츠 스타일링 유연성 향상: 기존 Modal 컴포넌트에 contentClassName prop이 추가되어 모달 콘텐츠 영역에 사용자 정의 CSS 클래스를 적용할 수 있게 되었습니다. 이를 통해 각 모달의 디자인을 더욱 세밀하게 제어할 수 있습니다.
  • 모달별 전용 스타일 정의: 멤버 초대 모달과 할 일 목록 추가 모달 각각에 대한 전용 CSS 모듈이 추가되어 독립적이고 반응형인 스타일링이 적용되었습니다.

🧠 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/components/Modal/domain/AddTodoList.module.css
    • 새로운 할 일 목록 추가 모달의 레이아웃, 타이포그래피 및 반응형 동작을 정의하는 CSS 모듈이 추가되었습니다.
  • src/components/Modal/domain/AddTodoList.tsx
    • 할 일 목록 추가 모달을 위한 새로운 React 컴포넌트가 추가되었습니다. 이 컴포넌트는 폼 제출 처리 및 일반 Modal 컴포넌트와의 통합을 포함합니다.
  • src/components/Modal/domain/MemberInvite.module.css
    • 새로운 멤버 초대 모달의 레이아웃, 버튼 스타일 및 반응형 동작을 정의하는 CSS 모듈이 추가되었습니다.
  • src/components/Modal/domain/MemberInvite.tsx
    • 멤버 초대 모달을 위한 새로운 React 컴포넌트가 추가되었습니다. 이 컴포넌트는 초대 링크 복사 기능 및 일반 Modal 컴포넌트와의 통합을 포함합니다.
  • src/components/Modal/types/types.ts
    • BaseModalProps 인터페이스에 contentClassName 속성이 추가되어 모달의 콘텐츠 영역에 사용자 정의 CSS 클래스를 적용할 수 있게 되었습니다.
Activity
  • 이슈번호 #33에 명시된 멤버 초대 모달 작업이 완료되었습니다.
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은 멤버 초대와 할 일 목록 추가를 위한 두 가지 새로운 모달 컴포넌트를 도입합니다. 코드 리뷰 결과, 몇 가지 중요한 수정이 필요한 사항이 발견되었습니다.
가장 시급한 문제로, AddTodoList 모달에서 사용자가 입력한 값을 처리하는 로직이 누락되어 기능이 동작하지 않습니다. 또한, 두 모달 모두에서 커스텀 스타일을 적용하기 위해 사용된 contentClassName prop이 실제 Modal 컴포넌트에서 처리되지 않아 디자인이 깨지는 문제가 있습니다.
그 외에도 CSS에서 불필요한 선택자 중복, 고정 높이 값 사용, 그리고 React 컴포넌트 내 하드코딩된 ID 사용 등 유지보수성과 안정성을 개선할 수 있는 부분들이 있습니다. 자세한 내용은 각 파일에 남긴 리뷰 코멘트를 참고해주세요.

I am having trouble creating individual review comments. Click here to see my feedback.

src/components/Modal/domain/AddTodoList.tsx (12-16)

critical

onCreate prop의 타입이 () => void로 되어 있어, 사용자가 입력한 할 일 목록의 이름을 전달할 수 없습니다. (name: string) => void로 수정하여 입력값을 전달받을 수 있도록 해야 합니다.

export interface AddTodoListProps {
  isOpen: boolean;
  onClose: () => void;
  onCreate: (name: string) => void;
}

src/components/Modal/domain/AddTodoList.tsx (18-52)

critical

현재 AddTodoList 컴포넌트는 Input의 값을 상위 컴포넌트로 전달하는 로직이 구현되어 있지 않습니다. useState를 사용하여 입력 값을 제어하고, form 제출 시 onCreate 콜백으로 전달하도록 수정해야 합니다.
(참고: useState를 사용하려면 import { useState } from 'react'; 구문이 필요합니다.)

export default function AddTodoList({ isOpen, onClose, onCreate }: AddTodoListProps) {
  const [name, setName] = useState('');

  const handleSubmit = (e: FormEvent<HTMLFormElement>) => {
    e.preventDefault();
    if (!name.trim()) {
      return; // 이름이 비어있으면 생성하지 않음
    }
    onCreate(name);
    setName(''); // 생성 후 입력 필드 초기화
  };

  const handleClose = () => {
    setName(''); // 모달을 닫을 때 입력 필드 초기화
    onClose();
  };

  return (
    <Modal
      isOpen={isOpen}
      onClose={handleClose}
      ariaLabelledby={TITLE_ID}
      contentClassName={styles.modalContent}
    >
      <article className={styles.container}>
        <header className={styles.header}>
          <h2 id={TITLE_ID} className={styles.title}>
            할 일 목록
          </h2>
          <button type="button" className={styles.closeButton} aria-label="close" onClick={handleClose}>
            <Image src={xMarkBig} alt="" width={24} height={24} />
          </button>
        </header>

        <form className={styles.form} onSubmit={handleSubmit}>
          <Input
            className={styles.input}
            placeholder="할 일을 입력하세요"
            value={name}
            onChange={(e) => setName(e.target.value)}
            autoFocus
          />
          <footer className={styles.footer}>
            <button type="submit" className={styles.button} disabled={!name.trim()}>
              만들기
            </button>
          </footer>
        </form>
      </article>
    </Modal>
  );
}

src/components/Modal/domain/AddTodoList.tsx (29)

critical

contentClassName prop을 Modal 컴포넌트에 전달하고 있지만, Modal.tsx 구현에서 이 prop을 사용하고 있지 않아 스타일이 적용되지 않습니다. 이로 인해 AddTodoListMemberInvite 모달의 border-radius 등 주요 스타일이 누락됩니다.

Modal.tsx 파일을 수정하여 contentClassNamedivclassName에 추가해야 합니다.

// Modal.tsx
export default function Modal({
  // ...,
  contentClassName,
}: ModalProps) {
  // ...
  return (
    // ...
    <div
      className={clsx(style.contentsBox, contentClassName)}
      // ...
    >
      {children}
    </div>
    // ...
  );
}

src/components/Modal/domain/AddTodoList.module.css (41-49)

medium

.input.input 선택자는 불필요하게 중복되었습니다. .input으로 수정해도 동일하게 동작하며, 코드가 더 명확해집니다. 이는 의도치 않은 동작을 방지하고 가독성을 높입니다.

.input {
  padding: 14px 16px;
  width: 100%;
  max-width: var(--input-max-width);
  height: var(--control-height);
  box-sizing: border-box;
  align-self: center;
  text-align: center;
}

src/components/Modal/domain/AddTodoList.module.css (98-102)

medium

.modalContent.modalContent 선택자는 불필요하게 중복되었습니다. .modalContent로 수정해도 동일하게 동작하며, 코드가 더 명확해집니다.

.modalContent {
  --dialog-radius-desktop: 24px;
  --dialog-radius-mobile: 24px 24px 0 0;
  border-radius: var(--dialog-radius-desktop);
}

src/components/Modal/domain/MemberInvite.module.css (5-7)

medium

.container에 고정된 height 값을 사용하면 내용이 변경될 때 레이아웃이 깨질 수 있습니다. 예를 들어, 텍스트가 길어지면 컨테이너 밖으로 넘칠 수 있습니다. height 속성을 제거하고 내부 콘텐츠와 padding에 의해 높이가 자연스럽게 결정되도록 하는 것이 더 유연하고 안정적인 방법입니다. 84행의 height도 함께 제거하는 것을 권장합니다.

  width: 384px;
  padding: 40px 24px 32px;

src/components/Modal/domain/MemberInvite.tsx (15-48)

medium

ariaLabelledbyariaDescribedby에 하드코딩된 문자열 ID를 사용하고 있습니다. 만약 이 컴포넌트가 한 페이지에 여러 번 렌더링될 경우 ID 충돌이 발생할 수 있습니다. React 18의 useId 훅을 사용하면 고유한 ID를 생성하여 이 문제를 해결할 수 있습니다.
(참고: useId를 사용하려면 import { useId } from 'react'; 구문이 필요합니다.)

export default function MemberInvite({ isOpen, onClose, inviteLink, onCopy }: MemberInviteProps) {
  const titleId = useId();
  const descId = useId();

  const handleCopy = async () => {
    try {
      await navigator.clipboard.writeText(inviteLink);
    } finally {
      onCopy?.(inviteLink);
    }
  };

  return (
    <Modal
      isOpen={isOpen}
      onClose={onClose}
      ariaLabelledby={titleId}
      ariaDescribedby={descId}
      contentClassName={styles.modalContent}
    >
      <div className={styles.container}>
        <button type="button" className={styles.closeButton} onClick={onClose} aria-label="close">
          <Image src={xMarkBig} alt="" width={24} height={24} />
        </button>
        <h2 id={titleId} className={styles.title}>
          멤버 초대
        </h2>
        <p id={descId} className={styles.description}>
          그룹에 참여할 수 있는 링크를 복사합니다.
        </p>
        <button type="button" className={styles.copyButton} onClick={handleCopy}>
          링크 복사하기
        </button>
      </div>
    </Modal>
  );
}

@Jieunsse Jieunsse closed this Feb 7, 2026
@github-project-automation github-project-automation Bot moved this from 개발 대기중 to 개발 완료 in workers Feb 7, 2026
@Jieunsse Jieunsse deleted the feature/invite-modal branch February 20, 2026 09:43
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.

1 participant