Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: 웹 배너 리팩토링 및 모바일 배너 추가 #271

Merged
merged 12 commits into from
Dec 21, 2024

Conversation

alwubin
Copy link
Collaborator

@alwubin alwubin commented Dec 21, 2024

💡 작업 내용

  • TopBanner 배경 (웹&모바일 이미지)추가
  • TodayBalanceTalkBanner 컴포넌트 UI 구현
  • TopBanner 모바일 UI 적용

💡 자세한 설명

✅ TodayTalkPickBanner, TodayBalanceGameBanner

  • PM님 및 디자인 팀에서 상단 배너 내용을 톡픽 2, 밸런스게임2로 정하자고 하셔서 밸런스게임 관련 배너를 톡픽과 동일하게 생성하였습니다.
  • 둘 다 props로 2개의 value를 포함한 배열을 받아오도록 수정해두었습니다.
  • TodayBalanceGameBanner의 일부 스타일 제외하고 모든 로직은 TodayTalkPickBanner와 동일하게 작성하였습니다.
  • 그리고 각 props에 index를 추가하여, 해당 인덱스에 정해진 배경 및 스타일을 가져오도록 하였습니다.
  • 현재 모바일 배너 배경이 화질이 깨지는 현상이 있는데, 해결이 필요할거 같습니다..

✅ useTodayTalkPickQuery

  • 원래는 오늘의 톡픽 값을 하나만 반환하는 거였지만, 수정된 명세 상 두 개가 배열로 반환될 것입니다. (아마 12/22 (일) 중으로 재모님께서 수정해주신다고 하셨습니다~!)
  • 수정 전 임시 더미데이터를 LandingPage에서 넣어주었습니다. 수정 후 코드는 임시 주석처리 하였습니다. 추후 수정 완료 시 제거하도록 하겠습니다.

✅ useTodayBalanceGameList

  • 현재 따로 오늘의 밸런스게임에 대한 api가 없기 때문에, 기존에 존재하는 useBestGameList를 사용하여 16개의 인기 밸런스게임 리스트를 불러온 뒤 그 중 랜덤으로 2개의 밸런스게임을 뽑아 TodayBalanceGameList로 반환하는 훅을 구현하였습니다.

✅ 구현 화면

모바일
mobile-top-banner-ezgif com-video-to-gif-converter


TopBanner-ezgif com-video-to-gif-converter

📗 참고 자료 (선택)

📢 리뷰 요구 사항 (선택)

🚩 후속 작업 (선택)

✅ 셀프 체크리스트

  • PR 제목을 형식에 맞게 작성했나요?
  • 브랜치 전략에 맞는 브랜치에 PR을 올리고 있나요? (master/main이 아닙니다.)
  • 이슈는 close 했나요?
  • Reviewers, Labels, Proje cts를 등록했나요?
  • 작업 도중 문서 수정이 필요한 경우 잘 수정했나요?
  • 테스트는 잘 통과했나요?
  • 불필요한 코드는 제거했나요?

closes #270

Summary by CodeRabbit

  • New Features

    • 새로운 BalanceGamePage 경로 추가.
    • TodayBalanceGameBannerTodayTalkPickBanner 컴포넌트 추가.
    • useTodayBalanceGameList 커스텀 훅 추가.
    • 새로운 더미 데이터 todayTalkPickDummyData 추가.
  • Bug Fixes

    • API 응답 구조 변경으로 다수의 TodayTalkPick 객체 반환.
  • Documentation

    • 새로운 이미지 자산 추가.
  • Style

    • 스타일링 함수 동적화 및 반응형 디자인 개선.
  • Chores

    • 색상 팔레트에 HOTPINKORANGE 추가.

@alwubin alwubin added ✔︎pull requests pull requests 코드 체크 요청 👩🏻‍💻 frontend 프론트엔드 작업 ✅feature labels Dec 21, 2024
@alwubin alwubin requested review from areumH and WonJuneKim December 21, 2024 15:23
@alwubin alwubin self-assigned this Dec 21, 2024
Copy link
Contributor

coderabbitai bot commented Dec 21, 2024

Warning

Rate limit exceeded

@alwubin has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 22 minutes and 22 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between c790c8f and 33823b9.

⛔ Files ignored due to path filters (8)
  • src/assets/images/game-banner-first.png is excluded by !**/*.png
  • src/assets/images/game-banner-second.png is excluded by !**/*.png
  • src/assets/images/mo-game-banner-first.png is excluded by !**/*.png
  • src/assets/images/mo-game-banner-second.png is excluded by !**/*.png
  • src/assets/images/mo-talk-pick-banner-first.png is excluded by !**/*.png
  • src/assets/images/mo-talk-pick-banner-second.png is excluded by !**/*.png
  • src/assets/images/talk-pick-banner-first.png is excluded by !**/*.png
  • src/assets/images/talk-pick-banner-second.png is excluded by !**/*.png
📒 Files selected for processing (14)
  • src/App.tsx (1 hunks)
  • src/api/talk-pick.ts (1 hunks)
  • src/assets/index.ts (1 hunks)
  • src/components/molecules/TopBanner/TodayBalanceGameBanner/TodayBalanceGameBanner.style.ts (1 hunks)
  • src/components/molecules/TopBanner/TodayBalanceGameBanner/TodayBalanceGameBanner.tsx (1 hunks)
  • src/components/molecules/TopBanner/TodayTalkPickBanner/TodayTalkPickBanner.style.ts (2 hunks)
  • src/components/molecules/TopBanner/TodayTalkPickBanner/TodayTalkPickBanner.tsx (2 hunks)
  • src/components/molecules/TopBanner/TopBanner.tsx (2 hunks)
  • src/constants/path.ts (1 hunks)
  • src/hooks/api/talk-pick/useTodayTalkPickQuery.ts (1 hunks)
  • src/hooks/game/useTodayBalanceGameList.ts (1 hunks)
  • src/mocks/data/banner.ts (1 hunks)
  • src/pages/LandingPage/LandingPage.tsx (3 hunks)
  • src/styles/color.ts (1 hunks)

Walkthrough

이 풀 리퀘스트는 랜딩 페이지의 TopBanner 컴포넌트를 리팩토링하고 모바일 배너를 추가하는 작업을 포함합니다. 주요 변경 사항은 오늘의 대화 선택과 밸런스 게임을 위한 새로운 배너 컴포넌트 도입, 라우팅 경로 추가, 그리고 관련 스타일 및 후크 업데이트로 구성됩니다.

Changes

파일 변경 요약
src/App.tsx 밸런스 게임 페이지를 위한 새 라우트 추가
src/api/talk-pick.ts getTodayTalkPick 메서드 응답 타입을 단일 객체에서 배열로 변경
src/assets/index.ts 새로운 배너 이미지 에셋 추가
src/components/molecules/TopBanner/* 새로운 배너 컴포넌트 및 스타일 추가, 기존 컴포넌트 업데이트
src/constants/path.ts TODAY_BALANCEGAME 경로 상수 추가
src/hooks/api/talk-pick/useTodayTalkPickQuery.ts 쿼리 훅 데이터 타입 및 변수명 업데이트
src/hooks/game/useTodayBalanceGameList.ts 새로운 게임 리스트 훅 추가
src/mocks/data/banner.ts 더미 데이터 추가
src/pages/LandingPage/LandingPage.tsx TopBanner 컴포넌트 props 업데이트
src/styles/color.ts 새로운 색상 추가

Assessment against linked issues

목표 달성 여부 설명
TopBanner 배경 추가
TodayBalanceTalkBanner 컴포넌트 UI 구현
TopBanner 모바일 UI 적용

Possibly related PRs

Suggested labels

✨feature, 🪄refactor

Suggested reviewers

  • hsgh085
  • areumH
  • WonJuneKim

Poem

🐰 토끼의 배너 춤 🎉
새로운 경로를 열어요
모바일과 웹이 손잡고
게임의 재미를 노래해요
배너는 춤추고 사용자는 웃네!


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ 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.
    • Generate unit testing code for this file.
    • 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 generate unit testing code for this file.
    • @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 generate unit testing code.
    • @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.

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. (Beta)
  • @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.

@alwubin alwubin merged commit 33823b9 into dev Dec 21, 2024
4 of 8 checks passed
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
12.9% Duplication on New Code (required ≤ 10%)

See analysis details on SonarQube Cloud

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✅feature 👩🏻‍💻 frontend 프론트엔드 작업 ✔︎pull requests pull requests 코드 체크 요청
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

웹 배너 리팩토링 및 모바일 배너 추가
1 participant