Skip to content

Conversation

@yulrang
Copy link
Contributor

@yulrang yulrang commented Nov 19, 2024

🔖 Issue Ticket

#135

✍️ Description

물결치는 404입니다....ㅠ

✅ Checklist

PR

  • Branch Convention 확인

    feat/ 피쳐, fix/ 버그 수정, refactor/ 개선

  • Base Branch 확인
  • 적절한 Label 지정
  • Assignee 및 Reviewer 지정

Test

  • 로컬 작동 확인

Summary by CodeRabbit

  • 신규 기능
    • 사용자 친화적인 404 오류 페이지를 추가했습니다. 페이지에는 SVG 그래픽과 함께 "404" 텍스트가 포함되어 있습니다.
    • 한국어로 "페이지를 찾을 수 없습니다. 😢"라는 메시지와 "홈으로 가기" 버튼이 있어 사용자가 쉽게 홈페이지로 돌아갈 수 있습니다.
  • 스타일
    • 새로운 글꼴 크기 404를 추가했습니다.
    • 애니메이션 키프레임 wave를 추가하여 페이지에 동적인 효과를 부여했습니다.

@coderabbitai
Copy link

coderabbitai bot commented Nov 19, 2024

Walkthrough

이번 변경 사항은 새로운 React 컴포넌트 NotFound를 추가하여 404 오류 페이지를 구현하는 것입니다. 이 컴포넌트는 Next.js의 Link 컴포넌트를 사용하여 내비게이션을 지원하며, SVG 그래픽과 함께 사용자 친화적인 메시지를 제공합니다. 또한, tailwind.config.ts 파일에 새로운 글꼴 크기와 애니메이션 키프레임을 추가하여 CSS 구성을 확장했습니다.

Changes

파일 경로 변경 요약
src/app/not-found.tsx 새로운 React 컴포넌트 NotFound 추가, 404 오류 페이지 구현, SVG 그래픽 및 내비게이션 버튼 포함
tailwind.config.ts 새로운 글꼴 크기 404 추가, 애니메이션 키프레임 wave 및 애니메이션 추가

Suggested reviewers

  • HaeJungg
  • minkyung5x5
  • User850413

🐰 "404 페이지가 왔어요,
귀여운 그래픽과 함께,
홈으로 가는 길을 찾아요,
우리 모두 함께 웃어요!
페이지를 찾지 못해도,
다시 돌아올 수 있죠,
행복한 토끼의 세상에서!" 🐇

Warning

There were issues while running some tools. Please review the errors and either fix the tool’s configuration or disable the tool if it’s a critical failure.

🔧 eslint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

src/app/not-found.tsx

Oops! Something went wrong! :(

ESLint: 8.57.1

ESLint couldn't determine the plugin "react-hooks" uniquely.

  • /node_modules/eslint-plugin-react-hooks/index.js (loaded in ".eslintrc.js")
  • /node_modules/eslint-config-next/node_modules/eslint-plugin-react-hooks/index.js (loaded in ".eslintrc.js » eslint-config-next/core-web-vitals » /node_modules/eslint-config-next/index.js » plugin:react-hooks/recommended")

Please remove the "plugins" setting from either config or remove either plugin installation.

If you still can't figure out the problem, please stop by https://eslint.org/chat/help to chat with the team.


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@yulrang yulrang linked an issue Nov 19, 2024 that may be closed by this pull request
@github-actions
Copy link

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Outside diff range and nitpick comments (2)
src/app/not-found.tsx (1)

59-69: 접근성 개선이 필요합니다.

사용자 경험과 접근성을 높이기 위한 몇 가지 개선사항을 제안드립니다:

  1. 스크린 리더 사용자를 위한 aria-label 추가
  2. 키보드 네비게이션을 위한 포커스 스타일 추가

다음과 같이 개선해보세요:

           <Link
             href="/"
-            className="btn-filled flex h-11 items-center rounded-xl px-16 text-base font-semibold"
+            className="btn-filled flex h-11 items-center rounded-xl px-16 text-base font-semibold focus:ring-2 focus:ring-blue-500 focus:outline-none"
+            aria-label="메인 페이지로 이동"
           >

또한 페이지 전체에 대한 설명을 추가하는 것이 좋습니다:

-    <div className="flex h-screen items-center justify-center">
+    <div className="flex h-screen items-center justify-center" role="main" aria-label="404 페이지를 찾을 수 없습니다">
tailwind.config.ts (1)

132-135: 웨이브 애니메이션 개선 제안

현재 구현된 웨이브 애니메이션에 대해 다음과 같은 개선사항을 제안드립니다:

  1. 자연스러운 움직임을 위해 linear 대신 ease-in-out 타이밍 함수 사용
  2. 애니메이션 속도를 좀 더 부드럽게 조정 (0.8s → 1.5s)
  3. 성능 최적화를 위해 will-change: transform 속성 추가

다음과 같이 수정해보시는 것을 추천드립니다:

  keyframes: {
    wave: {
      '0%': { transform: 'translate(0)' },
      '100%': { transform: 'translate(-30%)' },
    },
  },
  animation: {
-   wave: 'wave 0.8s linear infinite',
+   wave: 'wave 1.5s ease-in-out infinite',
  },

추가로 wave 애니메이션이 적용되는 요소에 다음 클래스를 추가하시면 좋습니다:

.wave-container {
  will-change: transform;
}

Also applies to: 139-139

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between cf27bbb and 207266a.

📒 Files selected for processing (2)
  • src/app/not-found.tsx (1 hunks)
  • tailwind.config.ts (2 hunks)
🔇 Additional comments (2)
src/app/not-found.tsx (1)

1-3: 컴포넌트 선언이 잘 되어있습니다!

Next.js의 Link 컴포넌트를 적절히 사용하고 있으며, 컴포넌트 선언도 모범 사례를 따르고 있습니다.

tailwind.config.ts (1)

85-85: 404 폰트 사이즈 검토 필요

18.75rem(300px)의 큰 폰트 사이즈가 모바일 환경에서 적절한지 확인이 필요합니다.

다음 스크립트로 반응형 처리 여부를 확인해보시기 바랍니다:

Comment on lines 7 to 58
<svg
xmlns="http://www.w3.org/2000/svg"
xmlnsXlink="http://www.w3.org/1999/xlink"
width="567"
height="300"
className="w-full"
viewBox="0 0 567 300"
>
<defs>
<path
id="wave"
d="m-115,50q38-30 75,0t75,0 75,0 75,0
75,0 75,0 75,0 75,0 75,0 75,0 75,0 75,0 75,0 75,0 75,0 75,0 75,0 75,0 75,0 75,0 75,0 75,0
v20 h-1540 v-20"
className="translate-y-[110px]"
/>
<clipPath id="wave-clip-front">
<use className="animate-wave" href="#wave" />
<rect x="0" y="0" width="100%" height="180" />
</clipPath>
<clipPath id="wave-clip-middle">
<use className="animate-wave" href="#wave" />
<rect x="0" y="180" width="100%" height="150" />
</clipPath>
<linearGradient id="grad-front" x1="-22%" y1="0" x2="122%" y2="100%">
<stop offset="0%" stop-color="#60A5FA" stop-opacity="1" />
<stop offset="100%" stop-color="#3388FF" stop-opacity="1" />
</linearGradient>
<text
id="clipped-wave"
x="0"
y="260"
font-family="Helvetica"
font-weight="bold"
font-size="18.75rem"
>
404
</text>
</defs>
<use
href="#clipped-wave"
clip-path="url(#wave-clip-middle)"
fill="url(#grad-front)"
fill-opacity="0.88"
/>
<use
href="#clipped-wave"
clip-path="url(#wave-clip-front)"
fill="url(#grad-front)"
fill-opacity="0.77"
/>
</svg>
Copy link

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

SVG 반응형 처리 개선이 필요합니다.

현재 구현에서 몇 가지 개선이 필요한 부분이 있습니다:

  1. SVG 크기가 고정값으로 설정되어 있어 작은 화면에서 문제가 될 수 있습니다.
  2. 폰트 크기가 하드코딩되어 있어 반응형 처리가 어렵습니다.

다음과 같이 개선해보시는 것은 어떨까요?

-          width="567"
-          height="300"
+          width="100%"
+          height="100%"
+          preserveAspectRatio="xMidYMid meet"
-          font-size="18.75rem"
+          className="text-[18.75rem] md:text-[12rem] sm:text-[8rem]"

Committable suggestion skipped: line range outside the PR's diff.

@github-actions
Copy link

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Outside diff range and nitpick comments (1)
src/app/not-found.tsx (1)

7-8: 테마 브레이크포인트 상수화 제안

브레이크포인트 값을 상수로 분리하면 유지보수성이 향상될 것 같습니다.

다음과 같이 변경해보시는 것은 어떨까요?

+const MOBILE_BREAKPOINT = theme.breakpoints.md;
 export default function NotFound() {
-  const isMobile = useMediaQuery(`(max-width: ${theme.breakpoints.md})`);
+  const isMobile = useMediaQuery(`(max-width: ${MOBILE_BREAKPOINT})`);
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between 207266a and f484044.

📒 Files selected for processing (1)
  • src/app/not-found.tsx (1 hunks)
🔇 Additional comments (3)
src/app/not-found.tsx (3)

1-5: 의존성 및 클라이언트 설정이 적절합니다.

클라이언트 사이드 렌더링과 필요한 의존성들이 올바르게 설정되어 있습니다.


11-12: 레이아웃 구조가 잘 구현되어 있습니다.

반응형 디자인과 중앙 정렬이 적절하게 구현되어 있습니다.


13-64: 이전 리뷰의 SVG 반응형 관련 의견이 여전히 유효합니다.

SVG의 반응형 처리에 대한 이전 리뷰 코멘트가 아직 반영되지 않았습니다.

Comment on lines +65 to +74
<div className="flex w-full flex-col items-center gap-9 pb-10 md:absolute md:-bottom-10 md:translate-y-full">
<p className="text-2xl font-semibold text-gray-900">
&quot;페이지를 찾을 수 없습니다. 😢&quot;
</p>
<Link
href="/"
className="btn-filled flex h-11 items-center rounded-xl px-16 text-base font-semibold"
>
홈으로 가기
</Link>
Copy link

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

접근성 개선이 필요합니다.

스크린 리더 사용자를 위한 접근성 개선이 필요합니다.

다음과 같이 개선해보시는 것은 어떨까요?

-          <p className="text-2xl font-semibold text-gray-900">
+          <p className="text-2xl font-semibold text-gray-900" role="alert">
             &quot;페이지를 찾을 수 없습니다. 😢&quot;
           </p>
           <Link
             href="/"
             className="btn-filled flex h-11 items-center rounded-xl px-16 text-base font-semibold"
+            aria-label="홈페이지로 이동"
           >
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
<div className="flex w-full flex-col items-center gap-9 pb-10 md:absolute md:-bottom-10 md:translate-y-full">
<p className="text-2xl font-semibold text-gray-900">
&quot;페이지를 찾을 없습니다. 😢&quot;
</p>
<Link
href="/"
className="btn-filled flex h-11 items-center rounded-xl px-16 text-base font-semibold"
>
홈으로 가기
</Link>
<div className="flex w-full flex-col items-center gap-9 pb-10 md:absolute md:-bottom-10 md:translate-y-full">
<p className="text-2xl font-semibold text-gray-900" role="alert">
&quot;페이지를 찾을 없습니다. 😢&quot;
</p>
<Link
href="/"
className="btn-filled flex h-11 items-center rounded-xl px-16 text-base font-semibold"
aria-label="홈페이지로 이동"
>
홈으로 가기
</Link>

Copy link
Contributor

@ChoYenii ChoYenii left a comment

Choose a reason for hiding this comment

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

예뻐요

Copy link
Contributor

@HaeJungg HaeJungg left a comment

Choose a reason for hiding this comment

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

수고하셨슴니다!!!

@yulrang yulrang merged commit e605713 into develop Nov 20, 2024
2 checks passed
@coderabbitai coderabbitai bot mentioned this pull request Nov 21, 2024
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Not Found 페이지

4 participants