Skip to content

LineBoardJOのバーセグメントを右へ1px重ねてピクセル丸めによる白い継ぎ目を解消 - #6356

Merged
TinyKitten merged 1 commit into
devfrom
claude/lineboardjo-seam-fix-6a5x91
Jul 4, 2026
Merged

TinyKitten merged 1 commit into
devfrom
claude/lineboardjo-seam-fix-6a5x91

Conversation

@TinyKitten

@TinyKitten TinyKitten commented Jul 4, 2026 •

Copy link
Copy Markdown
Member

概要

LineBoardJO の路線カラーバーで、駅ごとのセグメントの間に 1px 幅の白い継ぎ目が見えることがある問題を修正しました。

変更の種類

  • バグ修正
  • 新機能
  • リファクタリング
  • ドキュメント
  • CI/CD
  • その他

変更内容

  • src/components/LineBoardJO.tsx: バーセグメントの幅を barWidth + 1 にして右へ 1px 食み出させ、隣接セグメント同士を重ねるようにした。
  • 原因: barWidth は小数(スマホでは (画面幅 - 96) / 7.835)を含むため、left: barWidth * i / width: barWidth で敷き詰めるとセグメント境界が物理ピクセルに揃わず、丸めの具合で背景の白が 1px 覗くことがある。
  • 後続セグメントが上に描画されるため、色の境界位置(現在駅の赤・通過済みのグレー・路線色の切り替わり)は見た目上変わらない。PortraitMain.tsx の縦棒で採用済みの継ぎ目対策と同じ手法。

リグレッションリスクと緩和

  • 影響範囲は LineBoardJO のバー描画のみ。1px の食み出しは後続セグメントまたは終端の三角形に覆われるため、レイアウト崩れのリスクは低い。
  • LineBoardJO.test.tsx の既存 12 テストを含む全テストスイートがグリーンであることを確認済み。
  • 同じ敷き詰めパターンを持つ LineBoardWest.tsx は今回のスコープ外(同様の対策を横展開する場合は別PRで対応可能)。

テスト

  • npm run lint が通ること
  • npm test が通ること(185 suites / 1955 tests パス)
  • npm run typecheck が通ること

関連Issue

スクリーンショット(任意)


Generated by Claude Code

Summary by CodeRabbit

  • Bug Fixes
    • セグメント表示の境界で発生していた白いすき間を軽減しました。
    • バーの表示幅をわずかに広げ、隣接セグメントが重なるようにして、表示の乱れを抑えました。

@TinyKitten TinyKitten self-assigned this Jul 4, 2026
@github-actions github-actions Bot added the react label Jul 4, 2026
@coderabbitai

coderabbitai Bot commented Jul 4, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: e6290b40-ac61-4876-969a-5c61b0f52255

📥 Commits

Reviewing files that changed from the base of the PR and between 3c92f36 and 4fbda57.

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

📝 Walkthrough

Walkthrough

LineBoardJOコンポーネントのセグメント描画において、各バーのwidthをbarWidthからbarWidth + 1へ変更した。境界部分での隙間発生を抑える目的の1行修正であり、他のロジックには変更がない。

Changes

バー幅修正

Layer / File(s) Summary
バー描画幅の調整
src/components/LineBoardJO.tsx
セグメントバーのwidthをbarWidthからbarWidth + 1に変更し、隣接セグメントを1px重ねる描画にした。

Estimated code review effort: 1 (Trivial) | ~2 minutes

Poem

ぴょんと跳ねて 隙間を埋める
1pxの魔法で 白線消える
バーとバーが 仲良く重なる
うさぎも満足 ぴょんぴょこぴょん 🐰

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed 変更内容の中心であるLineBoardJOのバーセグメント重なりによる白い継ぎ目解消を的確に表しています。
Description check ✅ Passed 概要、変更種類、変更内容、テストが揃っており、テンプレート要件を概ね満たしています。
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ 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 claude/lineboardjo-seam-fix-6a5x91

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

@TinyKitten
TinyKitten merged commit 84b350b into dev Jul 4, 2026
6 checks passed
@TinyKitten
TinyKitten deleted the claude/lineboardjo-seam-fix-6a5x91 branch July 4, 2026 17:56
@TinyKitten TinyKitten mentioned this pull request Jul 4, 2026
4 of 9 tasks
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.

2 participants