Repository navigation
NumberingIconSquareのTLC黒枠表示を修正 - #5636
Conversation
Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
|
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 (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughCommonCard・TransferLineMarkで子要素のオーバーフロー表示を許可し、NumberingIcon系に三文字コード(TLC)表示パスとスケーリング調整を導入。複数箇所で Changes
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
src/components/CommonCard.tsx (1)
367-371: ネストした三項演算子の可読性についてロジック自体は正しく動作しますが、ネストした三項演算子は可読性が低下する可能性があります。将来のメンテナンス性向上のため、
useMemoでスタイルを事前計算することを検討してください。♻️ リファクタリング案
+ const markTransformStyle = useMemo(() => { + if (!(!mark.signPath || targetStationNumber)) { + return null; + } + if (targetStationThreeLetterCode) { + return null; + } + return { transform: [{ scale: 0.5 }] }; + }, [mark?.signPath, targetStationNumber, targetStationThreeLetterCode]); <View style={[ styles.mark, - !mark.signPath || targetStationNumber - ? targetStationThreeLetterCode - ? null - : { transform: [{ scale: 0.5 }] } - : null, + markTransformStyle, ]} >🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/components/CommonCard.tsx` around lines 367 - 371, The nested ternary that computes the style (using mark.signPath, targetStationNumber, and targetStationThreeLetterCode) is hard to read; refactor by computing the style in a useMemo inside the CommonCard component (or the component that contains this JSX) and return either null, { transform: [{ scale: 0.5 }] } or undefined based on clearer boolean checks (e.g., derive isSignMissing = !mark.signPath && !targetStationNumber and needsScale = !targetStationThreeLetterCode), then replace the inline nested ternary with the memoized style variable; reference the variables mark, targetStationNumber, targetStationThreeLetterCode and the CommonCard component to locate and update the logic.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@src/components/CommonCard.tsx`:
- Around line 367-371: The nested ternary that computes the style (using
mark.signPath, targetStationNumber, and targetStationThreeLetterCode) is hard to
read; refactor by computing the style in a useMemo inside the CommonCard
component (or the component that contains this JSX) and return either null, {
transform: [{ scale: 0.5 }] } or undefined based on clearer boolean checks
(e.g., derive isSignMissing = !mark.signPath && !targetStationNumber and
needsScale = !targetStationThreeLetterCode), then replace the inline nested
ternary with the memoized style variable; reference the variables mark,
targetStationNumber, targetStationThreeLetterCode and the CommonCard component
to locate and update the logic.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 88614caf-3edd-444d-82d5-a30fb88a8f4c
📒 Files selected for processing (6)
src/components/CommonCard.tsxsrc/components/LineBoardJO.tsxsrc/components/LineBoardJRKyushu.tsxsrc/components/NumberingIconSquare.tsxsrc/components/PadArch.tsxsrc/components/TransferLineMark.tsx
Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Summary
変更内容
transform: scale(0.7)によるレイアウト/ビジュアル不一致を解消。TLCサイズをコンテキスト別に直接ピクセル値で定義(SMALL: TLC省略、LARGE/MEDIUM: コンパクトTLC、デフォルト: 0.7xサイズ)numberingIconContainerのサイズをTLCコンテンツに対応するよう拡大scale: 0.5を適用しないよう変更overflow: 'visible'を追加threeLetterCodepropを追加threeLetterCodepropを追加Test plan
🤖 Generated with Claude Code
Summary by CodeRabbit
リリースノート