Repository navigation
Header駅名スロットにminWidth: 0を追加して圧縮が効かなくなる回帰を修正 - #6063
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
📝 WalkthroughWalkthroughHeaderE231、HeaderE235、HeaderJL、HeaderJRWest の4つのヘッダーコンポーネントの駅名表示スタイルに ChangesFlex レイアウト最小幅調整
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~5 minutes Possibly related PRs
Suggested labels
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)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
ESLint skipped: no ESLint configuration detected in root package.json. To enable, add Comment |
概要
PR #6060 で導入した駅名圧縮の修正に回帰があった。可視 Text に
width: naturalTextWidthを渡しても、スロット側のデフォルトmin-width: autoにより Text の自然幅がスロット自身を押し広げてしまい、onLayoutが natural と同じ値を返してscaleX = 1(圧縮ゼロ)になっていた。実機でも「…」は消えたが文字が画面外へはみ出すだけになっていたので追従修正する。変更の種類
変更内容
HeaderE231(stationNameWrapper) /HeaderE235(stationNameSlot) /HeaderJL(stationNameSlot) /HeaderJRWest(stationNameContainer) にminWidth: 0を追加。これにより flex 子要素の既定min-width: autoを上書きし、内側 Text のwidth: naturalTextWidthがスロット/コンテナ自体を押し広げる回帰を抑止する。scaleX = containerWidth / naturalTextWidthが想定通りに計算され、極端に長い駅名でも字幅圧縮が機能する。テスト
npm run lintが通ることnpm testが通ることnpm run typecheckが通ること関連Issue
スクリーンショット(任意)
Generated by Claude Code
Summary by CodeRabbit