Skip to content

refactor: components/study 내 컴포넌트 파일에 불필요한 tailwind css 대치#120

Merged
KwonDeaGeun merged 6 commits intodevelopfrom
refactor/remove-indiscreet-tailwind-css-use
Feb 11, 2026
Merged

refactor: components/study 내 컴포넌트 파일에 불필요한 tailwind css 대치#120
KwonDeaGeun merged 6 commits intodevelopfrom
refactor/remove-indiscreet-tailwind-css-use

Conversation

@KwonDeaGeun
Copy link
Contributor

@KwonDeaGeun KwonDeaGeun commented Feb 9, 2026

Summary by CodeRabbit

업데이트 사항

  • 스타일

    • 지원 신청 카드 레이아웃·디자인을 재구성하고 시각 클래스를 통일했습니다.
    • 상태 배지의 시각 표현(대기/승인/거절) 스타일을 새 CSS로 적용했습니다.
    • 대화상자 및 폼의 UI 요소(헤더, 내용, 로딩/오류, 버튼) 스타일을 정리하고 리플 애니메이션을 추가했습니다.
  • 리팩터

    • 카드·대화상자·폼의 마크업 구조를 단순화해 유지보수성을 향상시켰습니다.

@KwonDeaGeun KwonDeaGeun self-assigned this Feb 9, 2026
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

components/study 영역에서 인라인 Tailwind 유틸리티를 분리해, 재사용 가능한 컴포넌트 스타일 CSS로 옮기는 리팩터링입니다.

Changes:

  • StudyConfirmationDialog/StudyFormContent의 버튼/레이아웃 스타일을 study-dialog.css로 분리
  • ApplicationCard 및 내부 Dialog 스타일을 application-card.css로 분리
  • 전역 src/index.css에서 신규 컴포넌트 CSS 파일들을 import 하도록 연결

Reviewed changes

Copilot reviewed 6 out of 7 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
src/styles/components/study-dialog.css 스터디 다이얼로그/폼 관련 공통 클래스 추가
src/styles/components/application-card.css 지원서 카드 및 지원서 보기 다이얼로그 관련 클래스 추가
src/index.css 신규 컴포넌트 CSS import 추가 및 포맷팅 정리
src/components/study/StudyFormContent.tsx 인라인 Tailwind → 추출된 클래스 적용
src/components/study/StudyConfirmationDialog.tsx 인라인 Tailwind → 추출된 클래스 적용
src/components/study/ApplicationCard.tsx 인라인 Tailwind → 추출된 클래스 적용
package-lock.json lockfile 일부 변경

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@coderabbitai
Copy link

coderabbitai bot commented Feb 11, 2026

Warning

Rate limit exceeded

@KwonDeaGeun has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 13 minutes and 46 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.

Walkthrough

스터디 신청서 카드와 관련 다이얼로그·폼 컴포넌트의 마크업과 클래스명이 재구성되고, 상태 배지와 다이얼로그의 로딩/에러 UI가 CSS 기반 스타일로 전환되었습니다. 새로운 Tailwind 기반 CSS 모듈 두 개가 추가되어 스타일이 분리되었습니다.

Changes

Cohort / File(s) Summary
ApplicationCard 리팩토링
src/components/study/ApplicationCard.tsx
카드 레이아웃과 내부 섹션 재구성, avatar/이름/연락처 영역 재배치, 상태 배지를 새 클래스(status-badge-*)로 렌더링하도록 변경. 다이얼로그 내부 레이아웃·로딩·에러 UI 구조 변경. 공개 props 시그니처는 동일.
다이얼로그·폼 구조 단순화
src/components/study/StudyConfirmationDialog.tsx, src/components/study/StudyFormContent.tsx
AlertDialog/폼 구조를 간결한 컴포넌트·클래스명으로 재작성(헤더/풋터/버튼 마크업 단순화). 제출/확인 흐름과 props 인터페이스는 유지.
스타일시트 추가
src/styles/components/application-card.css, src/styles/components/study-dialog.css
애플리케이션 카드와 스터디 다이얼로그용 Tailwind 기반 CSS 모듈 추가(배지, 버튼, 리플 효과, 다이얼로그 내부 레이아웃 등).
글로벌 스타일 업데이트
src/index.css
새 CSS 모듈 두 파일을 import로 추가. 기존 스타일 규칙은 유지하되 포맷/임포트가 변경됨.
🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed PR 제목은 변경사항의 주요 목표(components/study 내 불필요한 tailwind css 대치)와 일치하며, 명확하고 구체적으로 리팩토링의 의도를 설명합니다.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


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

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@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: 2

🤖 Fix all issues with AI agents
In `@src/components/study/ApplicationCard.tsx`:
- Around line 88-97: The phone row in ApplicationCard uses inline Tailwind
classes instead of the component's CSS module; update the phone markup in the
ApplicationCard component to use the same CSS module classes as the student
number row (e.g., replace the div with className="mt-1 flex items-center
text-gray-500 text-sm" and the phone icon span with module classes) so it uses
application-contact-info and application-contact-icon (or the appropriate module
class names) consistent with application-name and the 학번 row.
- Around line 41-42: The handler handleLoadApplicationText is re-requesting when
the API returns an empty string because applicationReason is initialized to ""
and the guard uses truthiness; change applicationReason's initial state to null
and update the guard to check specifically for null (e.g., if (applicationReason
!== null) return) so an empty string from the API won't trigger repeated
fetches, and update the Textarea's value binding to safely display an empty
string when applicationReason is null/undefined (e.g., use the value expression
that falls back to "" when applicationReason is null).
🧹 Nitpick comments (4)
src/styles/components/study-dialog.css (1)

36-86: 버튼 스타일의 공통 속성을 추출하여 중복을 줄이세요.

dialog-btn-cancel, dialog-btn-confirm, form-btn-cancel, form-btn-submit 네 클래스가 position: relative, min-width: 120px, overflow: hidden, transition-property 를 동일하게 반복하고 있습니다. 공통 베이스 클래스를 만들면 유지보수성이 향상됩니다.

또한, rgb(37 99 235), rgb(229 231 235) 등 하드코딩된 색상값 대신 Tailwind 테마 변수나 디자인 토큰을 사용하는 것이 디자인 시스템 일관성에 좋습니다.

♻️ 공통 속성 추출 예시
+  .dialog-btn-base {
+    position: relative;
+    min-width: 120px;
+    overflow: hidden;
+    transition-property: color, background-color, border-color;
+  }
+
   .dialog-btn-cancel {
-    position: relative;
-    min-width: 120px;
-    overflow: hidden;
-    transition-property: color, background-color, border-color;
     background-color: rgb(229 231 235);
     color: rgb(55 65 81);
   }

이후 JSX에서 dialog-btn-base dialog-btn-cancel 형태로 조합하거나, @layer components에서 공통 클래스를 정의할 수 있습니다.

src/styles/components/application-card.css (2)

50-52: .dialog-content 클래스명이 너무 일반적입니다.

.dialog-content는 Radix Dialog의 내부 요소나 다른 다이얼로그 컴포넌트와 이름이 충돌할 가능성이 있습니다. application-dialog-content와 같이 컴포넌트 스코프를 반영한 네이밍을 권장합니다. dialog-info-box, dialog-info-row 등 다른 dialog- 접두사 클래스들도 마찬가지입니다.


101-103: sm:max-w-2xlmax-w-2xl과 동일하여 중복입니다.

   .dialog-max-width {
-    `@apply` max-w-2xl sm:max-w-2xl;
+    `@apply` max-w-2xl;
   }
src/components/study/ApplicationCard.tsx (1)

100-102: Line 100에도 인라인 Tailwind가 남아있습니다.

flex items-center space-x-3가 CSS 모듈 클래스로 추출되지 않았습니다. PR 목적에 맞게 별도 클래스로 정의하는 것을 고려하세요.

Copy link

@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

🤖 Fix all issues with AI agents
In `@src/components/study/ApplicationCard.tsx`:
- Around line 100-102: The inline Tailwind classes "flex items-center space-x-3"
in ApplicationCard.tsx should be moved to a CSS module to match the PR goal; add
a new class (e.g., .application-status-section) to application-card.css that
applies those Tailwind utilities (e.g., using `@apply` flex items-center
space-x-3) and then replace the div wrapper around
getStatusBadge(application.status) in ApplicationCard.tsx to use the new CSS
module class instead of the inline string; ensure imports of the CSS module
remain correct so getStatusBadge rendering is unchanged.

@KwonDeaGeun KwonDeaGeun merged commit 4d7b2bd into develop Feb 11, 2026
2 checks passed
@KwonDeaGeun KwonDeaGeun deleted the refactor/remove-indiscreet-tailwind-css-use branch February 11, 2026 03:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants