プロジェクト

全般

プロフィール

Enhancement(機能追加・改善) #2756

通知センター(Notification Center)を実装する

Shouta Kashiwagi約12年前に追加. 約12年前に更新.

ステータス:
Fixed(完了)
優先度:
High(高め)
担当者:
対象バージョン:
開始日:
2012-01-23
期日:
進捗率:

100%


説明

Overview (概要)

メンバーのフレンド申請や、メッセージ受信、日記の新着コメントなどの通知をまとめて行う「通知センター」を新たに実装する

Spec (仕様)

【スマートフォン】
通知センターのテンプレートは_tosaka.phpにすべて入れる
DB仕様 =>

notification.png 表示 (143 KB) Fumie Toyooka, 2012-04-05 21:09


関連するチケット

関連している OpenPNE 3 - Enhancement(機能追加・改善) #2767: 通知センターPC版も作る Fixed(完了) 2012-01-23

関係しているリビジョン

リビジョン dc17b73b (差分)
Youichi Kimura約12年前に追加

add API for notification center (fixes #2756)

リビジョン de8c8fe6 (差分)
Youichi Kimura約12年前に追加

add API for notification center (fixes #2756)

リビジョン 3e26615e (差分)
Shouta Kashiwagi約12年前に追加

added option of disable read push. (refs #2756)

リビジョン 93f070c9 (差分)
Shouta Kashiwagi約12年前に追加

fixed to hide loading on tosaka notification (refs #2756)

リビジョン d207b3c6 (差分)
Youichi Kimura約12年前に追加

move code of retrieving notifications to opNotificationCenter class (refs #2756)

リビジョン 550c9397 (差分)
Youichi Kimura約12年前に追加

change notification serializing order (refs #2756)

リビジョン e3b7822d (差分)
Youichi Kimura約12年前に追加

add support for i18n in push API (refs #2756)

リビジョン 04303ef7 (差分)
Shouta Kashiwagi約12年前に追加

fixed notification center templates on smartphone (fixes #2756)

リビジョン 7ca039a8 (差分)
Shouta Kashiwagi約12年前に追加

(fixes #2756) fixed friend link request button text on smartphone notification center

リビジョン 3e0bb705 (差分)
Shouta Kashiwagi約12年前に追加

fixed notification center style on smartphone (fixes #2756)

リビジョン a94e65b4 (差分)
Shouta Kashiwagi約12年前に追加

added option of disable read push. (refs #2756)

リビジョン a18840e3 (差分)
Shouta Kashiwagi約12年前に追加

fixed to hide loading on tosaka notification (refs #2756)

リビジョン 9cd46f72 (差分)
Youichi Kimura約12年前に追加

move code of retrieving notifications to opNotificationCenter class (refs #2756)

リビジョン 8615aade (差分)
Youichi Kimura約12年前に追加

change notification serializing order (refs #2756)

リビジョン 8c91389c (差分)
Youichi Kimura約12年前に追加

add support for i18n in push API (refs #2756)

リビジョン 1c60d725 (差分)
Shouta Kashiwagi約12年前に追加

fixed notification center templates on smartphone (fixes #2756)

リビジョン 628dfbd5 (差分)
Shouta Kashiwagi約12年前に追加

(fixes #2756) fixed friend link request button text on smartphone notification center

リビジョン cda0dbb5 (差分)
Shouta Kashiwagi約12年前に追加

fixed notification center style on smartphone (fixes #2756)

リビジョン 9a0d8637 (差分)
Shouta Kashiwagi約12年前に追加

fixed fatal error in notification center util function (fixes #2756)

リビジョン 1d7cedb0 (差分)
Shouta Kashiwagi約12年前に追加

fixed fatal error in notification center util function (fixes #2756)

リビジョン 6cb35696 (差分)
Shouta Kashiwagi約12年前に追加

add license notations (fixes #2756)

リビジョン ea5109d6 (差分)
Shouta Kashiwagi約12年前に追加

fixed coding standards (fixes #2756)

リビジョン 173eabd1 (差分)
Shouta Kashiwagi約12年前に追加

add license notations (fixes #2756)

リビジョン a959d0fa (差分)
Shouta Kashiwagi約12年前に追加

fixed coding standards (fixes #2756)

リビジョン a6f74587 (差分)
Shouta Kashiwagi約12年前に追加

fixed some items that have been pointed in the review (fixes #2756)

リビジョン abc8a3be (差分)
Shouta Kashiwagi約12年前に追加

fixed some items that have been pointed in the review (fixes #2756)

リビジョン a93cd834 (差分)
Shouta Kashiwagi約12年前に追加

(refs #2756) fixed to reload push/search.json when notification center is hide

リビジョン 227b4421 (差分)
Shouta Kashiwagi約12年前に追加

(refs #2756) fixed to reload push/search.json when notification center is hide

リビジョン dce056c2 (差分)
Shouta Kashiwagi約12年前に追加

fixed some items that have been pointed in the review of note-24 (refs #2756)

リビジョン 2f62b0c2 (差分)
Shouta Kashiwagi約12年前に追加

fixed some items that have been pointed in the review of note-24 (refs #2756)

リビジョン a5608967 (差分)
Shouta Kashiwagi約12年前に追加

fixed notification count position on smartphone (refs #2756)

リビジョン b18d6228 (差分)
Shouta Kashiwagi約12年前に追加

fixed to return correct member image url on notification center api. (refs #2698, fixes #2756)

リビジョン b9554add (差分)
Shouta Kashiwagi約12年前に追加

fixed notification count position on smartphone (refs #2756)

リビジョン d7fc1536 (差分)
Shouta Kashiwagi約12年前に追加

fixed to return correct member image url on notification center api. (refs #2698, fixes #2756)

履歴

#1 Shouta Kashiwagi約12年前に更新

  • 説明 を更新 (diff)
  • 対象バージョンHOUOU_JANUARY にセット

#2 Shouta Kashiwagi約12年前に更新

  • 説明 を更新 (diff)
  • ステータスNew(新規) から Accepted(着手) に変更
  • 担当者Youichi Kimura にセット

API取得部分のjQueryTemplateが完成しました。
https://github.com/houou/HOUOU/commit/c374955abe402c0f5b73c2c53fd6a61c0993ac80
API整備ができ次第導入可能です。

#3 Youichi Kimura約12年前に更新

  • プロジェクトHOUOU から OpenPNE 3 に変更
  • 対象バージョン を削除 (HOUOU_JANUARY)

#4 Youichi Kimura約12年前に更新

  • ステータスAccepted(着手) から Pending Review(レビュー待ち) に変更
  • 進捗率0 から 50 に変更

更新履歴 dc17b73b13eb2228297297303b98c2a4fa666dd4 で適用されました。

#5 Youichi Kimura約12年前に更新

  • トラッカーTask(タスク) から Enhancement(機能追加・改善) に変更
  • 対象バージョン252 にセット

#6 Shouta Kashiwagi約12年前に更新

  • 優先度Normal(通常) から High(高め) に変更

#7 Shouta Kashiwagi約12年前に更新

  • 対象バージョン252 から OpenPNE 3.8beta1 に変更

#8 Youichi Kimura約12年前に更新

更新履歴 de8c8fe6b1b0718247baded355e0629ac0a67586 で適用されました。

#9 Shouta Kashiwagi約12年前に更新

更新履歴 04303ef76fc3f072a832a6da8144761ce25ba53b で適用されました。

#10 Shouta Kashiwagi約12年前に更新

更新履歴 7ca039a8a30fccddcbc6415bd9ab2728550d365e で適用されました。

#11 Shouta Kashiwagi約12年前に更新

更新履歴 3e0bb7057b084c1d274e90f29f6625c4b02c50ba で適用されました。

#12 Shouta Kashiwagi約12年前に更新

更新履歴 1c60d72585ca02bc5e7e4b438d418370d5406711 で適用されました。

#13 Shouta Kashiwagi約12年前に更新

更新履歴 628dfbd532a2ca42c74b2f6cfe4605457ff5b6f7 で適用されました。

#14 Shouta Kashiwagi約12年前に更新

更新履歴 cda0dbb5237fbaa056f2fb2260fa42ce984fddde で適用されました。

#15 Shouta Kashiwagi約12年前に更新

更新履歴 9a0d86379f15227d2af6169f74e0d70c8bac24fc で適用されました。

#16 Shouta Kashiwagi約12年前に更新

更新履歴 1d7cedb059084c54af6cac275f75fe7487c47fce で適用されました。

#17 Shouta Kashiwagi約12年前に更新

更新履歴 6cb3569621ac79f0c1269119577506e8b41121d4 で適用されました。

#18 Shouta Kashiwagi約12年前に更新

更新履歴 ea5109d6098418fa82879395b81bc2aadb503471 で適用されました。

#19 Shouta Kashiwagi約12年前に更新

更新履歴 173eabd11bb969c1250d0cd8bc6dda64174b53b9 で適用されました。

#20 Shouta Kashiwagi約12年前に更新

更新履歴 a959d0fa070691c2af2a09ed3cba6915ec40e606 で適用されました。

#21 Yuya Watanabe約12年前に更新

  • ステータスPending Review(レビュー待ち) から Rejected(差し戻し) に変更

差し戻し理由

  • phpファイルでは __() ヘルパを直接呼び出すことはできません.

apps/api/lib/helper/opJsonApiHelper.php

186     'body' => __($notification['body']),

$i18n = sfContext::getInstance()->getI18N();
$i18n->__($notification['body']);

のように呼び出す必要があります.
  • 下記ビューでは $notifications 変数が用いられていますが,アクション側で $this->notifications に格納していないため,データがビュー側に渡っていません.

apps/api/modules/push/templates/arraySuccess.php

  1 <?php 
  2 
  3 $data = array();
  4 
  5 foreach ($notifications as $notification)
  6 {
  7   $data[] = op_api_notification($notification);
  8 }
  9 
 10 return array(
 11   'status' => 'success',
 12   'data' => $data
 13 );

apps/api/modules/push/actions/actions.class.php

 20   public function executeSearch(sfWebRequest $request)
 21   {
 22     $member = $this->getUser()->getMember();
 23     $notifications = opNotificationCenter::getNotifications($member);
 24 
 25     $this->setTemplate('array');
 26   }

  • 下記翻訳カタログでプレースホルダーが一致していないため展開されずに%Frinend%のまま表示されます.

apps/pc_frontend/i18n/messages.ja.xml

1386       <trans-unit id="">
1387         <source>Do you accept %friend% link request?</source>
1388         <target>%Friend%申請を許可しますか?</target>
1389       </trans-unit>

  • button タグがちゃんと終了していません

apps/pc_frontend/templates/_tosaka.php

 42             <button class="span2 btn btn-primary small friend-notify-button friend-accept"<?php echo __('Accept') ?></button>

"Notification Center" の翻訳カタログが存在しません.

apps/pc_frontend/templates/_tosaka.php

  7       <?php echo __('Notification Center') ?> 

ユーザビリティについて

  • 上記を直した状態でフレンド申請が来たときにニックネームなどが表示されないため,だれからのフレンド申請かが画像を見るという方法しか取れず,noimage の場合はヒントがなく不親切だと思います.また,許可,拒否選択後の結果が表示されないため,どうなったかが不明瞭です.
  • 通知センターに表示されるフレンド申請の履歴は残り続けたままなのでしょうか?フレンド申請の数が多いとスクロールする必要がある長さが大きくなり,操作が煩わしく感じます.

#22 Shouta Kashiwagi約12年前に更新

  • ステータスRejected(差し戻し) から Pending Review(レビュー待ち) に変更

更新履歴 abc8a3be98858014d97968039020d5465c50481c で適用されました。

#23 Shouta Kashiwagi約12年前に更新

更新履歴 a6f74587700f5f3c94c913e61f37364c85cda9aa で適用されました。

#24 Yuya Watanabe約12年前に更新

  • ステータスPending Review(レビュー待ち) から Rejected(差し戻し) に変更
下記部分でいくつか指摘があります
  • 比較演算子が逆である
    現状だと 20 以下の場合のみ 20 にリサイズする処理が走ります.
  • array_slice()関数は非破壊的であるため$notificationに対してなんの影響も与えていない
    array_slice()の返り値を用いましょう.
  • sfConfig::get('op_notification_limit', 20) で返ってくる値は現状の実装だと常に一定
    sfConfig に設定される値はメモリ上でのみでしか変更,参照されないため,この値を変更するにはsfConfig::set('op_notification_limit', 値) と言った様なコードを埋め込むカスタマイズが必要になります.現象ではこの値を変更する手段はコード上で見られないため,今後の拡張として考えられているものと受け取ると問題はないとも言えます.ただし,sfConfig::set()を埋め込むようなカスタメイズを想定すると考えると,実装によっては「ある通知を行う場合のみ通知される数が増える/減る」といったような現象が発生することが考えられます.永続的なデータを参照するように変更することが望ましいのではないかと思います.追記: OpenPNE.yml で設定できることを確認しましたが,設定ファイルに記述するということなどが明確でないので OpenPNE.yml などでデフォルトで設定できるようにしておくことが望ましいと思います.
  • 同じ値を返すであろう sfConfig::get() が二回呼び出されている

lib/util/opNotificationCenter.class.php

 52     if (sfConfig::get('op_notification_limit', 20) > count($notifications))
 53     {
 54       array_slice($notifications, 0, sfConfig::get('op_notification_limit', 20));
 55     }

別件ですが,コミットログはコミットログだけを見ても,コミットの内容がわかるような書き方をしておいたほうがいいと思います.

#25 Shouta Kashiwagi約12年前に更新

  • ステータスRejected(差し戻し) から Pending Testing(テスト待ち) に変更
  • 進捗率50 から 70 に変更

#26 Shouta Kashiwagi約12年前に更新

  • ステータスPending Testing(テスト待ち) から New(新規) に変更
  • 進捗率70 から 0 に変更

#27 Shouta Kashiwagi約12年前に更新

  • ステータスNew(新規) から Accepted(着手) に変更

#28 Shouta Kashiwagi約12年前に更新

  • ステータスAccepted(着手) から Pending Review(レビュー待ち) に変更
  • 進捗率0 から 50 に変更

#29 Yuya Watanabe約12年前に更新

master

de8c8fe6b1b0718247baded355e0629ac0a67586 add API for notification center (fixes #2756)
a94e65b4062ac42e1cb15837f02b208c9780209c added option of disable read push. (refs #2756)
a18840e33720ef8ca757245a1d393b6284eb67d4 fixed to hide loading on tosaka notification (refs #2756)
9cd46f722195955eb478f0aefb8f39b78d712192 move code of retrieving notifications to opNotificationCenter class (refs #2756)
8615aadedfb2b6592338d0e8097996fc5c93ac0d change notification serializing order (refs #2756)
8c91389cf80210ec231abcb3dfdc68f60bb69b4c add support for i18n in push API (refs #2756)
1c60d72585ca02bc5e7e4b438d418370d5406711 fixed notification center templates on smartphone (fixes #2756)
628dfbd532a2ca42c74b2f6cfe4605457ff5b6f7 (fixes #2756) fixed friend link request button text on smartphone notification center
cda0dbb5237fbaa056f2fb2260fa42ce984fddde fixed notification center style on smartphone (fixes #2756)
1d7cedb059084c54af6cac275f75fe7487c47fce fixed fatal error in notification center util function (fixes #2756)
173eabd11bb969c1250d0cd8bc6dda64174b53b9 add license notations (fixes #2756)
a959d0fa070691c2af2a09ed3cba6915ec40e606 fixed coding standards (fixes #2756)
a6f74587700f5f3c94c913e61f37364c85cda9aa fixed some items that have been pointed in the review (fixes #2756)
a93cd834e19052b19503dae48d88648e2cfda2f2 (refs #2756) fixed to reload push/search.json when notification center is hide

release-3.8beta1

dc17b73b13eb2228297297303b98c2a4fa666dd4 add API for notification center (fixes #2756)
3e26615e1e1dfec547496508f6499c469f4236b4 added option of disable read push. (refs #2756)
93f070c957a1777d17e6c177a3f454d4b0c86877 fixed to hide loading on tosaka notification (refs #2756)
d207b3c64e6a02beb529fb77b31b83ac3555a68e move code of retrieving notifications to opNotificationCenter class (refs #2756)
550c9397bb2b93fe17aa94d113305e62716357a3 change notification serializing order (refs #2756)
e3b7822de6d3c1175830bca47d7ac37698e1744e add support for i18n in push API (refs #2756)
04303ef76fc3f072a832a6da8144761ce25ba53b fixed notification center templates on smartphone (fixes #2756)
7ca039a8a30fccddcbc6415bd9ab2728550d365e (fixes #2756) fixed friend link request button text on smartphone notification center
3e0bb7057b084c1d274e90f29f6625c4b02c50ba fixed notification center style on smartphone (fixes #2756)
9a0d86379f15227d2af6169f74e0d70c8bac24fc fixed fatal error in notification center util function (fixes #2756)
6cb3569621ac79f0c1269119577506e8b41121d4 add license notations (fixes #2756)
ea5109d6098418fa82879395b81bc2aadb503471 fixed coding standards (fixes #2756)
abc8a3be98858014d97968039020d5465c50481c fixed some items that have been pointed in the review (fixes #2756)
227b4421f4ed18c88fb124a7e06eadb52c6791b6 (refs #2756) fixed to reload push/search.json when notification center is hide

#30 Yuya Watanabe約12年前に更新

  • ステータスPending Review(レビュー待ち) から Rejected(差し戻し) に変更

note-24 の指摘内容のコミットが含まれていないように見受けられますが,これの説明が何もない状態ですが大丈夫ですか?

#31 Fumie Toyooka約12年前に更新

表示に関するバグがありましたので、修正お願いいたします。

件数の表示位置(スマートフォン版)

通知センターの件数表示ですが、PC版と表示位置が異なります。
※追加した画像参照

件数が減らない場合がある(PC版)

以下の手順で、再現できます。
- インフォメーション欄から承認or拒否
- ホーム画面リロード
- 通知センターの件数

INFORMATION欄からのフレンドの承認or拒否を行うと、通知センターに表示される件数が変わりませんでした。

ユーザの画像が表示されない(PC・スマートフォン版)

フレンド申請したユーザの画像が表示されません。
デフォルト画像(No Image)は表示されます。
※追加した画像参照

#32 Shouta Kashiwagi約12年前に更新

Fumie Toyooka は書きました:

表示に関するバグがありましたので、修正お願いいたします。

件数の表示位置(スマートフォン版)

通知センターの件数表示ですが、PC版と表示位置が異なります。
※追加した画像参照

件数が減らない場合がある(PC版)

以下の手順で、再現できます。
- インフォメーション欄から承認or拒否
- ホーム画面リロード
- 通知センターの件数

INFORMATION欄からのフレンドの承認or拒否を行うと、通知センターに表示される件数が変わりませんでした。

ユーザの画像が表示されない(PC・スマートフォン版)

フレンド申請したユーザの画像が表示されません。
デフォルト画像(No Image)は表示されます。
※追加した画像参照

件数が減らない問題については,これはcore側のconfirmation 機能と 今回新たに追加した notification center に整合性がとれていない為に発生する問題の為,
修正に時間がかかってしまいます.
よってこの問題については別チケットを作成して,そちら側で修正します.

#33 Shouta Kashiwagi約12年前に更新

  • ステータスRejected(差し戻し) から Pending Review(レビュー待ち) に変更

更新履歴 d7fc1536e63c8a287cd0aa49e698bf47e67cef7b で適用されました。

#34 Shouta Kashiwagi約12年前に更新

更新履歴 b18d622805190957398ba2d72599f407d6944bf1 で適用されました。

#35 Yuya Watanabe約12年前に更新

master

dce056c2dd306853e2307f96b06513fd2349e9b4 fixed some items that have been pointed in the review of note-24 (refs #2756)
b9554add13295bd33e8ebb15e966b38ddac7f229 fixed notification count position on smartphone (refs #2756)
d7fc1536e63c8a287cd0aa49e698bf47e67cef7b fixed to return correct member image url on notification center api. (refs #2698, fixes #2756)

release-3.8beta1

dce056c2dd306853e2307f96b06513fd2349e9b4 fixed some items that have been pointed in the review of note-24 (refs #2756)
b9554add13295bd33e8ebb15e966b38ddac7f229 fixed notification count position on smartphone (refs #2756)
d7fc1536e63c8a287cd0aa49e698bf47e67cef7b fixed to return correct member image url on notification center api. (refs #2698, fixes #2756)

#36 Yuya Watanabe約12年前に更新

  • ステータスPending Review(レビュー待ち) から Pending Testing(テスト待ち) に変更
  • 進捗率50 から 70 に変更

#37 Kiwa Sakai約12年前に更新

  • ステータスPending Testing(テスト待ち) から Fixed(完了) に変更
  • 進捗率70 から 100 に変更

https://docs.google.com/a/openpne.jp/spreadsheet/ccc?key=0AsdDZCDQSqiYdDFCSGdTZzlYQWV6bDFkTmI2N2p2emc#gid=0
上のテスト表にてテストが完了しているようなので閉じます。

他の形式にエクスポート: Atom PDF