Skip to content

[feature] 관리자 페이지 Enter키 로그인 기능 추가#411

Merged
seongwon030 merged 5 commits intodevelop-fefrom
feature/#410-adminPage-login-enter-key-support-FE-116
May 15, 2025
Merged

[feature] 관리자 페이지 Enter키 로그인 기능 추가#411
seongwon030 merged 5 commits intodevelop-fefrom
feature/#410-adminPage-login-enter-key-support-FE-116

Conversation

@seongwon030
Copy link
Member

@seongwon030 seongwon030 commented May 15, 2025

#️⃣연관된 이슈

ex) #410

📝작업 내용

onSubmit 추가

  • Button 의 interface에 type추가 a45168e
  • e.preventDefault();으로 submit 시 새로고침 방지 4bf5e2c

중점적으로 리뷰받고 싶은 부분(선택)

리뷰어가 특별히 봐주었으면 하는 부분이 있다면 작성해주세요

ex) 메서드 XXX의 이름을 더 잘 짓고 싶은데 혹시 좋은 명칭이 있을까요?

논의하고 싶은 부분(선택)

논의하고 싶은 부분이 있다면 작성해주세요.

🫡 참고사항

Summary by CodeRabbit

  • New Features

    • 로그인 폼이 새로운 스타일로 적용되어 입력 필드와 버튼이 일관된 레이아웃으로 정렬됩니다.
  • Refactor

    • 로그인 버튼이 이제 폼 제출 방식으로 동작하며, Enter 키로도 로그인을 시도할 수 있습니다.
    • 버튼 컴포넌트에서 onClick 핸들러가 필수가 아니게 되었고, type 속성을 선택적으로 지정할 수 있습니다.

@seongwon030 seongwon030 requested a review from oesnuj May 15, 2025 06:15
@seongwon030 seongwon030 self-assigned this May 15, 2025
@seongwon030 seongwon030 added ✨ Feature 기능 개발 💻 FE Frontend labels May 15, 2025
@netlify
Copy link

netlify bot commented May 15, 2025

Deploy Preview for moadong ready!

Name Link
🔨 Latest commit a34ebfc
🔍 Latest deploy log https://app.netlify.com/projects/moadong/deploys/682589d5b0a7bf00084fac32
😎 Deploy Preview https://deploy-preview-411--moadong.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 42
Accessibility: 87
Best Practices: 92
SEO: 92
PWA: -
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented May 15, 2025

"""

Walkthrough

로그인 탭의 입력 필드와 버튼을 새로운 <LoginForm> 폼 요소로 감싸고, 버튼의 타입을 "submit"으로 지정하여 Enter 키로 로그인할 수 있도록 변경했습니다. Button 컴포넌트는 onClick을 선택적으로, type 속성을 추가하도록 인터페이스가 수정되었습니다. 스타일 파일에는 새로운 LoginForm 스타일 컴포넌트가 추가되었습니다.

Changes

파일/경로 변경 요약
frontend/src/components/common/Button/Button.tsx ButtonProps의 onClick을 선택적으로 변경, type 속성 추가
frontend/src/pages/AdminPage/auth/LoginTab/LoginTab.styles.ts 새로운 스타일드 컴포넌트 LoginForm(form 요소) 추가
frontend/src/pages/AdminPage/auth/LoginTab/LoginTab.tsx 입력 필드와 버튼을 LoginForm으로 감싸고, 버튼 onClick 제거, type="submit"으로 변경, 폼 submit 핸들러 추가

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant LoginTab
    participant LoginForm
    participant handleLogin

    User->>LoginTab: 페이지 진입
    User->>LoginForm: 아이디/비밀번호 입력
    User->>LoginForm: Enter 키 입력 또는 로그인 버튼 클릭
    LoginForm->>handleLogin: onSubmit 호출
    handleLogin-->>LoginTab: 로그인 처리 결과 반환
Loading

Assessment against linked issues

Objective (이슈 번호) Addressed Explanation
form으로 감싸기 (FE-116)
Enter 키 로그인 기능 추가 (FE-116)

Possibly related issues

Possibly related PRs

Suggested reviewers

  • uuhagyeong
    """

Note

⚡️ AI Code Reviews for VS Code, Cursor, Windsurf

CodeRabbit now has a plugin for VS Code, Cursor and Windsurf. This brings AI code reviews directly in the code editor. Each commit is reviewed immediately, finding bugs before the PR is raised. Seamless context handoff to your AI code agent ensures that you can easily incorporate review feedback.
Learn more here.


Note

⚡️ Faster reviews with caching

CodeRabbit now supports caching for code and dependencies, helping speed up reviews. This means quicker feedback, reduced wait times, and a smoother review experience overall. Cached data is encrypted and stored securely. This feature will be automatically enabled for all accounts on May 16th. To opt out, configure Review - Disable Cache at either the organization or repository level. If you prefer to disable all data retention across your organization, simply turn off the Data Retention setting under your Organization Settings.
Enjoy the performance boost—your workflow just got faster.


📜 Recent review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 4bf5e2c and a34ebfc.

📒 Files selected for processing (1)
  • frontend/src/components/common/Button/Button.tsx (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • frontend/src/components/common/Button/Button.tsx
✨ 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.

@seongwon030 seongwon030 linked an issue May 15, 2025 that may be closed by this pull request
1 task
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: 1

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 9b3b36b and 4bf5e2c.

📒 Files selected for processing (3)
  • frontend/src/components/common/Button/Button.tsx (1 hunks)
  • frontend/src/pages/AdminPage/auth/LoginTab/LoginTab.styles.ts (1 hunks)
  • frontend/src/pages/AdminPage/auth/LoginTab/LoginTab.tsx (4 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (3)
  • GitHub Check: Redirect rules - moadong
  • GitHub Check: Header rules - moadong
  • GitHub Check: Pages changed - moadong
🔇 Additional comments (3)
frontend/src/pages/AdminPage/auth/LoginTab/LoginTab.styles.ts (1)

39-43: 새 LoginForm 스타일 컴포넌트 추가 완료

새로운 LoginForm 스타일 컴포넌트가 적절하게 추가되었습니다. 폼 요소에 flexbox 스타일을 적용하여 자식 요소들을 세로 방향으로 정렬하는 것은 좋은 접근입니다.

frontend/src/pages/AdminPage/auth/LoginTab/LoginTab.tsx (2)

52-80: Enter 키로 로그인 가능한 폼 추가 완료

로그인 폼에 onSubmit 핸들러를 추가하고 버튼 타입을 submit으로 변경하여 Enter 키로 로그인이 가능하도록 적절히 구현되었습니다. 폼 제출 시 페이지 새로고침이 발생하지 않도록 e.preventDefault()를 호출하는 것도 좋은 구현입니다.


89-90: 코드 포맷팅 일관성 개선

onClick 핸들러의 닫는 괄호 위치를 일관되게 개선하여 코드 가독성이 향상되었습니다.

Also applies to: 100-101, 111-112

Copy link
Member

@oesnuj oesnuj left a comment

Choose a reason for hiding this comment

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

로그인이 좀 더 편해졌네요!
수고하셨습니다~

@seongwon030 seongwon030 merged commit 8c30dce into develop-fe May 15, 2025
5 checks passed
@seongwon030 seongwon030 deleted the feature/#410-adminPage-login-enter-key-support-FE-116 branch May 15, 2025 10:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

💻 FE Frontend ✨ Feature 기능 개발

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[feature] FE-116 관리자 페이지 Enter 키 로그인 기능 추가

2 participants