Repository navigation
HeaderE231のレイアウト調整 - #5767
Merged
Merged
HeaderE231のレイアウト調整#5767
Conversation
Contributor
📝 WalkthroughウォークスルーHeaderE231とTrainTypeBoxE231の2つのコンポーネントにおいて、レイアウトサイズング、テキスト表示ロジック、言語対応を改善。HeaderE231ではレイアウト定数化と言語別ラベルテキストの実装を追加。TrainTypeBoxE231では条件付き短縮形式化と多言語対応を強化し、フォントサイジングロジックを調整。 変更内容
推定レビュー工数🎯 3 (中程度) | ⏱️ ~20分 🎯 4 (複雑) | ⏱️ ~50分 詩
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Contributor
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 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/components/HeaderE231.tsx`:
- Around line 190-201: The clockLabelText useMemo switch is missing a 'KANA'
branch so KANA mode falls back to the kanji default; add an explicit case 'KANA'
in the switch (inside the useMemo where clockLabelText is defined and dependent
on headerLangState) that returns the kana string you want (e.g., 'げんざいじこく'),
leaving other cases and the dependency array unchanged so KANA displays the
correct kana label.
In `@src/components/TrainTypeBoxE231.tsx`:
- Around line 123-125: In TrainTypeBoxE231, when forceShort is true the code
returns null if kind is missing or map[kind] is undefined, causing the whole
component to disappear; change the fallback so that when shortName is falsy you
return the original name instead of null (i.e., update the branch that defines
shortName and its return to use shortName ?? name), so the component renders the
full label if no shortened mapping exists.
🪄 Autofix (Beta)
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: 3f318b95-83c3-407c-84e0-f9cc193e82aa
📒 Files selected for processing (2)
src/components/HeaderE231.tsxsrc/components/TrainTypeBoxE231.tsx
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.
概要
変更の種類
変更内容
テスト
npm run lintが通ることnpm testが通ることnpm run typecheckが通ること関連Issue
スクリーンショット(任意)
Summary by CodeRabbit