Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

管理者ページのお問い合わせ個別にコメントを付けたい。 #7452

Open
machida opened this issue Feb 28, 2024 · 16 comments
Open

Comments

@machida
Copy link
Member

machida commented Feb 28, 2024

No description provided.

Copy link

このissue|PRは60日間更新がないため7日後にcloseします。closeしたくない場合はstaleラベルを外してください。

@github-actions github-actions bot added the stale label Apr 29, 2024
@machida machida removed the stale label May 2, 2024
Copy link

github-actions bot commented Jul 2, 2024

このissue|PRは60日間更新がないため7日後にcloseします。closeしたくない場合はstaleラベルを外してください。

@github-actions github-actions bot added the stale label Jul 2, 2024
@komagata komagata removed the stale label Jul 2, 2024
@komagata komagata moved this to やる in bootcamp Aug 21, 2024
Copy link

github-actions bot commented Sep 1, 2024

このissue|PRは60日間更新がないため7日後にcloseします。closeしたくない場合はstaleラベルを外してください。

@github-actions github-actions bot added the stale label Sep 1, 2024
@machida machida removed the stale label Sep 4, 2024
Copy link

github-actions bot commented Nov 4, 2024

このissue|PRは60日間更新がないため7日後にcloseします。closeしたくない場合はstaleラベルを外してください。

@ayu-0505
Copy link
Contributor

11月20日に質問し、回答をいただきました。

Q: お問い合わせそれぞれに既存のコメント機能をつけるので問題ないか。

A: それで問題ない。

このような個々のお問い合わせに対して、下のようなコメント機能をつける。
スクリーンショット 2024-11-21 16 23 44

スクリーンショット 2024-11-19 16 10 08

@ayu-0505
Copy link
Contributor

@komagata さん、お疲れ様です🍵

質問を失礼いたします。
こちらですが現在コメント機能として利用されているVueファイル等(commens.vuecomment.vuecomment-placeholder.vueなどが該当していると思われます)は使用せずに実装するのでしょうか。
それとも、それらのファイルを使用してもよいのでしょうか。

@komagata
Copy link
Member

@ayu-0505 vueやreactを使わずにお願いします〜(vue、react撲滅を進めているので)

@ayu-0505
Copy link
Contributor

ayu-0505 commented Dec 4, 2024

@komagata さん、お疲れ様です🍵

実装方針で迷っているので質問させてください。
以下の2通りが思いついていますが、どちらが望ましいでしょうか。

  1. 新たにadmin/inquries/下で動くようなCommentsControllerを作成するなどしてそこで処理を行う。
    (普通のRailsのCRUD操作イメージ。可能ならばポリモーフィック対応できるようにしておく?)
  2. API::CommentsControllerを使用しJS側で非同期処理的に書く。(現在のコメント機能の動きになるべく近づける)

1の方法ですが、現在のVueを使用した機能と比べ、画面遷移が増えるであろうと予想されます。
ただ、「最終的にRails7に移行してHotwireを使用する方針」、「新機能かつ使用者も管理者のみ」なので、今後の変更に対応しやすい1の方法が望ましいのかなと個人的には考えています。
非Vue/React化というラベルがついているIssueに関しての説明。 も確認しました。)

2の方法については、現在参考にさせていただいているreckyyさんのPR(Q&AのAnswer部分を非Vue化( #8033 ))が近いと思われます。
こちらは今現在ユーザーに使用されている機能であるため、UIを重視しこの方法を取られているようです。

今後の変更に対応しやすい1の方法か、UI重視の2の方法か、あるいは他の方法がありますでしょうか。
ご確認いただけたらと思います🙇🏻‍♀️

@komagata
Copy link
Member

komagata commented Dec 9, 2024

@ayu-0505 2でお願いします〜 (@reckyy さんと同じ方法)

@komagata
Copy link
Member

@ayu-0505 もし実装で困ってたりしたら質問・雑談タイムや他の時にも画面共有して進めたりできるのでおっしゃっていただければ〜

@ayu-0505
Copy link
Contributor

@komagata
お疲れ様です🍵ありがとうございます!
現在は教えていただいたPR( #8033#7924 )を参考にしながら進めております。
迷う部分や困る部分が出てきたら、またご相談したいと思います🙏

@ayu-0505 ayu-0505 moved this from 作業中 to レビュー中 in bootcamp Jan 7, 2025
@ayu-0505 ayu-0505 moved this from レビュー中 to 作業中 in bootcamp Jan 11, 2025
@ayu-0505
Copy link
Contributor

@komagata @machida お疲れ様です🍵

ユーザー毎のコメントページにおいて、ご意見伺いたいことが出てきましたのでご確認をお願いします。

ユーザー毎コメントページにおけるinquiryに対するコメントの表示について

users/commentsにはそのユーザーが行なったコメントが一覧で表示されるようになっていますが、inquiryは既存のcomentableと異なり、usertitleのカラムを持っていないので今まで通りの表示ができません。

スクリーンショット 2025-01-11 9 40 12
            h2.card-list-item-title__title
              - if commentable.respond_to?(:user) # 既存の処理
                = link_to commentable, class: 'card-list-item-title__link a-text-link' do
                  span class="a-user-role is-#{commentable.user.primary_role} align-middle"
                    = image_tag commentable.user.avatar_url, title: commentable.user.icon_title, class: 'thread-comment__title-icon a-user-icon'
                  = commentable.title
              - else # email表示のみに変更したもの
                = link_to commentable, class: 'card-list-item-title__link a-text-link' do
                  = commentable.email

上の画像は試しに、「ユーザーアイコンなし、タイトルをメールアドレスに変更」したものです。
個人的には、上図のようなものか、アイコンをデフォルトの灰色ピヨルドくんにするのがちょうど良いかと思っております。

ユーザーアイコンとタイトル部分、それぞれどのようにすべきかご意見いただきたいです。
よろしくお願いします🙏

@machida
Copy link
Member Author

machida commented Jan 12, 2025

@ayu-0505(cc @komagata
すいません!今回の機能はユーザー毎コメントページに反映することを想定していませんでした。
というのも、ユーザー毎コメントページは、そのユーザーがどれだけ積極的にFBCを使っているかを可視化させるための手段としているところが大きく、inquiryに対してのコメントは管理者しかできないのが理由です。これを伝えてなくてごめんなさい。
inquiryのコメントはユーザー毎コメントページに反映しない、ということがシステム的に違和感を感じそうでない場合はこのようにお願いしたいです🙏

@ayu-0505
Copy link
Contributor

@machida(cc @komagata
お疲れ様です、お忙しいところ確認いただきありがとうございます🙇🏻‍♀️
ユーザー毎のコメントページは「受講生の積極性の指標の一つ」という意味合いを持っていたのですね👀
それならば、管理者だけが行うInquiryのコメントは、確かにコメントページには不要そうです。
users/comments_controller.rbでは.where.not(commentable_type: 'Talk')でプライベート内容であるTalkのコメントを省いてますので、同様にInquiryも省くのは個人的にはシステム的な違和感は覚えません。
komagata さんに了承いただいたら「Inquiry宛へのコメントはユーザー毎のコメントページには表示させない」ように変更を加えようと思います。

# users/comments_controller.rb

  def set_comments
    @comments =
      Comment
      .where.not(commentable_type: 'Talk')
      .preload(commentable: { user: { avatar_attachment: :blob } })
      .eager_load(:user)
      .where(user_id: user)
      .order(created_at: :desc).page(params[:page])
  end

@machida
Copy link
Member Author

machida commented Jan 13, 2025

@ayu-0505 ありがとうございます!その対応でお願いします🙏

@ayu-0505 ayu-0505 moved this from 作業中 to レビュー中 in bootcamp Jan 22, 2025
Copy link

このissue|PRは60日間更新がないため7日後にcloseします。closeしたくない場合はstaleラベルを外してください。

@github-actions github-actions bot added the stale label Mar 15, 2025
@ayu-0505 ayu-0505 removed the stale label Mar 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: レビュー中
Development

No branches or pull requests

3 participants