Skip to content

design: 반응형 레이아웃 개선 #209

Merged
hyeeuncho merged 7 commits intodevelopfrom
design/#208/resposive-layout
Jul 3, 2025
Merged

design: 반응형 레이아웃 개선 #209
hyeeuncho merged 7 commits intodevelopfrom
design/#208/resposive-layout

Conversation

@hyeeuncho
Copy link
Copy Markdown
Member

@hyeeuncho hyeeuncho commented Jul 3, 2025

온라인 이벤트 글씨 / 티켓 옵션 select -> 반응형
사진 업로드 용량 제한 1MB → 늘리기(3~4MB로)
주최자선별 문구 추가

Summary by CodeRabbit

  • 버그 수정

    • 선택형 칩(ChoiceChip) 컴포넌트의 선택 상태 동기화 및 이벤트 처리 로직이 개선되어 불필요한 상태 업데이트와 콜백 호출이 방지됩니다.
  • 스타일

    • 버튼과 라벨 사이의 간격 및 폰트 크기가 반응형으로 조정되어 다양한 화면 크기에서 더 나은 레이아웃을 제공합니다.
    • 티켓 옵션 폼, 옵션 리스트, 이벤트 개요 등 여러 UI 컴포넌트의 레이아웃 및 텍스트 스타일이 개선되었습니다.
    • 옵션 섹션의 라벨이 "옵션"에서 "선택지"로 변경되었습니다.
  • 새 기능

    • 티켓 생성 페이지에서 티켓 유형에 따라 안내 문구가 동적으로 변경됩니다.
  • 기타

    • 이미지 업로드 시 허용 파일 용량이 1MB에서 4MB로 상향 조정되었습니다.
    • 이벤트 태그 필터 API 쿼리 파라미터가 'tags'에서 'tag'로 변경되었습니다.

@hyeeuncho hyeeuncho linked an issue Jul 3, 2025 that may be closed by this pull request
1 task
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Jul 3, 2025

Walkthrough

이 변경사항은 여러 UI 컴포넌트의 스타일 및 상태 동기화 로직을 세분화하고, 일부 API 파라미터와 내부 함수 구조를 조정합니다. 주요 변경점에는 상태 업데이트 조건의 정밀화, 반응형 스타일 클래스 추가, 텍스트 라벨 수정, 파일 업로드 용량 제한 상향, 그리고 불필요한 함수 제거 등이 포함됩니다.

Changes

파일/경로 변경 요약
design-system/ui/ChoiceChip.tsx 상태 동기화 및 이벤트 처리 로직을 더 엄격하게 개선. 불필요한 상태 업데이트와 콜백 호출 방지.
design-system/ui/buttons/HorizontalCardButton.tsx 아이콘과 라벨 사이의 간격을 뷰포트 크기에 따라 반응형으로 조정.
src/entities/event/api/event.ts 이벤트 태그 필터 쿼리 파라미터명을 'tags'에서 'tag'로 변경.
src/features/dashboard/ui/DragArea.tsx 버튼에 반응형 텍스트 크기 클래스(sm:text-xs, md:text-sm) 추가.
src/features/ticket/ui/TicketOptionFormSection.tsx 컨테이너 div의 폭 관련 CSS 클래스 수정 및 반응형 폭 클래스 추가.
src/features/ticket/ui/TicketOptionListSection.tsx 옵션 섹션의 텍스트 라벨을 "옵션"에서 "선택지"로 변경.
src/pages/dashboard/ui/ticket/TicketCreatePage.tsx handleTicketTypeChange 함수 제거, ChoiceChip의 onSelect를 인라인으로 변경, 설명 문구 동적화.
src/shared/hooks/useImageUpload.ts 파일 업로드 용량 제한을 1MB에서 4MB로 상향, 알림 메시지도 4MB로 수정.
src/widgets/dashboard/ui/main/EventOverview.tsx 레이아웃 및 간격 관련 CSS 클래스에 반응형 속성 추가 및 수정.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant TicketCreatePage
    participant ChoiceChip

    User->>ChoiceChip: 옵션 선택
    ChoiceChip-->>TicketCreatePage: onSelect(선택값)
    TicketCreatePage->>TicketCreatePage: ticketType 상태 업데이트
    TicketCreatePage-->>User: 선택된 타입에 따라 동적 설명 표시
Loading

Suggested labels

💖 Style

Poem

🐇
코드의 들판에 바람이 분다,
스타일은 반응하고, 라벨은 바뀐다.
파일 업로드 넉넉해지고,
불필요한 함수는 토끼굴로 숨는다.
선택지도 새 이름을 얻고,
작은 변화가 모여
UI는 더 부드럽게 달린다!
🌱✨

✨ 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.

@hyeeuncho hyeeuncho self-assigned this Jul 3, 2025
@hyeeuncho hyeeuncho added 🪄 Refactoring 코드 리팩토링 💖 Style 디자인 수정 labels Jul 3, 2025
@github-actions
Copy link
Copy Markdown

github-actions bot commented Jul 3, 2025

Copy link
Copy Markdown

@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 (2)
src/widgets/dashboard/ui/main/EventOverview.tsx (1)

11-11: 불필요한 공백 제거 필요

클래스 문자열 끝에 불필요한 공백이 있습니다.

-      <div className="flex items-center text-xs md:text-sm ">
+      <div className="flex items-center text-xs md:text-sm">
design-system/ui/ChoiceChip.tsx (1)

29-33: 상태 동기화 최적화가 잘 적용되었습니다

외부 value prop이 변경될 때만 내부 상태를 업데이트하도록 조건을 개선한 것이 좋습니다.

다만, useEffect의 dependency array에 selected를 추가하는 것을 고려해보세요:

  useEffect(() => {
    if (value !== undefined && value !== selected) {
      setSelected(value);
    }
- }, [value]);
+ }, [value, selected]);
📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between d8dde0f and a52977b.

📒 Files selected for processing (9)
  • design-system/ui/ChoiceChip.tsx (1 hunks)
  • design-system/ui/buttons/HorizontalCardButton.tsx (1 hunks)
  • src/entities/event/api/event.ts (2 hunks)
  • src/features/dashboard/ui/DragArea.tsx (1 hunks)
  • src/features/ticket/ui/TicketOptionFormSection.tsx (2 hunks)
  • src/features/ticket/ui/TicketOptionListSection.tsx (1 hunks)
  • src/pages/dashboard/ui/ticket/TicketCreatePage.tsx (1 hunks)
  • src/shared/hooks/useImageUpload.ts (1 hunks)
  • src/widgets/dashboard/ui/main/EventOverview.tsx (1 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (2)
src/pages/dashboard/ui/ticket/TicketCreatePage.tsx (1)
design-system/stories/ChoiceChip.stories.tsx (1)
  • TwoOptions (29-40)
src/entities/event/api/event.ts (2)
src/shared/types/api/http-client.ts (1)
  • axiosClient (15-22)
src/entities/event/model/eventDetail.ts (1)
  • EventItem (30-34)
⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: storybook
🔇 Additional comments (12)
src/entities/event/api/event.ts (2)

65-65: API 파라미터 변경 사항 일관성 확인됨

getAllEventsInfinite 함수와 동일하게 'tag' 파라미터를 사용하도록 변경된 점이 좋습니다.


23-23: 이벤트 API 쿼리 파라미터 'tag' 사용 일관성 확인 및 백엔드 스펙 검증 요청

코드베이스 전반을 검색한 결과, 이벤트 관련 API에서는 더 이상 tags가 아닌 단수형 tag 쿼리 파라미터만 사용되고 있음을 확인했습니다.

  • src/entities/event/api/event.ts
    • if (tag) params.append('tag', tag);
    • getEventByTag/events?tag=${tag}&page=${page}&size=${size} 로 singular tag 사용
  • 전체 검색 결과 이벤트 API 호출에 tags=는 더 이상 존재하지 않음
  • 별도 참가자 목록 API(getParticipants)만 tags 파라미터를 사용하므로 이벤트 API와 충돌되지 않음

→ 코드상 불일치는 없으나, 백엔드 API 스펙에도 해당 쿼리 파라미터 변경(tagstag)이 반영되었는지 최종 확인 부탁드립니다.

src/shared/hooks/useImageUpload.ts (1)

29-30: 서버 측 파일 업로드 제한 설정 확인 필요

useImageUpload.ts에서 클라이언트 측 파일 크기 제한을 1MB에서 4MB로 상향 조정하셨습니다. 그러나 아래 검증 스크립트로는 서버 구성 파일(yaml, json, js, ts)에서 해당 제한 설정을 찾을 수 없었습니다.

  • 서버 미들웨어(Express의 body-parser/multer 등)나 웹 서버(Nginx, Apache) 설정에서 업로드 최대 크기(limit)를 직접 확인
  • 서버 측 제한이 클라이언트와 동일하게 4MB 이상으로 설정되어 있는지 검증

서버 설정과 클라이언트 제한이 일치하도록 확인 또는 수정해 주세요.

design-system/ui/buttons/HorizontalCardButton.tsx (1)

34-34: 반응형 spacing 개선 우수함

아이콘과 라벨 간의 간격을 화면 크기에 따라 조정하는 반응형 스타일링이 잘 구현되었습니다. 작은 화면에서는 공간을 절약하고, 중간 화면 이상에서는 충분한 여백을 제공하는 것이 적절합니다.

src/features/dashboard/ui/DragArea.tsx (1)

56-56: 반응형 텍스트 크기 조정 적절함

HorizontalCardButton 컴포넌트의 반응형 gap 변경사항과 함께 일관된 반응형 디자인을 구현하고 있습니다. 작은 화면에서는 더 작은 텍스트를, 중간 화면에서는 적절한 크기의 텍스트를 제공하는 것이 좋습니다.

src/widgets/dashboard/ui/main/EventOverview.tsx (1)

12-12: 반응형 마진 조정 적절함

작은 화면에서는 마진을 줄이고 기본 화면에서는 충분한 마진을 제공하는 반응형 스타일링이 잘 구현되었습니다.

src/features/ticket/ui/TicketOptionFormSection.tsx (2)

42-42: 반응형 너비 설정이 잘 적용되었습니다

작은 화면에서도 적절한 너비가 확보되도록 sm:w-56 클래스를 추가한 것이 좋습니다.


64-64: 텍스트 컨테이너 너비 조정이 적절합니다

필수 응답 토글 설명 텍스트가 더 여유롭게 표시되도록 기본 너비를 w-48로 늘린 것이 좋습니다.

design-system/ui/ChoiceChip.tsx (1)

35-40: 중복 상태 업데이트 방지 로직이 우수합니다

동일한 옵션을 다시 선택했을 때 불필요한 상태 업데이트와 콜백 호출을 방지하는 것이 성능상 좋습니다.

src/features/ticket/ui/TicketOptionListSection.tsx (1)

17-17: 더 명확한 용어로 개선되었습니다

"옵션"보다는 "선택지"가 사용자에게 더 직관적이고 명확한 의미를 전달합니다.

src/pages/dashboard/ui/ticket/TicketCreatePage.tsx (2)

92-95: 코드 단순화가 잘 적용되었습니다

중간 핸들러 함수 없이 직접 상태를 업데이트하는 인라인 방식으로 변경하여 코드가 더 간결하고 읽기 쉬워졌습니다.


97-105: 동적 UI 개선이 사용자 경험을 향상시킵니다

티켓 타입에 따라 적절한 설명을 동적으로 보여주는 것이 사용자의 이해를 돕는 좋은 개선사항입니다.

@hyeeuncho hyeeuncho merged commit edf2eaa into develop Jul 3, 2025
2 checks passed
@hyeeuncho hyeeuncho deleted the design/#208/resposive-layout branch July 3, 2025 08:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🪄 Refactoring 코드 리팩토링 💖 Style 디자인 수정

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[design] 반응형 레이아웃 개선

2 participants