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
10 通知機能の実装 #17
10 通知機能の実装 #17
Conversation
@@ -10,6 +10,7 @@ html | |||
= csp_meta_tag | |||
= stylesheet_link_tag 'application', media: 'all' | |||
= javascript_include_tag 'application' | |||
= javascript_include_tag "https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.16.1/umd/popper.min.js" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ナイス、暫定対応!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ありがとうございます。
問題発見から解決まで6時間ほどかかりました笑
# DHH流で、readsコントローラーを作成すると以下のようになる | ||
# resource :read, only: %i[create] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ここまでカバーしているのはすごい!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
誠に申し上げにくいことでございますが、みけたさんの実装を拝見させていただいております。
みけたさんだけではないですが、他の方も見ているのでなるべくメモの残すようにしています。
やったこと
通知機能を実装してください。
タイミングと文言は以下の通りとします。(リンク)と書いてある箇所はリンクを付与してください。
フォローされたとき
xxx(リンク)があなたをフォローしました
通知そのものに対してはxxxへのリンクを張る
自分の投稿にいいねがあったとき
xxx(リンク)があなたの投稿(リンク)にいいねしました
通知そのものに対しては投稿へのリンクを張る
自分の投稿にコメントがあったとき
xxx(リンク)があなたの投稿(リンク)にコメント(リンク)しました
通知そのものに対してはコメントへのリンクを張る(厳密には投稿ページに遷移し当該コメント部分にページ内ジャンプするイメージ)
既読判定も行ってください。通知一覧において、既読のものは薄暗い背景で、未読のものは白い背景で表示しましょう。
既読とするタイミングは各通知そのものをクリックした時とします。
不自然ではありますが通知の元となったリソースが削除された際には通知自体も削除する仕様とします。