Skip to content

ユーザーのフォロー表示に関わる不要なvueファイルの削除#8849

Merged
komagata merged 1 commit intomainfrom
chore/replace-following-vue-component
Jul 11, 2025
Merged

ユーザーのフォロー表示に関わる不要なvueファイルの削除#8849
komagata merged 1 commit intomainfrom
chore/replace-following-vue-component

Conversation

@e-yanagita-gs
Copy link
Copy Markdown
Contributor

@e-yanagita-gs e-yanagita-gs commented Jun 24, 2025

Issue

概要

ユーザーのフォロー表示に関わっていた不要なVueファイルを削除した。

変更確認方法

  1. chore/replace-following-vue-component ブランチをローカルに取り込みます。

    git fetch origin chore/replace-following-vue-component
    git checkout chore/replace-following-vue-component
  2. foreman start -f Procfile.devでサーバーを立ち上げます。

  3. 任意のユーザーとしてログインします。

  4. 他のユーザーのプロフィールページなど、フォローボタンが表示されているページにアクセスします。

  5. 以下のフォロー/アンフォロー操作を試し、正常に動作することを確認します。

    • 「フォローする」ボタンからドロップダウンを開き、「コメントあり」または「コメントなし」でフォローする。
    • フォロー後、ボタンの表示が正しく「コメントあり」「コメントなし」に変わる。
    • 再度ドロップダウンを開き、「フォローしない」を選択してアンフォローできる。
    • アンフォロー後、ボタンの表示が「フォローする」に戻る。

Screenshot

※ファイルの削除のみであり、UI(見た目)の変更はないためスクリーンショットはありません。

Summary by CodeRabbit

  • 削除
    • ユーザーのフォロー・ウォッチ状態を管理するUIコンポーネントが削除されました。これにより、他ユーザーのフォロー・ウォッチ操作やその状態表示機能が利用できなくなります。
    • メンターのコース一覧表示に関するReactコンポーネント群が削除され、代わりにサーバーサイドでレンダリングされたHTMLテーブルに置き換えられました。
    • コース情報を取得するAPIエンドポイントとそれに対する認証テストが削除されました。

@e-yanagita-gs e-yanagita-gs self-assigned this Jun 24, 2025
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Jun 24, 2025

## Walkthrough

Vue.jsのシングルファイルコンポーネント「following.vue」、Reactコンポーネント「MentorCourses.jsx」および関連する読み込み用プレースホルダーコンポーネントが削除されました。また、APIコントローラー「API::CoursesController」とその統合テストも削除され、メンターコース一覧はサーバーサイドレンダリングのHTMLテーブルに置き換えられました。

## Changes

| ファイル/パス                                   | 変更内容概要                                                         |
|------------------------------------------------|----------------------------------------------------------------------|
| app/javascript/following.vue                    | ユーザーのフォロー・ウォッチ管理用Vueコンポーネントを削除            |
| app/javascript/components/MentorCourses.jsx     | Reactによるメンターコース一覧コンポーネントを削除                    |
| app/javascript/components/LoadingMentorPageCoursesPlaceholder.jsx | メンターコース読み込み用プレースホルダーReactコンポーネントを削除   |
| app/javascript/components/MentorPageLoadingView.jsx | メンターコース読み込み用テーブル表示Reactコンポーネントを削除       |
| app/controllers/api/courses_controller.rb       | API::CoursesControllerを削除                                        |
| test/integration/api/courses_test.rb             | API::CoursesControllerの統合テストを削除                             |
| app/views/mentor/courses/index.html.slim         | ReactコンポーネントからサーバーサイドレンダリングのHTMLテーブルへ置換 |

## Suggested reviewers

- e-yanagita-gs
- komagata

## Poem

> さよならVueの小さな友、  
> フォローとウォッチを見守った日々。  
> ボタンのラベルも、APIの道も、  
> ふわふわ消えて、春風に舞う。  
> 新しい朝に、ぴょんと跳ねて、  
> コードの野原でまた会おう!  
> 🐇
✨ Finishing Touches
  • 📝 Generate Docstrings

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@e-yanagita-gs e-yanagita-gs requested a review from thmz337 June 24, 2025 04:14
@e-yanagita-gs
Copy link
Copy Markdown
Contributor Author

@thmz337
お疲れ様です。
こちらレビューをお願いすることは可能でしょうか?

@thmz337
Copy link
Copy Markdown
Contributor

thmz337 commented Jun 24, 2025

@e-yanagita-gs

こんにちは。レビューさせていただきますね

@e-yanagita-gs
Copy link
Copy Markdown
Contributor Author

@thmz337
ありがとうございます!
よろしくお願いいたしますm(_ _)m

@thmz337
Copy link
Copy Markdown
Contributor

thmz337 commented Jun 24, 2025

@e-yanagita-gs

お疲れ様です。確認しているのですが、イシューを見ると実装の置き換えも要求されているような気がします。

ファイルの削除のみで良いのでしょうか?

@e-yanagita-gs
Copy link
Copy Markdown
Contributor Author

@thmz337

ご確認いただきありがとうございます!
ご指摘の通り、このIssueは最終的に「実装の置き換え」を目的としており、当初はそのつもりで調査を進めておりました。

しかし調査を進めたところ、フォロー機能は既に以下のファイルを中心とした、Railsのview + Vanilla JS形式での実装の置き換えが完了していました。

  • _following.html.slim
  • app/javascript/user-follow.js
  • app/controllers/api/followings_controller.rb
  • app/models/following.rb

さらに詳しく調べた結果、今回削除対象の following.vue は、現在どこからも使用されていない孤立したファイルとなっている状態であったことから、フォロー機能は既にRailsのview + Vanilla JS形式に置き換わっており、削除対象となっているVueファイルはどこからも参照されていないファイルと判断いたしました。

そのため、今回のプルリクエストでは、実装の置き換えは行わず、不要となっているファイルの削除のみを行った、という経緯になります。

ご確認のほど、よろしくお願いいたします。

@thmz337
Copy link
Copy Markdown
Contributor

thmz337 commented Jun 25, 2025

@e-yanagita-gs

ご丁寧にありがとうございます🙇
経緯について良く分かりました。

またご連絡させていただきますね。

@thmz337
Copy link
Copy Markdown
Contributor

thmz337 commented Jun 27, 2025

@e-yanagita-gs

さらに詳しく調べた結果、今回削除対象の following.vue は、現在どこからも使用されていない孤立したファイルとなっている状態であったことから、フォロー機能は既にRailsのview + Vanilla JS形式に置き換わっており、削除対象となっているVueファイルはどこからも参照されていないファイルと判断いたしました。

#7426に対応箇所を見つけることができました。
問題なさそうですので、approveさせていただきます。

@e-yanagita-gs
Copy link
Copy Markdown
Contributor Author

@thmz337
ありがとうございます!
ご丁寧に対応箇所まで調査いただきありがとうございますm(_ _)m

@komagata
お疲れ様です!
こちら、お手すきでレビューをお願いいたします。

@e-yanagita-gs e-yanagita-gs requested a review from komagata June 30, 2025 00:28
Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 52c5c11 and ebef8c1.

📒 Files selected for processing (6)
  • app/controllers/api/courses_controller.rb (0 hunks)
  • app/javascript/components/LoadingMentorPageCoursesPlaceholder.jsx (0 hunks)
  • app/javascript/components/MentorCourses.jsx (0 hunks)
  • app/javascript/components/MentorPageLoadingView.jsx (0 hunks)
  • app/views/mentor/courses/index.html.slim (1 hunks)
  • test/integration/api/courses_test.rb (0 hunks)
💤 Files with no reviewable changes (5)
  • app/controllers/api/courses_controller.rb
  • app/javascript/components/LoadingMentorPageCoursesPlaceholder.jsx
  • test/integration/api/courses_test.rb
  • app/javascript/components/MentorPageLoadingView.jsx
  • app/javascript/components/MentorCourses.jsx
⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: build_and_test
🔇 Additional comments (2)
app/views/mentor/courses/index.html.slim (2)

29-52: PRの目的と実際の変更内容に不整合があります

PRの目的は「ユーザーのフォロー表示に関わる不要なvueファイルの削除」となっていますが、実際の変更内容はメンターコース一覧のReactコンポーネントをサーバーサイドレンダリングのHTMLテーブルに置き換える内容になっています。この不整合について確認が必要です。

Likely an incorrect or invalid review comment.


29-39: HTMLテーブル構造の実装は適切です

セマンティックなHTMLテーブル構造で実装されており、ヘッダー行とCSS クラスの使用も適切です。管理画面のテーブルとして必要な要素が含まれています。

@thmz337
Copy link
Copy Markdown
Contributor

thmz337 commented Jun 30, 2025

@e-yanagita-gs @komagata

すいません!間違ってこちらのブランチにPRを投げてしまいました...。
修正させていただきますので、少々お待ちいただけますでしょうか。

@thmz337
Copy link
Copy Markdown
Contributor

thmz337 commented Jun 30, 2025

@e-yanagita-gs @komagata

revertさせていただきました。こちら別の対応が良い場合はご教示いただけますでしょうか。
お手を煩わせてしまい申し訳ございません。

@komagata
Copy link
Copy Markdown
Member

komagata commented Jul 2, 2025

@thmz337 revertは緊急的にリリースを元に戻すときなど稀な時にしか使わないやつです。
普通に治す場合はgit reset系を使ってください。

@e-yanagita-gs
Copy link
Copy Markdown
Contributor Author

e-yanagita-gs commented Jul 4, 2025

@komagata
お疲れ様です。
こちら私の方で必要な作業等ありますでしょうか?

@komagata
Copy link
Copy Markdown
Member

komagata commented Jul 6, 2025

@e-yanagita-gs さんの方ではできることはないかなと思います。

@thmz337 こちら @e-yanagita-gs さんの作業に影響が出ているかもなので優先して対応いただければありがたいです。

@thmz337 thmz337 force-pushed the chore/replace-following-vue-component branch from 5929b7c to 52c5c11 Compare July 6, 2025 11:41
@thmz337
Copy link
Copy Markdown
Contributor

thmz337 commented Jul 6, 2025

@komagata @e-yanagita-gs

お疲れ様です。修正遅くなり申し訳ございませんでした。
関係のない修正・revertに係るコミットを削除しましたので、
ご確認よろしくお願いいたします。

@e-yanagita-gs
Copy link
Copy Markdown
Contributor Author

@thmz337
ご対応ありがとうございました!

@komagata
ご指示ありがとうございます。
改めまして、ご確認よろしくお願いいたします。

Copy link
Copy Markdown
Member

@komagata komagata left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

確認させて頂きました。OKです〜🙆‍♂️

@komagata komagata merged commit b9f900e into main Jul 11, 2025
19 checks passed
@komagata komagata deleted the chore/replace-following-vue-component branch July 11, 2025 03:37
@github-actions github-actions bot mentioned this pull request Jul 11, 2025
87 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants