Skip to content

Conversation

@toothlessdev
Copy link
Member

✅ Linked Issue

🔍 What I did

  • 페이지 전환시 ProgressBar 추가
    • nprogressbar 패키지 의존성 추가
    • _app.tsx 에서 ProgressBar 설정
2025-07-18.2.08.49.mov

💡 Why I did it

  • getServerSideProps, getStaticProps 에서 ISR fallback 시에 ProgressBar 표시하기 위함

@vercel
Copy link

vercel bot commented Jul 17, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
mosu-client ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 17, 2025 5:12pm

@toothlessdev toothlessdev moved this to 진행중 in mosu-client Jul 17, 2025
Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Summary of Changes

Hello @toothlessdev, 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!

This pull request introduces a global progress bar to enhance the user experience during page navigation within the Next.js application. By displaying a progress indicator, users are kept informed during loading states, particularly when data fetching mechanisms like getServerSideProps or getStaticProps with ISR fallback are active.

Highlights

  • Progress Bar Integration: I've integrated the nprogress library to display a visual progress bar during page transitions in the application. This provides immediate feedback to users when navigating between pages.
  • Next.js Router Event Handling: The progress bar is configured in _app.tsx to automatically start when a Next.js route change begins (routeChangeStart) and to complete when the route change finishes, whether successfully or with an error (routeChangeComplete, routeChangeError). The spinner is hidden for a cleaner look.
  • Dependency Management: The nprogress package and its corresponding TypeScript types (@types/nprogress) have been added to the project's dependencies.
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 in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.

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 issue 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 is currently in preview and 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 to provide feedback.

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.

@github-actions
Copy link

github-actions bot commented Jul 17, 2025

Warnings
⚠️ package.json이 변경되었습니다. 새로운 의존성이 추가되었다면 필요성을 설명해주세요.
Messages
📖 ✅ PR 제목에 이슈 번호가 포함되어 있습니다.
📖 ✅ PR에 Reviewers가 지정되어 있습니다.
📖 ✅ PR에 라벨이 지정되어 있습니다.
📖 ✅ PR에 Assignees가 지정되어 있습니다.
📖 ✅ 브랜치 이름 'feature#160'이 컨벤션을 따릅니다.
📖 ✅ TypeScript 컴파일이 성공적으로 완료되었습니다.
📖 ✅ ESLint 검사 결과 문제가 없습니다.

📦 Package 변경사항

  • mosu-app/package.json

📝 추가 및 변경된 파일

총 4개 파일 변경

├── 📂 .github/
│   └── 📂 workflows/
│       └── ⚙️ mosu-app-e2e.yml
├── 📂 mosu-app/
│   ├── 📋 package.json
│   └── 📂 src/
│       └── 📂 pages/
│           └── ⚛️ _app.tsx
└── 📄 yarn.lock

Generated by 🚫 dangerJS against f64ba57

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

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 a progress bar for page transitions. I suggest refactoring the event listener logic into a useEffect hook within the App component for better lifecycle management and to prevent potential memory leaks.

Comment on lines +21 to +31
NProgress.configure({ showSpinner: false });

Router.events.on("routeChangeStart", () => {
NProgress.start();
});
Router.events.on("routeChangeComplete", () => {
NProgress.done();
});
Router.events.on("routeChangeError", () => {
NProgress.done();
});

Choose a reason for hiding this comment

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

high

Consider encapsulating the NProgress configuration and event listener setup within a useEffect hook. This ensures proper lifecycle management, especially regarding cleanup to avoid potential memory leaks or unexpected behavior during hot module replacement. It also centralizes the logic related to the progress bar within the component.

Here's a suggested refactor:

useEffect(() => {
  NProgress.configure({ showSpinner: false });

  const handleStart = () => NProgress.start();
  const handleStop = () => NProgress.done();

  Router.events.on("routeChangeStart", handleStart);
  Router.events.on("routeChangeComplete", handleStop);
  Router.events.on("routeChangeError", handleStop);

  return () => {
    Router.events.off("routeChangeStart", handleStart);
    Router.events.off("routeChangeComplete", handleStop);
    Router.events.off("routeChangeError", handleStop);
  };
}, []);

@github-actions
Copy link

📚 Storybook이 Chromatic에 배포되었습니다!

@github-actions
Copy link

📚 Storybook이 Chromatic에 배포되었습니다!

Copy link
Contributor

@kimgho kimgho left a comment

Choose a reason for hiding this comment

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

👍

Comment on lines +21 to +22
NProgress.configure({ showSpinner: false });

Copy link
Contributor

Choose a reason for hiding this comment

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

이런것도 있군용

@toothlessdev toothlessdev merged commit 09a4330 into main Jul 17, 2025
11 checks passed
@github-project-automation github-project-automation bot moved this from 진행중 to 완료 in mosu-client Jul 17, 2025
@toothlessdev toothlessdev deleted the feature#160 branch August 3, 2025 21:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: 완료

Development

Successfully merging this pull request may close these issues.

[✨ 기능 요청] 페이지 전환 ProgressBar UI 추가

3 participants