Conversation
Summary of ChangesHello @Dobbymin, 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은 사용자 인터페이스와 경험을 대폭 개선하는 데 중점을 둡니다. 반응형 탭 컴포넌트를 도입하고 PostCard 그리드 레이아웃을 재정의하여 다양한 화면 크기에서 일관되고 최적화된 보기를 제공합니다. 또한, 개발자 경험을 향상시키기 위해 ESLint 규칙을 조정하고, 공유 UI 컴포넌트의 구조를 재편하여 코드의 유지보수성과 확장성을 높였습니다. 전반적으로 시각적 일관성과 반응성을 개선하여 이전의 레이아웃 문제를 해결하는 것을 목표로 합니다. Highlights
Using Gemini Code AssistThe 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
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 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
|
There was a problem hiding this comment.
Code Review
이번 PR은 새로운 UI를 도입하면서 반응형 탭 컴포넌트 구현, PostCard 그리드 레이아웃 개선 등 많은 부분을 변경했네요. 전반적으로 코드 구조가 개선되었지만, 몇 가지 웹 접근성, 버그 가능성, 유지보수성 측면에서 개선할 점을 발견했습니다. 특히 Tabs 컴포넌트는 PR 설명에 명시된 기능들이 일부 누락된 것으로 보이며, 웹 접근성을 위해 시맨틱 태그를 사용하는 것이 중요합니다. 또한, 일부 컴포넌트에서 하드코딩된 값이나 미사용 코드가 있어 이를 개선하는 방향으로 피드백을 남겼습니다.
| --line-height-footer: calc( | ||
| var(--footer-height) - 2 * var(--footer-padding-x) | ||
| ); |
| <Link href={routerPath.about}> | ||
| <p className='font-lemon text-xl'>About</p> | ||
| </Link> | ||
| <Sun className='cursor-pointer text-blog-pink' /> |
| <div className='flex h-13 justify-start overflow-x-auto py-2 font-fira-code'> | ||
| {tabs.map((tab, idx) => ( | ||
| <div | ||
| key={tab.name} | ||
| className={`flex cursor-pointer items-center justify-center gap-2 border-r px-5 text-sm font-semibold transition-colors last:border-r-0 ${ | ||
| selected === idx | ||
| ? 'bg-blog-gray-100 text-blog-black' | ||
| : 'bg-blog-gray-200 text-blog-gray-600 hover:font-bold' | ||
| } ${idx === 0 ? '' : 'w-full'} `} | ||
| onClick={() => setSelected(idx)} | ||
| > | ||
| <p>{tab.name}</p> | ||
| <p className='text-blog-green'>({tab.count})</p> | ||
| </div> | ||
| ))} | ||
| </div> |
There was a problem hiding this comment.
현재 Tabs 컴포넌트 구현이 PR 설명과 다르고, 웹 접근성 및 스타일링에 개선이 필요해 보입니다.
- 웹 접근성: 클릭 가능한
div대신 시맨틱한<button>태그와role='tab'속성을 사용해야 키보드 탐색과 스크린 리더 호환성을 보장할 수 있습니다. - 구현 불일치: PR 설명에 언급된 반응형 패딩(
px-3 sm:px-5), 최소 너비(min-w-[120px]), 스냅 스크롤(snap-x) 등의 기능이 누락되었습니다. - 스타일링 문제:
h-13은 유효한 Tailwind 클래스가 아니며,w-full로직은 스크롤 가능한 탭의 의도와 맞지 않아 보입니다.
아래와 같이 개선하는 것을 제안합니다.
<div className='snap-x snap-mandatory flex h-[52px] w-full justify-start overflow-x-auto py-2 font-fira-code'>
{tabs.map((tab, idx) => (
<button
key={tab.name}
role="tab"
aria-selected={selected === idx}
className={`snap-start flex min-w-[120px] shrink-0 cursor-pointer items-center justify-center gap-2 border-r px-3 text-sm font-semibold transition-colors last:border-r-0 sm:px-5 ${
selected === idx
? 'bg-blog-gray-100 text-blog-black'
: 'bg-blog-gray-200 text-blog-gray-600 hover:font-bold'
}`}
onClick={() => setSelected(idx)}
>
<p className="truncate">{tab.name}</p>
<p className='text-blog-green'>({tab.count})</p>
</button>
))}
</div>
| const [search, setSearch] = useState(''); | ||
|
|
||
| const onChangeSearch = (e: React.ChangeEvent<HTMLInputElement>) => { | ||
| setSearch(e.target.value); | ||
| }; |
| maxWidth='7xl' | ||
| > | ||
| {posts.map((_, index) => ( | ||
| <PostCard key={index} /> |
|
|
||
| export const PostCard = () => { | ||
| return ( | ||
| <div className='flex w-full flex-col overflow-hidden bg-white shadow-lg transform-content'> |
There was a problem hiding this comment.
transform-content는 유효한 Tailwind CSS 클래스가 아닙니다. 아마 transform을 의도하신 것 같습니다. transform 클래스는 scale, rotate 등 다른 변환 유틸리티와 함께 사용될 때 활성화됩니다. 의도하신 기능이 없다면 이 클래스를 제거하는 것이 좋습니다.
| <div className='flex w-full flex-col overflow-hidden bg-white shadow-lg transform-content'> | |
| <div className='flex w-full flex-col overflow-hidden bg-white shadow-lg'> |
| <div className='text-sm text-blog-blue'> | ||
| 게시물 1에 대한 내용입니다.게시물 1에 대한 내용입니다.게시물 1에 | ||
| 대한 내용입니다.게시물 1에 대한 내용입니다. | ||
| </div> |
There was a problem hiding this comment.
게시물 내용이 길어지면 카드의 높이가 달라져 그리드 레이아웃이 깨질 수 있습니다. 일관된 UI를 위해 truncate 클래스를 사용해 한 줄로 표시하거나, @tailwindcss/line-clamp 플러그인을 사용하여 여러 줄 말줄임 처리를 하는 것을 고려해 보세요.
| <div className='text-sm text-blog-blue'> | |
| 게시물 1에 대한 내용입니다.게시물 1에 대한 내용입니다.게시물 1에 | |
| 대한 내용입니다.게시물 1에 대한 내용입니다. | |
| </div> | |
| <div className='truncate text-sm text-blog-blue'> | |
| 게시물 1에 대한 내용입니다.게시물 1에 대한 내용입니다.게시물 1에 | |
| 대한 내용입니다.게시물 1에 대한 내용입니다. | |
| </div> |
| Copyright © 2025 <b>Dobbymin</b> All rights reserved. | ||
| </p> | ||
| <div className='flex items-center justify-center gap-1 font-fira-code text-blog-gray-600'> | ||
| <span>gmin0701@knu.ac.kr</span> | ||
| <span className='font-bold'>.</span> | ||
| <span>+82-10-3095-7259</span> | ||
| <span className='font-bold'>.</span> | ||
| <Link | ||
| className='hover:font-bold hover:underline' | ||
| href='https://github.com/Dobbymin' | ||
| > | ||
| GitHub | ||
| </Link> | ||
| <span className='font-bold'>.</span> | ||
| <Link | ||
| className='hover:font-bold hover:underline' | ||
| href='https://www.linkedin.com/in/dobbymin/' | ||
| > | ||
| </Link> | ||
| </div> |
There was a problem hiding this comment.
푸터에 개인 정보(이메일, 전화번호, 링크)가 하드코딩되어 있습니다. 이 정보들을 별도의 상수 파일로 분리하여 관리하면 재사용성과 유지보수성을 높일 수 있습니다.
또한, <b> 태그 대신 Tailwind CSS의 font-bold 클래스를 사용하는 것이 일관성 측면에서 더 좋습니다.
예시:
// constants/author.ts
export const authorInfo = {
name: 'Dobbymin',
email: 'gmin0701@knu.ac.kr',
// ...
};
// Footer.tsx
<p>...
Copyright © 2025 <span className='font-bold'>{authorInfo.name}</span> All rights reserved.
</p>| <Input | ||
| className='border-none bg-transparent text-sm text-blog-gray-500 shadow-none outline-none placeholder:text-blog-gray-400 focus:border-none focus:ring-0 focus:outline-none' | ||
| type='text' | ||
| /> |
There was a problem hiding this comment.
검색 Input 컴포넌트에 placeholder가 없어 사용자에게 어떤 입력이 필요한지 알려주기 어렵습니다. placeholder='검색어를 입력하세요...'와 같이 안내 문구를 추가하면 사용자 경험을 개선할 수 있습니다.
| <Input | |
| className='border-none bg-transparent text-sm text-blog-gray-500 shadow-none outline-none placeholder:text-blog-gray-400 focus:border-none focus:ring-0 focus:outline-none' | |
| type='text' | |
| /> | |
| <Input | |
| className='border-none bg-transparent text-sm text-blog-gray-500 shadow-none outline-none placeholder:text-blog-gray-400 focus:border-none focus:ring-0 focus:outline-none' | |
| placeholder='검색어를 입력하세요...' | |
| type='text' | |
| /> |
📝 상세 내용
반응형 탭 컴포넌트 구현 및 레이아웃 개선
이번 PR에서는 탭 컴포넌트를 반응형으로 개선하고, PostCard 그리드 레이아웃을 정상화했습니다.
주요 변경사항
탭 컴포넌트 반응형 구현
px-3 sm:px-5)min-w-[120px])truncate클래스 추가snap-x,snap-start)PostCard 그리드 레이아웃 수정
lg:grid-cols-[270px_270px_270px]px-4 md:px-8 lg:px-0ESLint 설정 개선
@typescript-eslint/no-unused-vars규칙을 error에서 warn으로 변경기술 스택
#️⃣ 이슈 번호
⏰ 현재 버그
X
📷 스크린샷(선택)
변경 전
변경 후