Skip to content

Conversation

@young-jin-son
Copy link
Collaborator

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

Issue Number

close #301

As-Is

To-Be

  • 검색 결과 없을 때 안내 문구 및 홈 화면 이동 버튼 추가
  • 경로 바 아이콘 제거

Check List

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

Test Screenshot

변경 전 변경 후
image image

(Optional) Additional Description

Summary by CodeRabbit

  • New Features

    • Added a user-friendly message and a button to return home when no routes are found in the route search results.
  • Style

    • Updated typography and color for route time and start time information for improved readability.
    • Adjusted spacing and padding in route progress bar text.
    • Introduced new styles for the "no route" UI state.
  • Bug Fixes

    • Simplified conditional rendering logic for recently used routes, preventing unnecessary rendering.
  • Chores

    • Replaced mock route data with a smaller, updated set focusing on bus and walking segments.
    • Removed icons from route progress bars for a cleaner appearance.

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

coderabbitai bot commented Jul 17, 2025

Walkthrough

This update modifies the route selection UI and supporting mock data. It removes bus and subway icons from the route bar, updates styling for time and route information, adds a "no routes found" UI state, and simplifies conditional rendering logic. The mock route data is replaced with a smaller, bus-focused set.

Changes

File(s) Change Summary
frontend/src/mocks/data/routes.json Replaced all mock route data with a smaller set emphasizing bus and walking segments.
frontend/src/pages/RouteSelectPage/components/RouteResult/RouteList/RouteItem/RouteBar/index.tsx Removed bus/subway icon rendering; reduced minimum bar width constant.
frontend/src/pages/RouteSelectPage/components/RouteResult/RouteList/RouteItem/RouteBar/RouteBar.styled.ts Removed left padding from route progress bar text.
frontend/src/pages/RouteSelectPage/components/RouteResult/RouteList/RouteItem/RouteTimeInfo/RouteTimeInfo.styled.ts Updated font and color styles for total section time display.
frontend/src/pages/RouteSelectPage/components/RouteResult/RouteList/RouteItem/RouteTimeInfo/index.tsx Changed "Fire" icon color from green to gray.
frontend/src/pages/RouteSelectPage/components/RouteResult/RouteList/RouteItem/index.tsx Simplified conditional rendering for recently used box.
frontend/src/pages/RouteSelectPage/components/RouteResult/RouteResult.styled.ts Added new styled components for "no route found" UI state.
frontend/src/pages/RouteSelectPage/components/RouteResult/StartTime/StartTime.styled.ts Changed font style for start time box.
frontend/src/pages/RouteSelectPage/components/RouteResult/index.tsx Added "no routes found" UI with navigation button; uses useNavigate for home redirection.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant RouteResultComponent
    participant Router

    User->>RouteResultComponent: Opens route selection page
    alt Routes found
        RouteResultComponent->>User: Display route list and start button
    else No routes found
        RouteResultComponent->>User: Show "no routes found" message and home button
        User->>RouteResultComponent: Clicks home button
        RouteResultComponent->>Router: Navigate to home page
    end
Loading

Assessment against linked issues

Objective Addressed Explanation
Remove bus and subway icons from the route bar (#301)
Apply route selection page design modifications (#301)

Assessment against linked issues: Out-of-scope changes

No out-of-scope changes found.

Possibly related PRs

  • #63: Introduces initial route selection UI and mock data, which are directly modified in this PR.
  • #194: Adds icons and bus type enhancements to RouteBar, which this PR now removes, making their changes related but in opposition.

Poem

In the warren of routes, the icons are gone,
Bus and subway signs have all hopped on.
A simpler path, some stylish flair,
If no routes are found, don’t despair!
Just press the button, return with glee—
The rabbit’s made the UI clutter-free! 🐇✨

✨ Finishing Touches
  • 📝 Generate Docstrings

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 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/RouteSelectPage/components/RouteResult/RouteResult.styled.ts (1)

31-37: Consider adding interactive states to the button.

The button styling is good overall, but consider adding hover and focus states for better user experience and accessibility.

export const NoRouteButton = styled.button`
  ${({ theme }) => theme.fonts.body15};
  color: ${({ theme }) => theme.colors.gray950};
  border-radius: 0.8rem;
  padding: 0.8rem 1.6rem;
  border: 0.15rem solid ${({ theme }) => theme.colors.gray300};
+
+  &:hover {
+    background-color: ${({ theme }) => theme.colors.gray50};
+  }
+
+  &:focus {
+    outline: 0.2rem solid ${({ theme }) => theme.colors.green600};
+    outline-offset: 0.1rem;
+  }
`;
📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between f83c599 and 0595bf2.

📒 Files selected for processing (9)
  • frontend/src/mocks/data/routes.json (22 hunks)
  • frontend/src/pages/RouteSelectPage/components/RouteResult/RouteList/RouteItem/RouteBar/RouteBar.styled.ts (0 hunks)
  • frontend/src/pages/RouteSelectPage/components/RouteResult/RouteList/RouteItem/RouteBar/index.tsx (1 hunks)
  • frontend/src/pages/RouteSelectPage/components/RouteResult/RouteList/RouteItem/RouteTimeInfo/RouteTimeInfo.styled.ts (1 hunks)
  • frontend/src/pages/RouteSelectPage/components/RouteResult/RouteList/RouteItem/RouteTimeInfo/index.tsx (1 hunks)
  • frontend/src/pages/RouteSelectPage/components/RouteResult/RouteList/RouteItem/index.tsx (1 hunks)
  • frontend/src/pages/RouteSelectPage/components/RouteResult/RouteResult.styled.ts (1 hunks)
  • frontend/src/pages/RouteSelectPage/components/RouteResult/StartTime/StartTime.styled.ts (1 hunks)
  • frontend/src/pages/RouteSelectPage/components/RouteResult/index.tsx (3 hunks)
💤 Files with no reviewable changes (1)
  • frontend/src/pages/RouteSelectPage/components/RouteResult/RouteList/RouteItem/RouteBar/RouteBar.styled.ts
🔇 Additional comments (12)
frontend/src/mocks/data/routes.json (1)

1-424: Mock data updates look structurally sound.

The route data structure is consistent and contains all required fields for the UI components. The timing values and route details appear realistic for transit planning.

frontend/src/pages/RouteSelectPage/components/RouteResult/RouteList/RouteItem/RouteBar/index.tsx (1)

6-6: Reduced minimum bar width aligns with icon removal.

The reduction from 11 to 6 pixels makes sense given that route bar icons were removed, allowing for more granular display of smaller time segments.

frontend/src/pages/RouteSelectPage/components/RouteResult/StartTime/StartTime.styled.ts (1)

4-4: Font weight update improves visual hierarchy.

The change from label14Med to label14Semi provides better visual emphasis for the start time display.

frontend/src/pages/RouteSelectPage/components/RouteResult/RouteList/RouteItem/RouteTimeInfo/index.tsx (1)

18-18: Icon color update creates more subtle visual hierarchy.

The change from green600 to gray400 provides a more neutral appearance that aligns with the overall design updates.

frontend/src/pages/RouteSelectPage/components/RouteResult/RouteList/RouteItem/index.tsx (1)

19-19: Improved conditional rendering with logical AND operator.

The change from ternary to logical AND is more idiomatic and cleaner than returning an empty string.

frontend/src/pages/RouteSelectPage/components/RouteResult/RouteList/RouteItem/RouteTimeInfo/RouteTimeInfo.styled.ts (2)

16-17: Good design hierarchy improvement.

The font size increase from label14Med to body15 and color change from gray500 to gray400 creates better visual hierarchy by making the section time box less prominent while maintaining readability.


24-24: Improved text contrast.

Changing the total section time color from gray800 to gray900 improves readability by increasing contrast, which is good for accessibility.

frontend/src/pages/RouteSelectPage/components/RouteResult/index.tsx (3)

2-2: LGTM: Proper hook import.

The addition of useNavigate import is correctly implemented for programmatic navigation.


17-21: LGTM: Clean navigation implementation.

The goToHome function is correctly implemented using the useNavigate hook to redirect users to the root path.


52-71: Excellent empty state implementation.

The conditional rendering for the "no routes found" state provides a great user experience by:

  • Clearly communicating the issue to users
  • Providing actionable next steps with the "처음으로 가기" button
  • Maintaining the existing functionality when routes are available

The implementation follows React best practices with clean conditional rendering.

frontend/src/pages/RouteSelectPage/components/RouteResult/RouteResult.styled.ts (2)

13-20: Well-structured empty state container.

The NoRouteContainer styling provides good layout structure with appropriate spacing and centering for the empty state UI.


22-29: Good typography for informational text.

The NoRouteText styling uses appropriate font weight and color for secondary messaging, with proper alignment for multi-line text display.

@young-jin-son young-jin-son merged commit 0fb41ca into develop Jul 17, 2025
3 checks passed
@young-jin-son young-jin-son deleted the refactor/#301 branch July 17, 2025 10:10
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