Repository navigation
韓国語の列車種別名が空欄になる問題を修正 - #6534
韓国語の列車種別名が空欄になる問題を修正#6534
Conversation
📝 WalkthroughWalkthrough
Changes列車種別フォントの言語対応
Estimated code review effort: 3 (Moderate) | ~20 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
src/components/TrainTypeBox.test.tsx (1)
128-141: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winLEDテーマの回帰ケースを追加してください。
resolveTrainTypeFontFamilyにはKO判定とAPP_THEME.LED判定があります。現在のテストはAPP_THEME.TOKYO_METROの2ケースだけです。そのため、LEDテーマの非韓国語フォントと、LEDテーマでの韓国語フォールバックを検証できません。追加例
+ it('LEDテーマでは韓国語以外にドットフォントを使用する', () => { + expect(resolveTrainTypeFontFamily(APP_THEME.LED, 'JA')).toBe( + FONTS.JFDotJiskan24h + ); + }); + + it('LEDテーマでも韓国語はOSフォントへフォールバックする', () => { + expect(resolveTrainTypeFontFamily(APP_THEME.LED, 'KO')).toBeUndefined(); + });As per coding guidelines: 挙動を変更した場合は、同じ変更セットで関連するテストを更新または追加します。
🤖 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 `@src/components/TrainTypeBox.test.tsx` around lines 128 - 141, resolveTrainTypeFontFamily のテストに APP_THEME.LED の回帰ケースを追加し、韓国語ではハングル対応OSフォントへのフォールバック、韓国語以外ではLEDテーマ固有のフォントが返ることを検証してください。既存のTOKYO_METROテストは維持してください。Source: Coding guidelines
🤖 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.
Inline comments:
In `@src/components/TrainTypeBox.tsx`:
- Around line 204-206: Update TrainTypeBox’s animated text state so
prevTrainTypeName retains the previous headerLangState, font family, and font
weight from the same update cycle. Apply those retained styles to the lower
RNAnimated.Text instead of the current animatedTextBaseStyle, while preserving
current styling for newly displayed text. Add a regression test covering KO
switching to JA, EN, or ZH during the fade transition.
---
Nitpick comments:
In `@src/components/TrainTypeBox.test.tsx`:
- Around line 128-141: resolveTrainTypeFontFamily のテストに APP_THEME.LED
の回帰ケースを追加し、韓国語ではハングル対応OSフォントへのフォールバック、韓国語以外ではLEDテーマ固有のフォントが返ることを検証してください。既存のTOKYO_METROテストは維持してください。
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 5f288fd9-593d-4bff-9a93-85b6c5423425
📒 Files selected for processing (2)
src/components/TrainTypeBox.test.tsxsrc/components/TrainTypeBox.tsx
概要
韓国語の列車種別名が空欄になる問題を修正します。
変更の種類
変更内容
TrainTypeBoxの言語切替表示に限定されます。新旧テキストの表示設定を同じ更新単位で保持し、切替完了後に更新します。テスト
npm run lintが通ることnpm testが通ることnpm run typecheckが通ること実行したテスト:
npm test -- --runInBand src/components/TrainTypeBox.test.tsx(12件成功)npm test -- --runInBand(202スイート、2176件成功)npm run lintnpm run typecheckgit diff --checkTrainTypeBoxに韓国語種別名「쾌속」が表示されることを確認関連Issue
なし
スクリーンショット(任意)
Android実機 T12_ROW で韓国語種別名「쾌속」の表示を確認済みです。
Summary by CodeRabbit