Skip to content

[refactor] semantic typography 클래스 정리#170

Merged
ff1451 merged 2 commits intodevelopfrom
168-refactor-semantic-typography-클래스-정리
Mar 9, 2026

Hidden character warning

The head ref may contain hidden characters: "168-refactor-semantic-typography-\ud074\ub798\uc2a4-\uc815\ub9ac"
Merged

[refactor] semantic typography 클래스 정리#170
ff1451 merged 2 commits intodevelopfrom
168-refactor-semantic-typography-클래스-정리

Conversation

@ff1451
Copy link
Copy Markdown
Collaborator

@ff1451 ff1451 commented Mar 9, 2026

✨ 요약

- typography.css에 text-* semantic alias를 추가했습니다.
- 주요 화면에서 기존 H3, Sub2  대문자 타이포그래피 클래스를 semantic 클래스명으로 치환했습니다.
- 기존 uppercase alias는 호환성을 위해 임시 유지했습니다.



😎 해결한 이슈



Summary by CodeRabbit

릴리스 노트

  • 새로운 기능

    • 일관된 텍스트 스타일링을 위한 새로운 CSS 타이포그래피 유틸리티 클래스 추가.
  • 스타일

    • 앱 전체에서 타이포그래피 스타일링을 표준화된 유틸리티 클래스로 업데이트하여 시각적 일관성 개선.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Mar 9, 2026

Warning

Rate limit exceeded

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

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: b3fce5d9-503d-4fcd-9fc8-a2e2079280d2

📥 Commits

Reviewing files that changed from the base of the PR and between f902454 and a0c4f53.

📒 Files selected for processing (7)
  • src/pages/Chat/index.tsx
  • src/pages/Home/components/SimpleAppliedClubCard.tsx
  • src/pages/Home/index.tsx
  • src/pages/Manager/ManagedRecruitmentWrite/index.tsx
  • src/pages/Manager/components/TimePicker/index.tsx
  • src/pages/User/MyPage/components/UserInfoCard.tsx
  • src/styles/typography.css

Walkthrough

기존 대문자 타이포그래피 유틸리티 클래스(H3, Sub2 등)를 새로운 text-* 시맨틱 클래스명으로 광범위하게 교체합니다. typography.css에 호환성 alias를 추가하고, 40개 이상의 컴포넌트 파일에서 className을 일괄 업데이트했습니다.

Changes

Cohort / File(s) Summary
Typography Foundation
src/styles/typography.css
새로운 .text-d1, .text-h1~h5, .text-sub1~4, .text-body1~3, .text-caption1~2 등 20개 alias 클래스 추가. 레거시 클래스와의 호환성 유지.
Auth Pages - SignUp Steps
src/pages/Auth/SignUp/*.tsx, src/pages/Auth/SignUp/components/*.tsx
H3/H1/D2/Sub1/Sub2/Body3 → text-h3/text-h1/text-d2/text-sub1/text-sub2/text-body3로 일관된 클래스명 치환. 로직 변경 없음.
Club Pages
src/pages/Club/Application/*, src/pages/Club/ClubDetail/components/*, src/pages/Club/ClubList/components/*, src/pages/Club/ClubSearch/index.tsx
H3/Sub2/Caption1/Caption2/Body3 → text-h3/text-sub2/text-caption1/text-caption2/text-body3로 통일.
Manager Pages
src/pages/Manager/Managed*/index.tsx, src/pages/Manager/components/TimePicker/index.tsx
H3/H4/Sub2/Sub3/Sub4/Body2/Body3/Caption1 → text-* 형식으로 대규모 클래스명 정리. 데이터 처리 로직 변경 없음.
Home & User Pages
src/pages/Home/index.tsx, src/pages/Home/components/*, src/pages/User/*/index.tsx
H3/H2/Sub2/Body3/Caption1 → text-h3/text-h2/text-sub2/text-body3/text-caption1로 통일.
Common Components & Other
src/components/common/ToggleSwitch.tsx, src/components/layout/Header/components/InfoHeader.tsx, src/main.tsx, src/pages/Chat/index.tsx, src/pages/Schedule/*
각 파일당 1~4개 클래스명 변경. text-* 형식으로 통일.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

근거: 동일한 패턴의 반복적 클래스명 치환으로 구성되어 있으며, 로직 변경이 전혀 없습니다. 다만 파일 수가 많으므로 일관성 검증이 필요합니다. 기본 alias가 typography.css에 제대로 정의되었는지만 확인하면 나머지 변경사항은 자동으로 검증됩니다.

Possibly related PRs

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed PR 제목은 semantic typography 클래스 정리라는 핵심 변경 사항을 명확하게 설명합니다.
Linked Issues check ✅ Passed 모든 코딩 요구사항이 충족됨: typography.css에 text-* alias 추가, 주요 컴포넌트에서 대문자 클래스를 semantic 클래스명으로 치환, 호환성 유지.
Out of Scope Changes check ✅ Passed 모든 변경사항이 typography 리팩토링 범위 내에 있으며, 함수 로직이나 비즈니스 로직 변경 없이 클래스명만 업데이트합니다.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch 168-refactor-semantic-typography-클래스-정리

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
Copy Markdown
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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
src/styles/typography.css (1)

165-189: 🛠️ Refactor suggestion | 🟠 Major

caption 계열 alias 이름은 text-cap* 쪽으로 맞춰주세요.

이번 PR에서 public alias를 text-caption*로 열어두면, 문서화된 text-cap1/text-cap2와 네이밍이 갈립니다. 지금 같이 바뀐 사용처들도 이 이름을 따라가고 있어서, 여기서 맞추지 않으면 다음 정리 때 한 번 더 손보게 됩니다. 최소한 text-cap* alias는 같이 제공하고, 가능하면 사용처도 그 기준으로 맞추는 편이 좋겠습니다.

예시
-  .text-caption1,
+  .text-cap1,
+  .text-caption1,
   .Caption1 {
     font-size: var(--Caption1);
     line-height: var(--leading-cap1);
     font-weight: var(--font-weight-regular);
   }

-  .text-caption1-strong,
+  .text-cap1-strong,
+  .text-caption1-strong,
   .Caption1-strong {
     font-size: var(--Caption1);
     line-height: var(--leading-cap1);
     font-weight: var(--font-weight-semibold);
   }

-  .text-caption2,
+  .text-cap2,
+  .text-caption2,
   .Caption2 {
     font-size: var(--Caption2);
     line-height: var(--leading-cap2);
     font-weight: var(--font-weight-regular);
   }

-  .text-caption2-strong,
+  .text-cap2-strong,
+  .text-caption2-strong,
   .Caption2-strong {
     font-size: var(--Caption2);
     line-height: var(--leading-cap2);
     font-weight: var(--font-weight-semibold);
   }

Based on learnings, Use typography tokens (\text-h1` through `text-h5`, `text-sub1` through `text-sub4`, `text-body1` through `text-body3`, `text-cap1` through `text-cap2`) from `src/styles/theme.css``.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/styles/typography.css` around lines 165 - 189, The caption class aliases
(.text-caption1, .text-caption1-strong, .text-caption2, .text-caption2-strong
and their PascalCase variants) should also expose the shorter token names used
across the codebase; add matching alias selectors for .text-cap1,
.text-cap1-strong, .text-cap2, and .text-cap2-strong (and their .Caption
variants if desired) that reuse the same declarations (font-size:
var(--Caption1/2), line-height: var(--leading-cap1/2), font-weight:
var(--font-weight-regular/semibold)) so the public API matches documented tokens
like text-cap1/text-cap2.
🧹 Nitpick comments (6)
src/pages/Manager/components/TimePicker/index.tsx (1)

2-2: 선택 사항: twMerge 대신 cn() 유틸리티 사용 권장

코딩 가이드라인에 따르면 Tailwind 클래스 병합 시 src/utils/ts/cn.tscn() 유틸리티를 사용해야 합니다. 현재 PR 범위 밖이지만, 추후 리팩토링 시 고려해 주세요.

-import { twMerge } from 'tailwind-merge';
+import { cn } from '@/utils/ts/cn';
-                      className={twMerge(
+                      className={cn(

Also applies to: 179-182, 208-211

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/pages/Manager/components/TimePicker/index.tsx` at line 2, The file
imports and uses twMerge for merging Tailwind classes; per guidelines, replace
twMerge with the project's cn() utility: remove the twMerge import and instead
import cn from src/utils/ts/cn.ts, then change all twMerge(...) calls inside the
TimePicker component (and other occurrences in this file) to cn(...), preserving
the same arguments and any conditional class logic so behavior and typing remain
the same.
src/pages/Chat/index.tsx (1)

47-47: text-caption2 대신 공식 토큰명으로 통일해주세요.

호환 alias를 남겨두더라도, 새 사용처는 canonical 이름으로 고정하는 편이 좋습니다. 지금 형태면 cap/caption 네이밍이 다시 섞입니다.

제안 수정
-                  {isGroup && <span className="bg-primary text-caption2 rounded px-1.5 py-0.5 text-white">단체</span>}
+                  {isGroup && <span className="bg-primary text-cap2 rounded px-1.5 py-0.5 text-white">단체</span>}
Based on learnings: Use typography tokens (`text-h1` through `text-h5`, `text-sub1` through `text-sub4`, `text-body1` through `text-body3`, `text-cap1` through `text-cap2`) from `src/styles/theme.css`.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/pages/Chat/index.tsx` at line 47, The span uses the deprecated/alias
token "text-caption2"; change it to the canonical typography token "text-cap2"
in the Chat component JSX (the element rendering the 단체 badge where isGroup is
checked) so the className reads "bg-primary text-cap2 rounded px-1.5 py-0.5
text-white"; leave any alias definitions in CSS if desired but update new usages
to the canonical token name.
src/pages/User/MyPage/components/UserInfoCard.tsx (1)

2-2: cn() 유틸리티 사용 권장 (optional)

twMerge 대신 cn() 유틸리티(@/utils/ts/cn.ts) 사용이 코딩 가이드라인에서 권장됩니다. 이 PR 범위 외이므로 추후 리팩터링 시 고려해주세요.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/pages/User/MyPage/components/UserInfoCard.tsx` at line 2, The file
imports and uses twMerge in UserInfoCard.tsx; please replace usage of the
twMerge import with the project's cn() utility: remove the "twMerge" import,
import cn instead, and update all calls that currently use twMerge(...) to use
cn(...). Target the import statement and any occurrences of twMerge in the
UserInfoCard component (e.g., className composition sites) so the component uses
cn() consistently; this is optional refactor to align with coding guidelines.
src/pages/Manager/ManagedRecruitmentWrite/index.tsx (1)

253-253: text-caption1도 canonical token과 맞춰주세요.

text-caption1를 화면 코드에 직접 퍼뜨리면 text-cap1/text-caption1이 동시에 남습니다. caption 네이밍을 바꿀 계획이면 가이드와 토큰 명세까지 같이 맞추고, 아니라면 여기서는 text-cap1로 유지하는 편이 깔끔합니다.

♻️ 제안
-                    <span className="text-caption1 bg-indigo-5 rounded-full px-2 py-1 text-center text-indigo-600">
+                    <span className="text-cap1 bg-indigo-5 rounded-full px-2 py-1 text-center text-indigo-600">
...
-                    <span className="text-caption1 rounded-full bg-red-50 px-2 py-1 text-center text-red-500">
+                    <span className="text-cap1 rounded-full bg-red-50 px-2 py-1 text-center text-red-500">

As per coding guidelines, use typography tokens (text-h1 through text-h5, text-sub1 through text-sub4, text-body1 through text-body3, text-cap1 through text-cap2) from src/styles/theme.css.

Also applies to: 298-300

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/pages/Manager/ManagedRecruitmentWrite/index.tsx` at line 253, The span in
the ManagedRecruitmentWrite component uses the non-canonical class
"text-caption1"; update it to the canonical token "text-cap1" (and replace any
other occurrences of "text-caption1" in this file, e.g., the ones around the
same block referenced at lines ~298-300) so the component uses the standardized
typography tokens from theme.css; search for "text-caption1" in
ManagedRecruitmentWrite and replace with "text-cap1" to keep naming consistent
with the design tokens.
src/pages/Schedule/index.tsx (1)

116-116: text-caption2를 새 표준으로 쓸 거면 가이드도 같이 정리해주세요.

현재 저장소 규칙은 caption 계열을 text-cap2로 정의하고 있어서, 여기서 text-caption2를 쓰기 시작하면 토큰 네이밍이 다시 두 벌로 나뉩니다. 코드에서는 text-cap2로 맞추거나, 이번 PR에서 typography 가이드/토큰 명세를 함께 갱신하는 편이 더 일관됩니다.

♻️ 제안
-      <ul className="text-caption2 flex shrink-0 gap-3 overflow-x-auto px-6 py-3 font-medium text-[`#4B5563`]">
+      <ul className="text-cap2 flex shrink-0 gap-3 overflow-x-auto px-6 py-3 font-medium text-[`#4B5563`]">

As per coding guidelines, use typography tokens (text-h1 through text-h5, text-sub1 through text-sub4, text-body1 through text-body3, text-cap1 through text-cap2) from src/styles/theme.css.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/pages/Schedule/index.tsx` at line 116, The component is using a
nonstandard typography token "text-caption2" in the UL's className; to follow
the repo tokens in src/styles/theme.css, replace "text-caption2" with the
established "text-cap2" in the Schedule component (the UL with className
currently containing text-caption2) so the code uses the canonical token, or if
you intentionally want a new token, add and document "text-caption2" in the
typography guide and update theme.css accordingly—prefer the former (switch to
text-cap2) for consistency.
src/pages/Home/components/SimpleAppliedClubCard.tsx (1)

21-21: text-caption1 대신 표준 토큰명으로 맞춰주세요.

이번 PR 목적이 타이포 네이밍 통일이라 여기만 caption alias를 쓰면 규칙이 다시 갈립니다. 가능하면 theme.css 기준 토큰명으로 통일하는 편이 좋습니다.

♻️ 제안 수정
-            <div className="text-caption1 text-text-500 bg-text-100/90 flex items-center gap-0.5 rounded-full px-3 py-1">
+            <div className="text-cap1 text-text-500 bg-text-100/90 flex items-center gap-0.5 rounded-full px-3 py-1">
As per coding guidelines, "Use typography tokens (`text-h1` through `text-h5`, `text-sub1` through `text-sub4`, `text-body1` through `text-body3`, `text-cap1` through `text-cap2`) from `src/styles/theme.css`."
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/pages/Home/components/SimpleAppliedClubCard.tsx` at line 21, Replace the
non-standard typography token "text-caption1" in the SimpleAppliedClubCard
component with the project's standard token from theme.css (e.g., one of
text-cap1 or text-cap2) so the class string on the div with className
"text-caption1 text-text-500 bg-text-100/90 ..." uses the canonical token;
update the className to the appropriate token (pick text-cap1 or text-cap2 to
match sizing/visuals) and run a quick visual check to confirm spacing remains
correct.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@src/pages/Home/index.tsx`:
- Line 127: The Link in the Home component uses w-full but Link renders an
inline <a>, so the width class won't apply; update the Link in
src/pages/Home/index.tsx (the Link to="/clubs" element) to include a display
utility like "block" or "flex" in its className (e.g., add "block" or "flex"
alongside "w-full bg-primary ...") so the full-width background and click area
take effect.

---

Outside diff comments:
In `@src/styles/typography.css`:
- Around line 165-189: The caption class aliases (.text-caption1,
.text-caption1-strong, .text-caption2, .text-caption2-strong and their
PascalCase variants) should also expose the shorter token names used across the
codebase; add matching alias selectors for .text-cap1, .text-cap1-strong,
.text-cap2, and .text-cap2-strong (and their .Caption variants if desired) that
reuse the same declarations (font-size: var(--Caption1/2), line-height:
var(--leading-cap1/2), font-weight: var(--font-weight-regular/semibold)) so the
public API matches documented tokens like text-cap1/text-cap2.

---

Nitpick comments:
In `@src/pages/Chat/index.tsx`:
- Line 47: The span uses the deprecated/alias token "text-caption2"; change it
to the canonical typography token "text-cap2" in the Chat component JSX (the
element rendering the 단체 badge where isGroup is checked) so the className reads
"bg-primary text-cap2 rounded px-1.5 py-0.5 text-white"; leave any alias
definitions in CSS if desired but update new usages to the canonical token name.

In `@src/pages/Home/components/SimpleAppliedClubCard.tsx`:
- Line 21: Replace the non-standard typography token "text-caption1" in the
SimpleAppliedClubCard component with the project's standard token from theme.css
(e.g., one of text-cap1 or text-cap2) so the class string on the div with
className "text-caption1 text-text-500 bg-text-100/90 ..." uses the canonical
token; update the className to the appropriate token (pick text-cap1 or
text-cap2 to match sizing/visuals) and run a quick visual check to confirm
spacing remains correct.

In `@src/pages/Manager/components/TimePicker/index.tsx`:
- Line 2: The file imports and uses twMerge for merging Tailwind classes; per
guidelines, replace twMerge with the project's cn() utility: remove the twMerge
import and instead import cn from src/utils/ts/cn.ts, then change all
twMerge(...) calls inside the TimePicker component (and other occurrences in
this file) to cn(...), preserving the same arguments and any conditional class
logic so behavior and typing remain the same.

In `@src/pages/Manager/ManagedRecruitmentWrite/index.tsx`:
- Line 253: The span in the ManagedRecruitmentWrite component uses the
non-canonical class "text-caption1"; update it to the canonical token
"text-cap1" (and replace any other occurrences of "text-caption1" in this file,
e.g., the ones around the same block referenced at lines ~298-300) so the
component uses the standardized typography tokens from theme.css; search for
"text-caption1" in ManagedRecruitmentWrite and replace with "text-cap1" to keep
naming consistent with the design tokens.

In `@src/pages/Schedule/index.tsx`:
- Line 116: The component is using a nonstandard typography token
"text-caption2" in the UL's className; to follow the repo tokens in
src/styles/theme.css, replace "text-caption2" with the established "text-cap2"
in the Schedule component (the UL with className currently containing
text-caption2) so the code uses the canonical token, or if you intentionally
want a new token, add and document "text-caption2" in the typography guide and
update theme.css accordingly—prefer the former (switch to text-cap2) for
consistency.

In `@src/pages/User/MyPage/components/UserInfoCard.tsx`:
- Line 2: The file imports and uses twMerge in UserInfoCard.tsx; please replace
usage of the twMerge import with the project's cn() utility: remove the
"twMerge" import, import cn instead, and update all calls that currently use
twMerge(...) to use cn(...). Target the import statement and any occurrences of
twMerge in the UserInfoCard component (e.g., className composition sites) so the
component uses cn() consistently; this is optional refactor to align with coding
guidelines.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: aa18b75b-817a-490b-a4e0-a3ecb6097f55

📥 Commits

Reviewing files that changed from the base of the PR and between f0f3bf1 and f902454.

📒 Files selected for processing (41)
  • src/components/common/ToggleSwitch.tsx
  • src/components/layout/Header/components/InfoHeader.tsx
  • src/main.tsx
  • src/pages/Auth/SignUp/ConfirmStep.tsx
  • src/pages/Auth/SignUp/FinishStep.tsx
  • src/pages/Auth/SignUp/NameStep.tsx
  • src/pages/Auth/SignUp/StudentIdStep.tsx
  • src/pages/Auth/SignUp/TermStep.tsx
  • src/pages/Auth/SignUp/UniversityStep.tsx
  • src/pages/Auth/SignUp/components/AgreementArrow.tsx
  • src/pages/Auth/SignUp/components/StepLayout.tsx
  • src/pages/Chat/index.tsx
  • src/pages/Club/Application/clubFeePage.tsx
  • src/pages/Club/Application/index.tsx
  • src/pages/Club/ClubDetail/components/ClubIntro.tsx
  • src/pages/Club/ClubDetail/components/ClubRecruitment.tsx
  • src/pages/Club/ClubDetail/index.tsx
  • src/pages/Club/ClubList/components/ClubCard.tsx
  • src/pages/Club/ClubList/index.tsx
  • src/pages/Club/ClubSearch/index.tsx
  • src/pages/Home/components/CouncilNoticeCard.tsx
  • src/pages/Home/components/SimpleAppliedClubCard.tsx
  • src/pages/Home/components/SimpleClubCard.tsx
  • src/pages/Home/index.tsx
  • src/pages/Manager/ManagedAccount/index.tsx
  • src/pages/Manager/ManagedApplicationDetail/index.tsx
  • src/pages/Manager/ManagedApplicationList/index.tsx
  • src/pages/Manager/ManagedClubDetail/index.tsx
  • src/pages/Manager/ManagedClubList/index.tsx
  • src/pages/Manager/ManagedClubProfile/index.tsx
  • src/pages/Manager/ManagedMemberApplicationDetail/index.tsx
  • src/pages/Manager/ManagedMemberList/index.tsx
  • src/pages/Manager/ManagedRecruitmentForm/index.tsx
  • src/pages/Manager/ManagedRecruitmentWrite/index.tsx
  • src/pages/Manager/components/TimePicker/index.tsx
  • src/pages/Schedule/components/CalendarWeekRow.tsx
  • src/pages/Schedule/index.tsx
  • src/pages/User/MyPage/components/UserInfoCard.tsx
  • src/pages/User/MyPage/index.tsx
  • src/pages/User/Profile/index.tsx
  • src/styles/typography.css

Comment thread src/pages/Home/index.tsx Outdated
@ff1451 ff1451 merged commit 0669f56 into develop Mar 9, 2026
2 checks passed
@ff1451 ff1451 self-assigned this Mar 20, 2026
@ff1451 ff1451 deleted the 168-refactor-semantic-typography-클래스-정리 branch April 7, 2026 09:32
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.

[refactor] semantic typography 클래스 정리

1 participant