Skip to content

fix: 사이드바 수정, 인풋 수정, 댓글 수정#57

Merged
jungwon123 merged 1 commit into
mainfrom
fix/sidebar-input
Feb 20, 2026
Merged

fix: 사이드바 수정, 인풋 수정, 댓글 수정#57
jungwon123 merged 1 commit into
mainfrom
fix/sidebar-input

Conversation

@jungwon123

Copy link
Copy Markdown
Contributor

Summary

사이드바 미로그인시 로그인 텍스트로 뜨게 하기

사이드바가 열린채로 있을지 닫힌채로 있을지 조작 가능하도록 수정하기

랜딩에서는 닫는게 깔끔하다고 판단되면 닫아두기
그 외에 페이지에서는 열어두기
span -> a태그로 페이지 이동

수정 완료하였습니다.

@jungwon123 jungwon123 added this to the 컴포넌트 milestone Feb 19, 2026
@jungwon123 jungwon123 requested review from a team, HWAN0218, Jieunsse and yooolleee February 19, 2026 23:22
@jungwon123 jungwon123 added the 리팩토링 리팩토링 및 리뷰내용 반영시 작성해주세요 label Feb 19, 2026
@github-project-automation github-project-automation Bot moved this to 개발 대기중 in workers Feb 19, 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은 사이드바, 댓글 입력, 모바일 헤더 컴포넌트의 사용자 경험과 유연성을 개선하는 데 중점을 둡니다. 사이드바는 로그인 상태에 따른 동적인 푸터 표시와 접힘 상태 제어 기능을 추가하여 사용성을 높였으며, 댓글 입력 컴포넌트는 프로필 이미지 지원을 통해 시각적 완성도를 더했습니다. 또한, 반응형 디자인의 미디어 쿼리 기준점을 확장하여 다양한 화면 크기에서 더 나은 레이아웃을 제공하고, 모바일 헤더의 로고 크기 조절 기능을 통해 커스터마이징 옵션을 늘렸습니다.

Highlights

  • 사이드바 기능 개선: 로그인 상태에 따라 푸터에 '로그인' 텍스트를 표시하고, 사이드바의 기본 접힘 상태를 제어할 수 있는 defaultCollapsed prop을 추가했습니다. 또한, 사이드바 버튼에 href prop을 추가하여 Link 컴포넌트로 렌더링되도록 하여 페이지 이동 기능을 강화했습니다.
  • 댓글 입력 컴포넌트 개선: 댓글 입력 필드 왼쪽에 프로필 이미지를 표시할 수 있는 profileImage prop을 CommentInput 컴포넌트에 추가하여 시각적인 사용자 경험을 향상시켰습니다.
  • 반응형 디자인 업데이트: 모바일 드로어, 모바일 헤더, 사이드바 컴포넌트의 미디어 쿼리 기준점을 767px에서 1199px로 확장하여 더 넓은 범위의 태블릿 및 소형 데스크톱 화면에서 일관된 반응형 동작을 제공합니다.
  • 모바일 헤더 로고 크기 조절: 모바일 헤더의 로고 크기를 logoWidthlogoHeight prop을 통해 동적으로 조절할 수 있도록 기능을 추가했습니다.

🧠 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/comment/styles/CommentCard.module.css
    • 댓글 카드 상단에 1px 테두리 스타일을 추가했습니다.
  • src/components/input/CommentInput.tsx
    • profileImage prop을 추가하여 댓글 입력 필드 왼쪽에 프로필 이미지를 표시할 수 있도록 기능을 확장했습니다.
  • src/components/input/styles/CommentInput.module.css
    • 프로필 이미지가 있는 댓글 입력 컴포넌트를 위한 새로운 스타일(withProfile, inputArea, profileImage)을 추가했습니다.
  • src/components/input/types/types.ts
    • CommentInputPropsprofileImage prop 정의를 추가했습니다.
  • src/components/sidebar/MobileDrawer.stories.tsx
    • 스토리북에서 SidebarButtonhref prop을 추가하여 링크 기능을 테스트할 수 있도록 업데이트했습니다.
  • src/components/sidebar/MobileHeader.stories.tsx
    • logoWidthlogoHeight에 대한 argTypes를 추가하고, 사용자 정의 로고 크기를 보여주는 CustomLogoSize 스토리를 추가했습니다.
  • src/components/sidebar/MobileHeader.tsx
    • logoWidthlogoHeight prop을 추가하여 모바일 헤더 로고의 크기를 조절할 수 있도록 했습니다.
  • src/components/sidebar/Sidebar.stories.tsx
    • storybook/test에서 fn을 임포트했습니다.
    • defaultCollapsedisLoggedIn에 대한 argTypes를 추가했습니다.
    • LoggedIn 스토리의 argsisLoggedInonProfileClick을 추가했습니다.
    • LoggedIn 스토리의 SidebarButtonhref prop을 추가했습니다.
    • 로그아웃 상태에서 접힌 사이드바를 보여주는 LoggedOutCollapsed 스토리를 추가했습니다.
    • 기본적으로 접힌 사이드바를 보여주는 DefaultCollapsed 스토리를 추가했습니다.
  • src/components/sidebar/Sidebar.tsx
    • humanBig 이미지를 임포트했습니다.
    • SidebarPropsdefaultCollapsed, isLoggedIn, onProfileClick prop을 추가했습니다.
    • isCollapsed 상태의 초기값을 defaultCollapsed prop으로 설정할 수 있도록 변경했습니다.
    • 푸터 렌더링 로직을 renderFooter 함수로 분리하여 로그인 상태에 따라 다른 UI를 표시하도록 구현했습니다.
    • 로그인하지 않은 상태일 때 '로그인' 텍스트와 기본 프로필 이미지를 표시하도록 기능을 추가했습니다.
    • 기존 푸터 렌더링 로직을 renderFooter() 호출로 대체했습니다.
  • src/components/sidebar/SidebarButton.stories.tsx
    • boardSmall 이미지를 임포트했습니다.
    • href에 대한 argTypes를 추가했습니다.
    • 링크가 있는 SidebarButton을 보여주는 WithLink 스토리를 추가했습니다.
    • Overview 스토리에 href prop이 있는 SidebarButton을 추가했습니다.
  • src/components/sidebar/SidebarButton.tsx
    • next/link에서 Link 컴포넌트를 임포트했습니다.
    • href prop을 추가하여 버튼이 Link 컴포넌트로 렌더링될 수 있도록 기능을 확장했습니다.
    • href prop의 유무에 따라 Link 또는 button 태그를 조건부로 렌더링하도록 로직을 변경했습니다.
  • src/components/sidebar/styles/MobileDrawer.module.css
    • 미디어 쿼리 최대 너비 기준점을 767px에서 1199px로 변경했습니다.
  • src/components/sidebar/styles/MobileHeader.module.css
    • 미디어 쿼리 최대 너비 기준점을 767px에서 1199px로 변경했습니다.
    • 768px에서 1199px 사이의 화면 크기에 대한 특정 헤더 높이 및 로고 크기 스타일을 추가했습니다.
  • src/components/sidebar/styles/Sidebar.module.css
    • 사이드바에 position: fixed, top: 0, left: 0, z-index: 50 스타일을 추가했습니다.
    • 미디어 쿼리 최대 너비 기준점을 767px에서 1199px로 변경했습니다.
    • 푸터에 cursor: pointer 스타일을 추가하고, 로그인 텍스트를 위한 .loginText 스타일을 추가했습니다.
  • src/components/sidebar/styles/SidebarButton.module.css
    • 사이드바 버튼의 text-decoration: none 스타일을 추가했습니다.
  • src/components/sidebar/types/types.ts
    • SidebarButtonPropshref prop 정의를 추가했습니다.
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

This pull request introduces several improvements to the sidebar and comment input components. Key changes include adding a border to comment cards, enhancing the CommentInput component with an optional profile image, and making the SidebarButton component capable of rendering as a Link when an href is provided. The sidebar now also supports a defaultCollapsed prop and improved login/logout states. Additionally, responsive adjustments have been made to the mobile header and drawer. Overall, the changes improve the UI/UX and flexibility of these components.

Comment on lines +11 to +21
export default function CommentInput({ className, profileImage, ...props }: CommentInputProps) {
if (profileImage) {
return (
<div className={styles.withProfile}>
<div className={styles.profileImage}>{profileImage}</div>
<div className={styles.inputArea}>
<ActionTextArea className={clsx(styles.textarea, className)} {...props} />
</div>
</div>
);
}

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

The conditional rendering for profileImage creates two distinct return paths. While functional, consider extracting the common ActionTextArea rendering logic to avoid duplication and improve readability. This would make the component more concise and easier to maintain.

export default function CommentInput({ className, profileImage, ...props }: CommentInputProps) {
  const actionTextArea = (
    <ActionTextArea className={clsx(styles.textarea, className)} {...props} />
  );

  if (profileImage) {
    return (
      <div className={styles.withProfile}>
        <div className={styles.profileImage}>{profileImage}</div>
        <div className={styles.inputArea}>{actionTextArea}</div>
      </div>
    );
  }

  return (
    <ActionTextArea
      wrapperClassName={styles.wrapper}
      className={clsx(styles.textarea, className)}
      {...props}
    />
  );
}

Comment on lines +55 to +105
const renderFooter = () => {
if (footer) {
return (
<div className={styles.footer} onClick={onProfileClick}>
{renderSlot(footer)}
</div>
);
}

if (!isLoggedIn) {
return (
<motion.div className={styles.footer} onClick={onProfileClick} layout>
<AnimatePresence>
{!isCollapsed && (
<motion.div
className={styles.profileImage}
initial={{ opacity: 0, scale: 0.8 }}
animate={{ opacity: 1, scale: 1 }}
exit={{ opacity: 0, scale: 0.8 }}
transition={{ duration: 0.2 }}
>
<Image src={humanBig} alt="" width={40} height={40} />
</motion.div>
)}
</AnimatePresence>
<motion.span className={styles.loginText} layout transition={{ duration: 0.3 }}>
로그인
</motion.span>
</motion.div>
);
}

return (
<div className={styles.footer} onClick={onProfileClick}>
<div className={styles.profileImage}>{profileImage}</div>
<AnimatePresence>
{!isCollapsed && (
<motion.div
className={styles.profileInfo}
initial={{ opacity: 0, x: -10 }}
animate={{ opacity: 1, x: 0 }}
exit={{ opacity: 0, x: -10 }}
transition={{ duration: 0.2 }}
>
<span className={styles.profileName}>{profileName}</span>
<span className={styles.profileTeam}>{profileTeam}</span>
</motion.div>
)}
</AnimatePresence>
</div>
);

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

The renderFooter function has become quite large and handles multiple conditional rendering scenarios (footer prop, logged in/out states). Consider breaking this down into smaller, more focused helper functions (e.g., renderLoggedInFooter, renderLoggedOutFooter) to improve readability and maintainability. This will make the logic easier to follow and test.

@yooolleee yooolleee 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.

배포 환경에서 에러가 난것으로 보입니다 에러 해결후에 머지 하시면 좋을 것 같습니다 먼저 어프로브는 남깁니다.

@jungwon123 jungwon123 merged commit 03015f1 into main Feb 20, 2026
1 check failed
@github-project-automation github-project-automation Bot moved this from 개발 대기중 to 개발 완료 in workers Feb 20, 2026
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