Skip to content

Conversation

@young-jin-son
Copy link
Collaborator

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

Issue Number

close #322

As-Is

  • 경로 검색 시 로딩 처리가 되어 있지 않았음

To-Be

-[x] 경로 검색 로딩 처리 추가

Check List

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

Test Screenshot

수정 전 수정 후
2025-07-25.21.41.59.mov
2025-07-25.21.39.59.mov

(Optional) Additional Description

Summary by CodeRabbit

  • New Features

    • Added a loading indicator with a message and icon while route data is being fetched on the route selection page.
  • Style

    • Introduced a new styled container for loading states, ensuring content is centered and visually spaced.

@young-jin-son young-jin-son self-assigned this Jul 25, 2025
@young-jin-son young-jin-son added feat 새로운 기능 구현 FE 프론트엔드 작업 labels Jul 25, 2025
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jul 25, 2025

Walkthrough

A loading state was added to the route search results page. A new styled component for the loading UI was introduced, and the main component now conditionally renders a loading indicator with an icon and message while route data is being fetched. No existing logic or exported interfaces were changed.

Changes

File(s) Change Summary
frontend/src/pages/RouteSelectPage/components/RouteResult/RouteResult.styled.ts Added LoadingContainer styled component with flex column, centered alignment, and gap styling.
frontend/src/pages/RouteSelectPage/components/RouteResult/index.tsx Updated to handle isLoading from query; renders loading UI with icon and message when loading.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant RouteResult
    participant useSearchRoutesQuery

    User->>RouteResult: Visit RouteResult page
    RouteResult->>useSearchRoutesQuery: Fetch route data
    alt isLoading
        RouteResult->>User: Show loading indicator (icon + message)
    else data loaded
        alt No routes found
            RouteResult->>User: Show "no results" message and home button
        else Routes found
            RouteResult->>User: Show route list and start button
        end
    end
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~7 minutes

Poem

🥕
The routes are loading, please don't fret,
A fire icon glows—no need to sweat!
With flex and gap, the styles align,
Soon your journey will be just fine.
As you wait, this bunny grins—
The path ahead, your trip begins!

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 feat/#322

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

54-62: Consider improving the loading UI design and semantic structure.

The loading state implementation works functionally, but there are a few areas for improvement:

  1. Icon choice: The Fire icon seems unusual for a loading indicator. Consider using a more conventional loading icon like a spinner or hourglass.

  2. Semantic structure: Reusing NoRouteContainer and NoRouteText for loading state isn't semantically correct. Consider using the LoadingContainer directly without nesting.

  3. Internationalization: The Korean text is hardcoded. Consider using a translation system for better maintainability.

Here's a suggested improvement:

-      {isLoading ? (
-        <S.NoRouteContainer>
-          <S.NoRouteText>
-            <S.LoadingContainer>
-              <Icon icon="Fire" width={150} height={150} color={theme.colors.green600} />
-              <span>조금만 기다려주세요!</span>
-            </S.LoadingContainer>
-          </S.NoRouteText>
-        </S.NoRouteContainer>
+      {isLoading ? (
+        <S.LoadingContainer style={{ paddingTop: '8rem' }}>
+          <Icon icon="Loading" width={150} height={150} color={theme.colors.green600} />
+          <span style={{ ...theme.fonts.body15Med, color: theme.colors.gray600 }}>
+            조금만 기다려주세요!
+          </span>
+        </S.LoadingContainer>

</blockquote></details>

</blockquote></details>

<details>
<summary>📜 Review details</summary>

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


<details>
<summary>📥 Commits</summary>

Reviewing files that changed from the base of the PR and between cc7cecadbb87593b4b4b1fbfd2c54fc3f49035ee and e323cd8417abfbc18266c98e8a5270eb83dfbb0a.

</details>

<details>
<summary>📒 Files selected for processing (2)</summary>

* `frontend/src/pages/RouteSelectPage/components/RouteResult/RouteResult.styled.ts` (1 hunks)
* `frontend/src/pages/RouteSelectPage/components/RouteResult/index.tsx` (2 hunks)

</details>

<details>
<summary>🔇 Additional comments (3)</summary><blockquote>

<details>
<summary>frontend/src/pages/RouteSelectPage/components/RouteResult/RouteResult.styled.ts (1)</summary>

`61-67`: **LGTM! Clean and consistent styled component implementation.**

The `LoadingContainer` follows the established patterns in the file with proper flex centering and consistent spacing. The implementation aligns well with the existing `NoRouteContainer` component.

</details>
<details>
<summary>frontend/src/pages/RouteSelectPage/components/RouteResult/index.tsx (2)</summary>

`8-8`: **LGTM! Proper imports for loading UI components.**

The addition of `Icon` and `theme` imports supports the new loading state implementation.




Also applies to: 12-12

---

`16-16`: **Good destructuring update for loading state.**

Renaming `data` to `routes` improves code readability, and adding `isLoading` enables proper loading state handling.

</details>

</blockquote></details>

</details>

<!-- This is an auto-generated comment by CodeRabbit for review status -->

@young-jin-son young-jin-son merged commit 866d65e into develop Jul 25, 2025
3 checks passed
@young-jin-son young-jin-son deleted the feat/#322 branch July 25, 2025 12:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

FE 프론트엔드 작업 feat 새로운 기능 구현

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEAT] 경로 검색 로딩 처리

2 participants