Skip to content

一部テーマで行き先を1行で表示するように修正 - #5305

Merged
TinyKitten merged 2 commits into
devfrom
fix/bound-text
Feb 17, 2026
Merged

TinyKitten merged 2 commits into
devfrom
fix/bound-text

Conversation

@TinyKitten

@TinyKitten TinyKitten commented Feb 17, 2026 •

Copy link
Copy Markdown
Member

Summary by CodeRabbit

  • バグ修正
    • 一部テーマ(YAMANOTE、JL、JO)でヘッダーの状態テキスト内の改行がスペースに置換され、表示が崩れないようにしました。右側のテキスト表示はそのまま維持されます。

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

coderabbitai Bot commented Feb 17, 2026 •

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉


📝 Walkthrough

Walkthrough

useHeaderStateText.ts フックに theme Atom を統合し、YAMANOTE、JL、JO テーマの場合に状態テキスト内の改行をスペースに置き換える条件付きロジックを追加しました。

Changes

Cohort / File(s) Summary
Theme-based text formatting
src/hooks/useHeaderStateText.ts
themeAtom への依存を追加し、特定のテーマ(YAMANOTE、JL、JO)の場合にのみ stateText 内の改行をスペースに置き換える条件付きロジックを実装。stateTextRight は変更なし。

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Suggested labels

react

Poem

🐰 ウサギが言う、テーマの味
改行たちをスペースに変えて
YAMANOTE の線路も JL も JO も
きれいに整った景色になった
さあ、新しい景色を楽しもう!

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed プルリクエストのタイトルは、変更の主要な内容を的確に説明しており、具体的で明確です。一部のテーマで行き先テキストを1行で表示する修正という主要な変更を正確に反映しています。
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Merge Conflict Detection ✅ Passed ✅ No merge conflicts detected when merging into dev

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

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/bound-text

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.

🧹 Nitpick comments (1)
src/hooks/useHeaderStateText.ts (1)

95-104: ES6 shorthand property を使用可能。

ロジックは正しいです。stateTextRight: stateTextRight は shorthand で簡略化できます。

♻️ 提案
   if (
     currentTheme === APP_THEME.YAMANOTE ||
     currentTheme === APP_THEME.JL ||
     currentTheme === APP_THEME.JO
   ) {
     return {
       stateText: stateText.replaceAll('\n', ' '),
-      stateTextRight: stateTextRight,
+      stateTextRight,
     };
   }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/hooks/useHeaderStateText.ts` around lines 95 - 104, The returned object
in the conditional uses an explicit property assignment for stateTextRight;
change it to the ES6 shorthand by returning stateTextRight without the
colon/value repetition. Update the return in the block that checks currentTheme
against APP_THEME.YAMANOTE, APP_THEME.JL, and APP_THEME.JO so it returns {
stateText: stateText.replaceAll('\n', ' '), stateTextRight } instead of
stateTextRight: stateTextRight to use shorthand syntax.
🤖 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/hooks/useHeaderStateText.ts`:
- Around line 95-104: The returned object in the conditional uses an explicit
property assignment for stateTextRight; change it to the ES6 shorthand by
returning stateTextRight without the colon/value repetition. Update the return
in the block that checks currentTheme against APP_THEME.YAMANOTE, APP_THEME.JL,
and APP_THEME.JO so it returns { stateText: stateText.replaceAll('\n', ' '),
stateTextRight } instead of stateTextRight: stateTextRight to use shorthand
syntax.

@TinyKitten
TinyKitten merged commit 7990398 into dev Feb 17, 2026
5 checks passed
@TinyKitten
TinyKitten deleted the fix/bound-text branch February 17, 2026 03:51
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