Skip to content

Conversation

@976520
Copy link
Owner

@976520 976520 commented Dec 26, 2025

vitepress

@976520 976520 self-assigned this Dec 26, 2025
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @976520, 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은 scrolloop 라이브러리를 위한 공식 문서 웹사이트를 VitePress를 활용하여 새롭게 구축합니다. 라이브러리의 핵심 개념부터 각 컴포넌트의 상세한 사용법, API 참조, 그리고 서버 사이드 렌더링(SSR) 지원에 이르기까지 모든 정보를 체계적으로 제공합니다. 특히, 가상 스크롤의 작동 원리를 시각적으로 보여주는 대화형 데모와 동적인 홈페이지 요소를 포함하여 사용자의 이해를 돕고 몰입도를 높이는 데 중점을 두었습니다.

Highlights

  • VitePress 문서 사이트 초기 설정: VitePress를 사용하여 scrolloop 프로젝트의 문서 사이트를 구축하기 위한 기본 설정 파일 docs/.vitepress/config.ts가 추가되었습니다. 이 파일은 사이트의 제목, 설명, 네비게이션 바, 사이드바 구조, GitHub 링크, 그리고 로컬 검색 기능을 정의합니다.
  • 동적인 홈페이지 컴포넌트 구현: docs/.vitepress/theme/ 디렉토리에 Home.vue, Hero.vue, Demo.vue, Particles.vue, SlotMachine.vue 등 여러 Vue 컴포넌트가 추가되었습니다. 이 컴포넌트들은 동적인 숫자 카운터 애니메이션, 가상 스크롤 데모, 배경 파티클 효과 등을 통해 사용자 경험을 향상시키는 홈페이지 레이아웃을 구성합니다.
  • 가상화 개념 시각화 도구 추가: docs/.vitepress/theme/VirtualizationVisualizer.vue 컴포넌트가 추가되어 가상 스크롤의 핵심 개념인 windowingoverscan을 대화형으로 시각화하여 사용자가 쉽게 이해할 수 있도록 돕습니다.
  • 상세 문서 콘텐츠 추가: docs/guide/ 디렉토리에 concepts.md, infinite-list.md, introduction.md, quick-start.md, ssr.md, virtual-list.md 파일들이 추가되었습니다. 이 문서들은 scrolloop 라이브러리의 소개, 핵심 개념, 각 컴포넌트의 사용법 및 API, 그리고 서버 사이드 렌더링(SSR) 가이드 등 포괄적인 정보를 제공합니다.
  • 빌드 관련 파일 및 의존성 업데이트: .gitignore 파일에 cache/ 디렉토리가 추가되어 빌드 캐시 파일이 버전 관리에서 제외됩니다. 또한, package.json에 VitePress 관련 스크립트(docs:dev, docs:build, docs:preview)와 vitepress, vue 의존성이 추가 및 업데이트되었습니다.
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.

@github-actions
Copy link

📊 Test Coverage Report (vitest)

Package Statements Branches Functions Lines
@scrolloop/core 188/188 (100%) 46/46 (100%) 23/23 (100%) 188/188 (100%)
@scrolloop/react 604/950 (63.57%) 112/133 (84.21%) 7/21 (33.33%) 604/950 (63.57%)
@scrolloop/react-native 0/237 (0%) 1/4 (25%) 1/4 (25%) 0/237 (0%)
@scrolloop/shared 0/119 (0%) 1/7 (14.28%) 1/7 (14.28%) 0/119 (0%)

Copy link
Contributor

@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

VitePress를 사용하여 문서 페이지를 구축하는 PR이네요. 전반적으로 깔끔하게 구성되었으며, 특히 인터랙티브한 데모와 시각화 자료를 통해 라이브러리의 핵심 개념을 잘 설명하고 있습니다. 몇 가지 개선점과 잠재적인 버그를 발견하여 리뷰를 남깁니다. 특히 Hero.vue 컴포넌트의 메모리 누수 문제는 꼭 수정이 필요해 보입니다.

Comment on lines 5 to 67
const millionsCount = ref(0);
const kbCount = ref(0);

const animateCountUp = (targetValue, duration, callback) => {
const startTime = performance.now();
const startValue = 0;

const animate = (currentTime) => {
const elapsed = currentTime - startTime;
const progress = Math.min(elapsed / duration, 1);

const easeInOutCubic =
progress < 0.5
? 4 * progress * progress * progress
: 1 - Math.pow(-2 * progress + 2, 3) / 2;

const currentValue = Math.floor(
startValue + (targetValue - startValue) * easeInOutCubic
);
callback(currentValue);

if (progress < 1) {
requestAnimationFrame(animate);
} else {
callback(targetValue);
}
};

requestAnimationFrame(animate);
};

const startInitialAnimation = () => {
animateCountUp(42, 1500, (value) => {
kbCount.value = value;
});

animateCountUp(1048596, 2500, (value) => {
millionsCount.value = value;
if (value >= 1048596) {
if (!window.__incrementStarted) {
window.__incrementStarted = true;
setInterval(() => {
millionsCount.value += Math.floor(Math.random() * 8) + 2;
}, 100);
}
}
});
};

const scrolled = ref(false);

const handleScroll = () => {
scrolled.value = window.scrollY > 50;
};

onMounted(() => {
startInitialAnimation();
window.addEventListener("scroll", handleScroll);
});

onUnmounted(() => {
window.removeEventListener("scroll", handleScroll);
});
Copy link
Contributor

Choose a reason for hiding this comment

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

critical

setInterval이 컴포넌트가 unmount될 때 정리되지 않아 메모리 누수가 발생할 수 있습니다. 또한, window.__incrementStarted와 같이 전역 window 객체에 상태를 저장하는 것은 사이드 이펙트를 유발할 수 있으므로 피하는 것이 좋습니다. setInterval의 ID와 시작 상태를 컴포넌트 내부 ref로 관리하고, onUnmounted에서 clearInterval을 호출하여 타이머를 정리하도록 수정했습니다.

const millionsCount = ref(0);
const kbCount = ref(0);
const incrementInterval = ref(null);
const incrementStarted = ref(false);

const animateCountUp = (targetValue, duration, callback) => {
  const startTime = performance.now();
  const startValue = 0;

  const animate = (currentTime) => {
    const elapsed = currentTime - startTime;
    const progress = Math.min(elapsed / duration, 1);

    const easeInOutCubic =
      progress < 0.5
        ? 4 * progress * progress * progress
        : 1 - Math.pow(-2 * progress + 2, 3) / 2;

    const currentValue = Math.floor(
      startValue + (targetValue - startValue) * easeInOutCubic
    );
    callback(currentValue);

    if (progress < 1) {
      requestAnimationFrame(animate);
    } else {
      callback(targetValue);
    }
  };

  requestAnimationFrame(animate);
};

const startInitialAnimation = () => {
  animateCountUp(42, 1500, (value) => {
    kbCount.value = value;
  });

  animateCountUp(1048596, 2500, (value) => {
    millionsCount.value = value;
    if (value >= 1048596) {
      if (!incrementStarted.value) {
        incrementStarted.value = true;
        incrementInterval.value = setInterval(() => {
          millionsCount.value += Math.floor(Math.random() * 8) + 2;
        }, 100);
      }
    }
  });
};

const scrolled = ref(false);

const handleScroll = () => {
  scrolled.value = window.scrollY > 50;
};

onMounted(() => {
  startInitialAnimation();
  window.addEventListener("scroll", handleScroll);
});

onUnmounted(() => {
  window.removeEventListener("scroll", handleScroll);
  if (incrementInterval.value) {
    clearInterval(incrementInterval.value);
  }
});

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
@github-actions
Copy link

📊 Test Coverage Report (vitest)

Package Statements Branches Functions Lines
@scrolloop/core 188/188 (100%) 46/46 (100%) 23/23 (100%) 188/188 (100%)
@scrolloop/react 604/950 (63.57%) 112/133 (84.21%) 7/21 (33.33%) 604/950 (63.57%)
@scrolloop/react-native 0/237 (0%) 1/4 (25%) 1/4 (25%) 0/237 (0%)
@scrolloop/shared 0/119 (0%) 1/7 (14.28%) 1/7 (14.28%) 0/119 (0%)

@github-actions
Copy link

📊 Test Coverage Report (vitest)

Package Statements Branches Functions Lines
@scrolloop/core 188/188 (100%) 46/46 (100%) 23/23 (100%) 188/188 (100%)
@scrolloop/react 604/950 (63.57%) 112/133 (84.21%) 7/21 (33.33%) 604/950 (63.57%)
@scrolloop/react-native 0/237 (0%) 1/4 (25%) 1/4 (25%) 0/237 (0%)
@scrolloop/shared 0/119 (0%) 1/7 (14.28%) 1/7 (14.28%) 0/119 (0%)

@github-actions
Copy link

📊 Test Coverage Report (vitest)

Package Statements Branches Functions Lines
@scrolloop/core 188/188 (100%) 46/46 (100%) 23/23 (100%) 188/188 (100%)
@scrolloop/react 604/950 (63.57%) 112/133 (84.21%) 7/21 (33.33%) 604/950 (63.57%)
@scrolloop/react-native 0/237 (0%) 1/4 (25%) 1/4 (25%) 0/237 (0%)
@scrolloop/shared 0/119 (0%) 1/7 (14.28%) 1/7 (14.28%) 0/119 (0%)

@976520 976520 merged commit 2057602 into develop Dec 26, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants