Skip to content

Conversation

@young-jin-son
Copy link
Collaborator

@young-jin-son young-jin-son commented Jul 25, 2025

Issue Number

close #320

As-Is

  • 랜딩 페이지의 각 서비스 가이드 컴포넌트마다 로그인 버튼이 각각 존재하여 UX 일관성 저하됨

To-Be

  • 로그인 버튼을 LandingPage에 하나로 통합
  • 스크롤 위치를 기준으로 버튼 위치를 상단/하단으로 동적으로 조정

Check List

  • 테스트가 전부 통과되었나요?
  • 모든 commit이 push 되었나요?
  • merge할 branch를 확인했나요?
  • Assignee를 지정했나요?
  • Label을 지정했나요?

Test Screenshot

수정 전 수정 후
2025-07-25.19.03.09.mov
2025-07-25.19.08.15.mov

(Optional) Additional Description

Summary by CodeRabbit

  • New Features

    • Added a login button that dynamically adjusts its position based on scroll position on the landing page.
  • Style

    • Improved spacing and layout for guide sections, including updated margins, padding, and layout gaps.
    • Enhanced the positioning and animation of the login button for better visibility.
  • Refactor

    • Relocated the login button from individual guide components to a centralized location on the landing page.

@young-jin-son young-jin-son self-assigned this Jul 25, 2025
@young-jin-son young-jin-son added refactor 코드 리팩토링 (기능은 그대로인데, 코드 개선, 폴더 변경, 변수명/함수명 수정) design css와 같은 스타일링 FE 프론트엔드 작업 labels Jul 25, 2025
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jul 25, 2025

Walkthrough

The changes consolidate multiple instances of the login button across various landing page guide components into a single, fixed-position login button on the main landing page. The button's vertical position dynamically adjusts based on scroll position using a new state. Associated style and layout adjustments are made, and redundant button code is removed from subcomponents.

Changes

Files/Paths Change Summary
LandingPage/index.tsx, LandingPage.styled.ts Added scroll tracking, single login button with dynamic position, and new styled wrapper.
.../GuideIntro/index.tsx, .../GuideOutro/index.tsx, .../GuideSlide/index.tsx Removed import and rendering of redundant LoginButton component.
.../GuideSlide/GuideSlide.styled.ts Changed layout gap to percentage, removed ButtonContainer styled component.
.../GuideIntro/GuideIntro.styled.ts Added margin-top: 10rem; to ScrollDownContainer for spacing.
.../GuideOutro/GuideOutro.styled.ts Added padding-bottom: 9rem; to GuideOutroLayout for spacing.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant LandingPage
    participant LoginButtonWrapper

    User->>LandingPage: Scrolls page
    LandingPage->>LandingPage: Updates isIntro state based on scroll position
    LandingPage->>LoginButtonWrapper: Passes isIntro prop
    LoginButtonWrapper->>User: Renders LoginButton at dynamic position
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

🐇
Hopping through code, what a sight—
One login button, placed just right!
No more clones in every guide,
Now it scrolls and shifts with pride.
With every scroll, the button glows,
A tidy landing, as the rabbit knows!

Note

⚡️ Unit Test Generation is now available in beta!

Learn more here, or try it out under "Finishing Touches" below.

✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch refactor/#320

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ 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.
    • Explain this complex logic.
    • 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 explain this code block.
    • @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 explain its main purpose.
    • @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.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

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 generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this 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.

Copy link
Contributor

@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: 0

🧹 Nitpick comments (1)
frontend/src/pages/LandingPage/index.tsx (1)

15-32: Well-implemented scroll tracking with proper cleanup.

The scroll event handling is correctly implemented with proper event listener cleanup. The logic appropriately tracks whether the user is in the intro section.

Consider throttling the scroll events for better performance, especially on lower-end devices:

+ import { useCallback } from 'react';
+
+ // Add throttle utility or use a custom hook
+ const useThrottledCallback = (callback: Function, delay: number) => {
+   const [throttledCallback, setThrottledCallback] = useState(null);
+   
+   useEffect(() => {
+     const handler = setTimeout(() => {
+       setThrottledCallback(null);
+     }, delay);
+     
+     if (!throttledCallback) {
+       setThrottledCallback(callback);
+       callback();
+     }
+     
+     return () => clearTimeout(handler);
+   }, [callback, delay, throttledCallback]);
+ };

    const handleScroll = () => {
      const scrollTop = scrollContainer.scrollTop;
      const viewportHeight = window.innerHeight;
      setIsIntro(scrollTop < viewportHeight * 0.5);
    };

+   const throttledHandleScroll = useThrottledCallback(handleScroll, 16); // ~60fps
-   scrollContainer.addEventListener('scroll', handleScroll);
+   scrollContainer.addEventListener('scroll', throttledHandleScroll);
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9afa1b3 and 10a90a4.

📒 Files selected for processing (8)
  • frontend/src/pages/LandingPage/LandingPage.styled.ts (1 hunks)
  • frontend/src/pages/LandingPage/components/ServiceGuide/GuideIntro/GuideIntro.styled.ts (1 hunks)
  • frontend/src/pages/LandingPage/components/ServiceGuide/GuideIntro/index.tsx (0 hunks)
  • frontend/src/pages/LandingPage/components/ServiceGuide/GuideOutro/GuideOutro.styled.ts (1 hunks)
  • frontend/src/pages/LandingPage/components/ServiceGuide/GuideOutro/index.tsx (0 hunks)
  • frontend/src/pages/LandingPage/components/ServiceGuide/GuideSlide/GuideSlide.styled.ts (1 hunks)
  • frontend/src/pages/LandingPage/components/ServiceGuide/GuideSlide/index.tsx (0 hunks)
  • frontend/src/pages/LandingPage/index.tsx (1 hunks)
💤 Files with no reviewable changes (3)
  • frontend/src/pages/LandingPage/components/ServiceGuide/GuideOutro/index.tsx
  • frontend/src/pages/LandingPage/components/ServiceGuide/GuideSlide/index.tsx
  • frontend/src/pages/LandingPage/components/ServiceGuide/GuideIntro/index.tsx
🔇 Additional comments (8)
frontend/src/pages/LandingPage/components/ServiceGuide/GuideOutro/GuideOutro.styled.ts (1)

19-19: LGTM! Proper spacing adjustment for fixed login button.

The added bottom padding appropriately accommodates the new fixed-position login button, ensuring the outro content isn't obscured by the overlay.

frontend/src/pages/LandingPage/components/ServiceGuide/GuideIntro/GuideIntro.styled.ts (1)

25-25: LGTM! Appropriate spacing adjustment.

The added top margin properly positions the scroll down container to work with the new unified login button layout.

frontend/src/pages/LandingPage/components/ServiceGuide/GuideSlide/GuideSlide.styled.ts (1)

15-15: Good responsive design improvement.

Changing from fixed 5rem to relative 10% gap makes the layout more responsive and adaptive to different screen sizes, which aligns well with the centralized login button approach.

Consider testing this on very large and very small screens to ensure the 10% gap maintains appropriate visual balance across all viewport sizes.

frontend/src/pages/LandingPage/LandingPage.styled.ts (1)

19-29: Floating login button styling approved with no z-index conflicts

I’ve searched the codebase and found no other usages of z-index above 10, so the z-index: 100 on LoginButtonWrapper won’t collide with existing layers. Everything else looks solid.

• Continue with your cross-device and orientation tests to ensure the 28%/6% bottom offsets feel natural on all viewports.
• No further changes needed for z-index.

frontend/src/pages/LandingPage/index.tsx (4)

1-2: LGTM! Proper imports for the new functionality.

The added React hooks (useEffect, useState, useRef) are correctly imported for implementing the scroll tracking feature.


9-9: LGTM! LoginButton import added for centralized rendering.

The LoginButton import supports the new unified approach where the button is rendered at the landing page level instead of in individual guide components.


12-13: Good state management for scroll-based positioning.

The isIntro state and scrollContainerRef are properly declared to support the dynamic login button positioning based on scroll position.


35-46: Confirm scroll threshold aligns with intro height

The scroll handler in frontend/src/pages/LandingPage/index.tsx uses

setIsIntro(scrollTop < window.innerHeight * 0.5);

This assumes <GuideIntro> occupies exactly half the viewport. Please verify that this 0.5 multiplier corresponds to the rendered height of the intro section. You can:

  • Check that <GuideIntro>’s CSS or styled-component sets its height to 50vh (or otherwise equals half of window.innerHeight).
  • If its height differs or is dynamic, compute the threshold from the actual element size, for example:
    const introEl = scrollContainer.querySelector('#guide-intro') as HTMLElement;
    const introHeight = introEl.offsetHeight;
    setIsIntro(scrollTop < introHeight);

Adjust the multiplier or implementation so that isIntro flips exactly when users finish viewing the intro.

@young-jin-son young-jin-son merged commit a4ad3ae into develop Jul 25, 2025
3 checks passed
@young-jin-son young-jin-son deleted the refactor/#320 branch July 25, 2025 10:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

design css와 같은 스타일링 FE 프론트엔드 작업 refactor 코드 리팩토링 (기능은 그대로인데, 코드 개선, 폴더 변경, 변수명/함수명 수정)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[REFACTOR] 랜딩페이지 로그인 버튼 통합 및 위치 조정 로직 적용

2 participants