Repository navigation
Headerの長い駅名はフォント縮小ではなく文字幅を圧縮して表示するように変更 - #6053
Merged
Merged
Conversation
Contributor
📝 WalkthroughWalkthroughThis PR refactors station name horizontal scaling across the TrainLCD mobile app by renaming ChangesStation name scaling refactor
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
This was referenced May 27, 2026
Merged
Merged
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概要
Header コンポーネントで長い駅名を表示する際、これまでは
adjustsFontSizeToFitでフォント自体を縮小していましたが、実車内 LCD(JR 東日本 E235 系など)の見た目に合わせて「フォントサイズは保ったまま 1 文字あたりの幅を圧縮する」方式に切り替えました。リアリティ向上のための表示方法の差し替えです。変更の種類
変更内容
src/utils/stationNameScale.ts: 関数をcalcStationNameMinScale→calcStationNameScaleXにリネームし、用途をminimumFontScaleからtransform: scaleX向けに変更。下限を 0.1 → 0.5(実機 LCD 相当、半分以下には潰さない)に引き上げ。HeaderEast/HeaderSaikyo/HeaderJRKyushu): 駅名 Text のscaleYアニメーションを壊さないよう、ラッパーView側にtransform: [{ scaleX }]を適用。adjustsFontSizeToFit/minimumFontScaleは除去。HeaderE235/HeaderJL: Text のflex: 1を新設のstationNameSlotView に逃がし、Text 自身は自然幅で描画 →scaleXで圧縮。HeaderE231/HeaderJRWest: 駅名 Text の style に直接transform: [{ scaleX }]を追加。src/utils/stationNameScale.test.ts: 新しい関数名・下限値(0.5)に合わせてテストを更新。テスト
npm run lintが通ることnpm testが通ることnpm run typecheckが通ること関連Issue
スクリーンショット(任意)
Generated by Claude Code
Summary by CodeRabbit
リリースノート