Skip to content

使われていないReactコンポーネントを削除する#9808

Merged
komagata merged 1 commit intomainfrom
remove-unused-jsx-files
Mar 18, 2026
Merged

使われていないReactコンポーネントを削除する#9808
komagata merged 1 commit intomainfrom
remove-unused-jsx-files

Conversation

@komagata
Copy link
Copy Markdown
Member

@komagata komagata commented Mar 18, 2026

概要

どのViewやJSからも参照されていないReactコンポーネント(jsxファイル)を削除します。

削除対象

  • Events.jsx — View側は既にRails viewに移行済み
  • Pagination.jsx — Events.jsxからのみ参照されていた
  • LoadingMentorPageCategoriesPlaceholder.jsx — どこからも未参照
  • MentorPageLoadingView.jsx — 上記からのみ参照されていた

備考

closes #9800
closes #9801
closes #9802

Summary by CodeRabbit

リリースノート

  • Revert
    • イベント一覧表示機能を削除しました。
    • ページネーション機能を削除しました。
    • ローディング状態の表示を削除しました。

Events.jsx, Pagination.jsx, LoadingMentorPageCategoriesPlaceholder.jsx,
MentorPageLoadingView.jsx はどのViewやJSからも参照されていないため削除します。

closes #9800
closes #9801
closes #9802
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 18, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 9182a68e-914e-4a06-aab1-e41b36d7fc1b

📥 Commits

Reviewing files that changed from the base of the PR and between 0669728 and 544e5c4.

📒 Files selected for processing (4)
  • app/javascript/components/Events.jsx
  • app/javascript/components/LoadingMentorPageCategoriesPlaceholder.jsx
  • app/javascript/components/MentorPageLoadingView.jsx
  • app/javascript/components/Pagination.jsx
💤 Files with no reviewable changes (4)
  • app/javascript/components/Events.jsx
  • app/javascript/components/MentorPageLoadingView.jsx
  • app/javascript/components/Pagination.jsx
  • app/javascript/components/LoadingMentorPageCategoriesPlaceholder.jsx

📝 Walkthrough

Walkthrough

Reactで実装されたイベント一覧、ページネーション、ローディングプレースホルダーの4つのコンポーネントを削除しています。これらは非React化への移行に伴う削除です。総140行以上のコードが削除されます。

Changes

コホート / ファイル 変更内容
イベント一覧機能の削除
app/javascript/components/Events.jsx
SWRを使用したAPI連携、ページネーション、ローディング状態管理、エラーハンドリング、ユーザーアイコン生成を含むイベント一覧コンポーネントを削除。
ページネーション機能の削除
app/javascript/components/Pagination.jsx
クライアント側のページネーション制御、ページ範囲の計算、URLクエリパラメータの同期管理、ナビゲーション制御(First、Prev、Next、Last)を含むコンポーネントを削除。
ローディングプレースホルダーの削除
app/javascript/components/LoadingMentorPageCategoriesPlaceholder.jsx, app/javascript/components/MentorPageLoadingView.jsx
スケルトンテーブル表示によるローディング状態を管理するプレースホルダーコンポーネント2つを削除。

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related issues

Possibly related PRs

Suggested reviewers

  • matuaya
  • ryufuta

Poem

🐰 四つのコンポーネント、さようなら~
Reactの世代交代の時~
Rails viewへ帰ろう、ページネーション
ローディング画面も、バニラJSで輝く
非SPA化の道を一歩進めた🌙

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed 使われていないReactコンポーネント4つを削除する内容で、タイトルは変更内容を正確に要約しており、簡潔で明確です。
Description check ✅ Passed 概要、削除対象の詳細な説明、備考を含み、テンプレートの主要セクションは完了していますが、「変更確認方法」セクションが記述されていません。
Linked Issues check ✅ Passed PR内容は3つのリンクされたissueの要件を完全に満たしており、削除対象のコンポーネント(Events.jsx、Pagination.jsx、LoadingMentorPageCategoriesPlaceholder.jsx、MentorPageLoadingView.jsx)をすべて削除しています。
Out of Scope Changes check ✅ Passed 削除されたすべてのファイル(Events.jsx、Pagination.jsx、LoadingMentorPageCategoriesPlaceholder.jsx、MentorPageLoadingView.jsx)はリンクされたissueで指定された非React化の対象であり、スコープ内の変更です。
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 remove-unused-jsx-files
📝 Coding Plan
  • Generate coding plan for human review comments

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

Tip

CodeRabbit can generate a title for your PR based on the changes with custom instructions.

Set the reviews.auto_title_instructions setting to generate a title for your PR based on the changes in the PR with custom instructions.

@komagata komagata removed the request for review from okuramasafumi March 18, 2026 18:05
@github-project-automation github-project-automation bot moved this to 作業中 in bootcamp Mar 18, 2026
@komagata komagata merged commit 0b9aa99 into main Mar 18, 2026
6 checks passed
@github-project-automation github-project-automation bot moved this from 作業中 to 完成 in bootcamp Mar 18, 2026
@komagata komagata deleted the remove-unused-jsx-files branch March 18, 2026 18:06
@github-actions github-actions bot mentioned this pull request Mar 18, 2026
27 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

Events.jsx を非React化する(再) LoadingListPlaceholder.jsx / MentorPageLoading系を非React化する Pagination.jsx を非React化する

1 participant