Skip to content

フィードバックモーダルをハーフモーダルからセンタリング表示に変更 - #6036

Merged
TinyKitten merged 1 commit into
devfrom
feature/feedback-modal-centered
May 25, 2026
Merged

TinyKitten merged 1 commit into
devfrom
feature/feedback-modal-centered

Conversation

@TinyKitten

@TinyKitten TinyKitten commented May 25, 2026 •

Copy link
Copy Markdown
Member

概要

横画面 (landscape) で NewReportModal (フィードバック送信モーダル) を開くと、CustomModal のデフォルト maxHeight: 75% (= 720px 端末で 540px) と overflow: hidden、および justifyContent: 'flex-end' のボトムシート配置とが重なって、注意書きや送信ボタンが画面外に切れて操作できなくなっていた (#6031)。

そもそも本モーダルが画面下端に貼り付くハーフモーダルである必然性は薄かったため、CustomModal のデフォルトであるセンタリング表示に切り替え、内容を ScrollView でラップして両画面向き・縦長フォーム両方で安定して表示・操作できるようにする。

変更の種類

  • バグ修正 (既存機能の問題を修正)
  • 新機能 (新しい機能の追加)
  • リファクタリング (機能変更を伴わないコードの改善)
  • ドキュメント更新
  • CI/CD関連の変更
  • その他 (詳細を記載):

変更内容

  • src/components/NewReportModal.tsx
    • containerStyle の justifyContent: 'flex-end' / padding: 0 等のボトムシート配置を撤去し、CustomModal のデフォルト center 配置 (画面中央・周囲に余白) に乗せる
    • modalView を borderRadius: 16 の全周角丸に統一 (旧: 上端のみ角丸 + iPhone のみ全周という分岐)
    • 中身を ScrollView (keyboardShouldPersistTaps="handled") でラップ。CustomModal 側の maxHeight: 75% に収まらない端末・フォントサイズでも送信ボタンまで到達可能に
    • 横/縦パディング (32 / 32) を ScrollView の contentContainerStyle へ集約
    • 不要になった isTablet import を削除

テスト

  • npm run lint
  • npm test
  • npm run typecheck

関連Issue

Closes #6031

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

Summary by CodeRabbit

リリースノート

  • 改善
    • レポート送信モーダルがスクロール対応になり、長いコンテンツの閲覧がより快適になりました。レイアウトとスタイルを最適化し、キーボード操作時の動作をより安定させました。

Review Change Stack

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

coderabbitai Bot commented May 25, 2026 •

Copy link
Copy Markdown
Contributor

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: fa2e8ebf-03c2-4a2d-8094-4c0b6069ad41

📥 Commits

Reviewing files that changed from the base of the PR and between 4d93d04 and 697c78a.

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

📝 Walkthrough

Walkthrough

NewReportModalコンポーネントのレイアウトをスクロール対応に再構成。ScrollViewをimportに追加し、isTabletの端末判定を削除。modalViewのスタイルを整理して新規scrollContentを定義。CustomModalへのスタイルプロップ名をbackdropStyle/contentContainerStyleに変更し、モーダルコンテンツをScrollView + Pressableラッパーで構成し直した。

Changes

Scrollable Modal Layout

Layer / File(s) Summary
Dependencies and style setup
src/components/NewReportModal.tsx
ScrollViewをreact-nativeからimportに追加。isTabletのimportを削除し、device判定による角丸分岐を撤廃。modalViewの角丸定義を統一し、ScrollView領域用のpadding定義scrollContentを新規追加。
Modal layout refactoring with scrollable structure
src/components/NewReportModal.tsx
CustomModalへのスタイルプロップをbackdropStyle/contentContainerStyleに変更。モーダルコンテンツをScrollView + Pressable(キーボード閉じる)構成に再構成し、keyboardShouldPersistTaps="handled"を設定。注意文とボタンをScrollView内に統合してlandscape対応を実現。

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 モーダルがくるりと回転しても、
スクロールで内容はしっかり見える。
横向きの景色も縦向きも、
もう画面端には押し込まれない!
フィードバックは自由に流れる ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed PR タイトルはモーダルの表示形式をハーフモーダルからセンタリング表示に変更するという主要な変更内容を正確かつ簡潔に表現しており、実装内容と合致している。
Description check ✅ Passed PR説明は概要、変更の種類、変更内容、テスト実行状況、関連Issueを含んでおり、テンプレート要件をおおむね満たしている。
Linked Issues check ✅ Passed PR の変更内容は Issue #6031 で報告された landscape 表示時のモーダルレイアウト問題を直接解決しており、リンク済みの要件を満たしている。
Out of Scope Changes check ✅ Passed PR の全変更は NewReportModal.tsx のレイアウト修正に限定されており、#6031 の解決に必要な変更のみで、スコープ外の変更は見当たらない。
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/feedback-modal-centered

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint skipped: no ESLint configuration detected in root package.json. To enable, add eslint to devDependencies.


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

@TinyKitten
TinyKitten merged commit 1f9baea into dev May 25, 2026
6 checks passed
@TinyKitten
TinyKitten deleted the feature/feedback-modal-centered branch May 25, 2026 02:46
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.

landscape でフィードバックのハーフモーダルが画面下に押し込まれて見切れる

1 participant