Skip to content

ナンバリング未設定の乗換路線ドット表示にmarginTopを追加 - #5649

Merged
TinyKitten merged 6 commits into
devfrom
feature/fix-pad-line-marks-dot-margin
Mar 23, 2026
Merged

TinyKitten merged 6 commits into
devfrom
feature/fix-pad-line-marks-dot-margin

Conversation

@TinyKitten

@TinyKitten TinyKitten commented Mar 23, 2026 •

Copy link
Copy Markdown
Member

Summary

  • タブレット表示のPadLineMarksで、ナンバリングが設定されていない乗換路線(ドット表示)にナンバリングありの路線と同じmarginTopがなかったのを修正
  • 既存のインラインスタイルもuseMemoにまとめてリファクタリング
  • NumberingIconSquareにMEDIUM/LARGEサイズ対応を追加し、乗換画面でスクエア型ナンバリングアイコンがフルサイズで表示されるバグを修正(NumberingIconRoundと同様のパターン)

Test plan

  • タブレットでナンバリング未設定の乗換路線(例: あいの風とやま鉄道線)とナンバリングありの路線が混在する駅で垂直マージンが揃っていることを確認
  • 乗換画面でスクエア型ナンバリングアイコン(例: 富山地鉄本線)が適切なサイズで表示されることを確認
  • JR西日本テーマでも表示が崩れないことを確認

🤖 Generated with Claude Code

Summary by CodeRabbit

リリースノート

  • 新機能

    • 中〜大サイズの番号表示に、白背景の正方形で路線記号のみを表示する新しい見た目を追加しました。
  • バグ修正 / 改善

    • ラインマークの上マージンを一貫して適用し、表示位置の不整合を修正しました。
    • 転ラインのドットサイズを端末に応じた定数で安定化し、表示の一貫性を改善しました。
  • リファクタリング

    • 描画フローとスタイル処理を簡素化し、不要な重複を削減しました。

@github-actions github-actions Bot added the react label Mar 23, 2026
@coderabbitai

coderabbitai Bot commented Mar 23, 2026 •

Copy link
Copy Markdown
Contributor

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 9f10802a-97c7-447d-ac1a-f23e38181722

📥 Commits

Reviewing files that changed from the base of the PR and between ffa0849 and 7240f3b.

📒 Files selected for processing (1)
  • src/components/PadLineMarks.tsx
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/components/PadLineMarks.tsx

📝 Walkthrough

Walkthrough

PadLineMarksで高さスケーリングを除去し、marginTopを固定値に変更。NumberingIconSquareにmediumサイズかつthreeLetterCode未指定の早期レンダーパスと新スタイルを追加。TransferLineDotでドットサイズを定数化し、useMemo依存をdotSizeへ更新。

Changes

Cohort / File(s) Summary
Pad line mark styling
src/components/PadLineMarks.tsx
useScaleとheightScale(...)呼び出しを削除。外側コンテナのmarginTopをPlatform.select({ ios: 8, default: 0 })へ置換、stylesNormal.lineMarkWrapper/stylesWest.lineMarkWrapperにmarginTop: 4追加。各アイテムは共有styles.lineMarkWrapperを使用し、TransferLineDotへの冗長なkeyプロップを削除(ラッパーに残存)。
Numbering icon medium branch
src/components/NumberingIconSquare.tsx
size === NUMBERING_ICON_SIZE.MEDIUMかつthreeLetterCode未指定の専用レンダーパスを追加。rootMediumとlineSymbolMediumスタイルを導入し、白背景の正方形でlineSymbolのみを描画する新経路を追加(tablet/iOSのタイポ調整含む)。既存のCommon経路をバイパス。
Transfer dot sizing
src/components/TransferLineDot.tsx
ドットサイズをDOT_SIZE_DEFAULT(tablet-aware)とDOT_SIZE_SMALLに定数化。lineDotの幅/高さをこれらに変更し、useMemoの依存配列をdotSizeへ更新。グレースケール/カラー挙動は維持。

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐰✨
marginを直してぴょんと跳ね、
中くらいの箱は白でふんわり、
ドットは定数でこしらえたよ。
今日もコード畑でぴょんぴょん♪

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed タイトルは、PR の主要な変更内容(ナンバリング未設定の乗換路線ドットにmarginTopを追加して垂直位置を揃える修正)を簡潔かつ明確に要約している。
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/fix-pad-line-marks-dot-margin

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 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/NumberingIconSquare.tsx`:
- Around line 317-326: The MEDIUM/LARGE early return in NumberingIconSquare.tsx
skips the common wrapper that applies allowScaling and withOutline, causing
inconsistent rendering; update the MEDIUM/LARGE branch that returns the View
with styles.rootMedium and Typography(styles.lineSymbolMedium) to use the same
wrapper/logic as other sizes (or call the shared render wrapper), passing
through the allowScaling and withOutline props so scaling and outline behavior
remains consistent for NUMBERING_ICON_SIZE.MEDIUM and NUMBERING_ICON_SIZE.LARGE.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 558266ee-8fb7-41a1-83eb-cce7a9859fd5

📥 Commits

Reviewing files that changed from the base of the PR and between b819d69 and 52184a6.

📒 Files selected for processing (1)
  • src/components/NumberingIconSquare.tsx

Comment thread src/components/NumberingIconSquare.tsx Resolved

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
src/components/PadLineMarks.tsx (1)

148-167: 冗長な key プロップ

Line 149 の親 View に既に key={transferLines[i]?.id} が設定されているため、Line 151 の TransferLineDot の key は不要です。

♻️ 修正案
          <View style={styles.lineMarkWrapper} key={transferLines[i]?.id}>
            <TransferLineDot
-             key={transferLines[i]?.id}
              line={transferLines[i]}
              small
              shouldGrayscale={shouldGrayscale}
            />
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/components/PadLineMarks.tsx` around lines 148 - 167, 親の View にすでに
key={transferLines[i]?.id} が付いているため、子コンポーネント TransferLineDot から重複する key
プロップを削除してください(該当する箇所は View と TransferLineDot のブロック、変数 transferLines[i]?.id
を参照)。リスト要素の一意キーは View 側で保持し、子コンポーネントには key を渡さないように修正してください。
🤖 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/PadLineMarks.tsx`:
- Around line 148-167: 親の View にすでに key={transferLines[i]?.id} が付いているため、子コンポーネント
TransferLineDot から重複する key プロップを削除してください(該当する箇所は View と TransferLineDot のブロック、変数
transferLines[i]?.id を参照)。リスト要素の一意キーは View 側で保持し、子コンポーネントには key
を渡さないように修正してください。

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: def79644-a2fd-4f7f-bdfb-cfb8909baf9d

📥 Commits

Reviewing files that changed from the base of the PR and between 2382946 and ffa0849.

📒 Files selected for processing (1)
  • src/components/PadLineMarks.tsx

@TinyKitten
TinyKitten merged commit c586548 into dev Mar 23, 2026
5 checks passed
@TinyKitten
TinyKitten deleted the feature/fix-pad-line-marks-dot-margin branch March 23, 2026 10:46
@TinyKitten TinyKitten self-assigned this Mar 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant