Skip to content

fix: 어학 시험 로고 매핑 보강#592

Merged
manNomi merged 5 commits into
mainfrom
fix/language-test-logos
Jul 1, 2026
Merged

fix: 어학 시험 로고 매핑 보강#592
manNomi merged 5 commits into
mainfrom
fix/language-test-logos

Conversation

@manNomi

@manNomi manNomi commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

작업 내용

  • JLPT가 TOEIC 로고로 보이던 원인인 default.png TOEIC 중복 이미지를 generic 언어 badge로 교체했습니다.
  • 대학 상세에서 사용하는 어학 시험 로고 매핑을 보강해 JLPT, NEW_HSK, DALF, DELF, TCF, TEF, DUOLINGO, CEFR, ETC를 올바른 이미지로 렌더링하도록 수정했습니다.
  • Codex 리뷰에서 지적된 DELF 누락을 반영해 DELF 전용 로고 자산과 매핑을 추가했습니다.
  • 대학 상세 어학 성적 영역의 로고 이미지가 찌그러지지 않도록 고정 슬롯과 object-contain을 적용했습니다.
  • 실제 사용처가 university-web 대학 상세뿐이라, 로고 자산과 getLanguageTestLogo 유틸을 apps/university-web에 종속되도록 되돌렸습니다.
  • apps/web의 미사용 어학 로고 유틸, @solid-connect/ui/language-test-logos export, public asset sync script, web/university-web의 불필요한 @solid-connect/ui 의존성을 제거했습니다.

검증

  • pnpm --filter @solid-connect/web lint:check
  • pnpm --filter @solid-connect/web typecheck:ci
  • pnpm --filter @solid-connect/web build (UNIVERSITY_WEB_DOMAIN=http://localhost:3001)
  • pnpm --filter @solid-connect/university-web lint:check
  • pnpm --filter @solid-connect/university-web typecheck:ci
  • pnpm --filter @solid-connect/university-web build
  • pnpm --filter @solid-connect/ui lint:check
  • pnpm --filter @solid-connect/ui typecheck
  • commit/push hook CI parity checks 통과
    • @solid-connect/web lint, typecheck, build
    • @solid-connect/university-web lint, typecheck, build
    • @solid-connect/admin lint, typecheck, build
  • Browser MCP production 렌더 검수
    • web 홈: language asset 이미지 0개, failed image 0개 확인
    • university-web 상세: /university/kyunghee/3155에서 JLPT 로고가 /images/language/jlpt.png로 로드되고 TOEIC 로고가 표시되지 않는 것 확인

참고

  • JLPT 공식 사이트, ChineseTest HSK 페이지, France Éducation international DALF/TCF 페이지, Alliance Française Canada DELF 페이지, Duolingo Brand Guidelines, Wikimedia Commons TEF 로고를 참고했습니다.
  • 현재 일반 apps/web에서는 어학 로고 이미지를 렌더링하지 않아 공통 패키지화하지 않았습니다.
  • 추후 apps/web의 어학 성적 제출/조회 화면에서도 로고를 표시하게 되면, 그 시점에 어학 로고 맵과 자산 배포 방식을 다시 공통화하는 것이 좋습니다.
  • 작업 트리에 남아 있던 bottom navigation/UI package 관련 변경은 이번 PR에 포함하지 않았습니다.

@manNomi manNomi requested review from enunsnv and wibaek as code owners June 30, 2026 06:30
@vercel

vercel Bot commented Jun 30, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
solid-connect-university-web Ready Ready Preview, Comment Jun 30, 2026 10:56am
solid-connect-web-admin Ready Ready Preview, Comment Jun 30, 2026 10:56am
solid-connection-web Ready Ready Preview, Comment Jun 30, 2026 10:56am

@coderabbitai

coderabbitai Bot commented Jun 30, 2026

Copy link
Copy Markdown

Review Change Stack

Walkthrough

이번 PR은 언어 테스트 로고 관련 유틸리티를 packages/ui 패키지로 중앙화하고, 두 앱에서 해당 모듈을 재사용하도록 구조를 재편합니다.

  1. packages/ui 신규 모듈 추가

    • packages/ui/src/language-test-logos.ts를 새로 생성하여 DEFAULT_LANGUAGE_TEST_LOGO_SRC, languageTestLogoMap, getLanguageTestLogo, formatLanguageTestName 등을 정의함
    • package.jsonexports./language-test-logos 서브패스를 추가함
  2. 정적 에셋 동기화 스크립트 추가

    • scripts/sync-ui-public-assets.mjs를 신규 추가하여 UI 패키지의 public/images/language/ 를 대상 앱으로 복사함
    • apps/web, apps/university-web 양쪽의 predev, prebuild, analyze 스크립트에 sync:ui-public 훅을 연결함
    • 생성된 이미지 경로를 .gitignore에 추가함
  3. 앱별 languageUtils.ts 재편

    • apps/webapps/university-web 모두에서 하드코딩된 로컬 구현을 제거하고, @solid-connect/ui/language-test-logos에서 재-export하도록 변경함
    • 두 앱의 next.config.mjs@solid-connect/uitranspilePackages에 추가함
  4. LanguageSection.tsx 이미지 렌더링 변경

    • Image 컴포넌트의 alt 속성을 동적 값으로, fallbackSrcDEFAULT_LANGUAGE_TEST_LOGO_SRC로 교체함

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Suggested reviewers

  • enunsnv
  • wibaek
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed 제목이 어학 시험 로고 매핑 보강과 잘못 표시되던 로고 수정이라는 핵심 변경을 정확히 요약합니다.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description check ✅ Passed 작업 내용과 검증, 참고가 구체적으로 작성되어 있어 PR 목적과 변경점은 충분히 전달되며, 일부 템플릿 섹션만 비어 있습니다.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/language-test-logos

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.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1522121000

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

[LanguageTestEnum.TCF]: "/images/language/tcf.png",
[LanguageTestEnum.TEF]: "/images/language/tef.png",
[LanguageTestEnum.DUOLINGO]: "/images/language/duolingo.svg",
} satisfies Record<LanguageTestEnum, string>;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Cover DELF in the university logo map

When a university requirement contains DELF (it is a valid LanguageTestType in apps/university-web/src/types/university.ts and is exposed in the language filter constants), getLanguageTestLogo("DELF") falls through to the generic default because this new exhaustive check is against the score-submission LanguageTestEnum, which does not include DELF. That leaves DELF requirements without the intended exam logo; use the university language enum or add a DELF mapping here as well.

Useful? React with 👍 / 👎.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
packages/ui/src/language-test-logos.ts (1)

21-25: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win

in 연산자가 프로토타입 키까지 잡아내는 점을 짚어둘게요.

type in languageTestLogoMap는 상속된 프로퍼티(constructor, toString 등)에도 true를 반환합니다. 예를 들어 getLanguageTestLogo("constructor")를 호출하면 문자열 경로 대신 Object.prototype.constructor 함수가 반환되어 타입 시그니처(: string)와 어긋나게 됩니다.

현재는 입력이 LanguageTestEnum 값으로 한정되어 실제 사고로 이어질 가능성은 낮지만, 자기 자신의 키만 확인하도록 바꿔두면 더 안전합니다.

♻️ 제안하는 수정
 export const getLanguageTestLogo = (type: string): string => {
-  return type in languageTestLogoMap
+  return Object.prototype.hasOwnProperty.call(languageTestLogoMap, type)
     ? languageTestLogoMap[type as LanguageTestLogoType]
     : DEFAULT_LANGUAGE_TEST_LOGO_SRC;
 };
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/ui/src/language-test-logos.ts` around lines 21 - 25, The
`getLanguageTestLogo` lookup currently uses the `in` operator, which can match
inherited properties like `constructor` or `toString` and return non-string
values. Update the `getLanguageTestLogo` function to check only own keys on
`languageTestLogoMap` before indexing, so the fallback to
`DEFAULT_LANGUAGE_TEST_LOGO_SRC` is used for any non-explicit logo type.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@packages/ui/src/language-test-logos.ts`:
- Around line 21-25: The `getLanguageTestLogo` lookup currently uses the `in`
operator, which can match inherited properties like `constructor` or `toString`
and return non-string values. Update the `getLanguageTestLogo` function to check
only own keys on `languageTestLogoMap` before indexing, so the fallback to
`DEFAULT_LANGUAGE_TEST_LOGO_SRC` is used for any non-explicit logo type.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: f9e39d60-c7ac-4fc4-9293-7aacb086e402

📥 Commits

Reviewing files that changed from the base of the PR and between b345b4a and 387fb15.

⛔ Files ignored due to path filters (21)
  • apps/university-web/public/images/language/default.png is excluded by !**/*.png
  • apps/web/public/images/language/default.png is excluded by !**/*.png
  • apps/web/public/images/language/ielts.png is excluded by !**/*.png
  • apps/web/public/images/language/toefl_ibt.png is excluded by !**/*.png
  • apps/web/public/images/language/toefl_itp.png is excluded by !**/*.png
  • apps/web/public/images/language/toeic.png is excluded by !**/*.png
  • packages/ui/public/images/language/cefr.png is excluded by !**/*.png
  • packages/ui/public/images/language/dalf.png is excluded by !**/*.png
  • packages/ui/public/images/language/default.png is excluded by !**/*.png
  • packages/ui/public/images/language/delf.jpg is excluded by !**/*.jpg
  • packages/ui/public/images/language/duolingo.svg is excluded by !**/*.svg
  • packages/ui/public/images/language/etc.png is excluded by !**/*.png
  • packages/ui/public/images/language/ielts.png is excluded by !**/*.png
  • packages/ui/public/images/language/jlpt.png is excluded by !**/*.png
  • packages/ui/public/images/language/new_hsk.png is excluded by !**/*.png
  • packages/ui/public/images/language/tcf.png is excluded by !**/*.png
  • packages/ui/public/images/language/tef.png is excluded by !**/*.png
  • packages/ui/public/images/language/toefl_ibt.png is excluded by !**/*.png
  • packages/ui/public/images/language/toefl_itp.png is excluded by !**/*.png
  • packages/ui/public/images/language/toeic.png is excluded by !**/*.png
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (11)
  • .gitignore
  • apps/university-web/next.config.mjs
  • apps/university-web/package.json
  • apps/university-web/src/app/university/[homeUniversity]/[id]/_ui/UniversityDetail/_ui/LanguageSection.tsx
  • apps/university-web/src/utils/languageUtils.ts
  • apps/web/next.config.mjs
  • apps/web/package.json
  • apps/web/src/utils/languageUtils.ts
  • packages/ui/package.json
  • packages/ui/src/language-test-logos.ts
  • scripts/sync-ui-public-assets.mjs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant