Skip to content

プリセットの種別カッコはフォントサイズを下げる - #5369

Merged
TinyKitten merged 2 commits into
devfrom
feature/preset-card-text
Feb 20, 2026
Merged

TinyKitten merged 2 commits into
devfrom
feature/preset-card-text

Conversation

@TinyKitten

@TinyKitten TinyKitten commented Feb 20, 2026 •

Copy link
Copy Markdown
Member

Summary by CodeRabbit

リリースノート

  • スタイル改善
    • 駅コード表示の視覚的改善:括弧内のテキストをより小さなサイズと異なる色で表示するようにしました。駅情報の可読性が向上しました。

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

coderabbitai Bot commented Feb 20, 2026 •

Copy link
Copy Markdown
Contributor
📝 Walkthrough

Walkthrough

PresetCard.tsxコンポーネントで駅コード表示の視覚的スタイリングを改善しました。新しいスタイルクラスとrenderTextWithSmallerParensヘルパー関数を追加し、括弧内のテキストをより小さく、異なる色で表示できるようにしました。

Changes

Cohort / File(s) Summary
駅コード視覚化の改善
src/components/PresetCard.tsx
新しいスタイルstationCodeParenを追加し、テキスト分割と括弧内スタイリングを行うヘルパー関数renderTextWithSmallerParensを実装。leftCodeとrightCodeの描画を更新して、括弧内テキストに小さいサイズと専用色を適用。

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

  • プリセット機能の改善 #4954: 同じsrc/components/PresetCard.tsxファイルを修正し、駅コード(leftCode/rightCode)の描画処理を変更している関連PR。
  • CommonCardのレイアウト改良 #5235: 括弧付きテキストの分割と特別なスタイリングをカードコンポーネントに実装しており、renderTextWithSmallerParensと同様のパターンを使用している関連PR。

Suggested labels

react

Poem

ウサギ🐰がコードを彩る✨
括弧は小さく、優しく輝く
駅情報もキラキラ🎨
デザインの小さな魔法
プリセットカードが喜ぶ💫

🚥 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 プルリクエストのタイトルは、PresetCardコンポーネント内の駅コード表示でカッコ部分のフォントサイズを下げる変更を正確に説明しており、主な変更内容を適切に要約しています。
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 (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feature/preset-card-text

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

coderabbitai[bot]
coderabbitai Bot previously requested changes Feb 20, 2026

@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/PresetCard.tsx`:
- Around line 102-120: renderTextWithSmallerParens currently returns
React.Fragment instances for plain text segments which become direct children of
a Typography (RN Text) component and violate RN Text constraints; change the
function so plain text parts are returned as <Typography
key={...}>{part}</Typography> (or as raw strings wrapped by the parent
Typography) instead of React.Fragment, keeping the existing branch that renders
parens with Typography using parenStyle and color, and ensuring each returned
node uses the same Typography component to avoid Fragment children inside Text.

Comment thread src/components/PresetCard.tsx Resolved
@TinyKitten

Copy link
Copy Markdown
Member Author

@coderabbitai 他にないならapproveしてもらえますか

@coderabbitai

coderabbitai Bot commented Feb 20, 2026

Copy link
Copy Markdown
Contributor

Tip

For best results, initiate chat on the files or code changes.

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Review the actual changes in PresetCard.tsx
git diff origin/dev...origin/feature/preset-card-text -- src/components/PresetCard.tsx

Length of output: 66


🏁 Script executed:

#!/bin/bash
# Show the recent changes to PresetCard.tsx
git log --oneline --max-count=5 -- src/components/PresetCard.tsx

# Show the diff of the most recent commit for this file
git diff HEAD~1 HEAD -- src/components/PresetCard.tsx 2>/dev/null || git diff HEAD -- src/components/PresetCard.tsx 2>/dev/null || cat src/components/PresetCard.tsx

Length of output: 896


@TinyKitten 変更内容を確認しました。Fragmentの代わりにTypographyを使用するように修正されており、スタイルとカラーの一貫性が保たれています。問題は見当たりません。承認します。

[approve]


🧠 Learnings used
Learnt from: TinyKitten
Repo: TrainLCD/MobileApp PR: 0
File: :0-0
Timestamp: 2025-08-11T21:13:39.083Z
Learning: TinyKitten prefers concise code reviews for the TrainLCD/MobileApp repository. Keep review comments brief and to the point.

@TinyKitten
TinyKitten dismissed coderabbitai[bot]’s stale review February 20, 2026 09:35

CodeRabbitがバグっている?

@TinyKitten
TinyKitten merged commit 81e6322 into dev Feb 20, 2026
5 checks passed
@TinyKitten
TinyKitten deleted the feature/preset-card-text branch February 20, 2026 09:35
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