Show time stamp in new style notifications. |
|||||
Issue descriptionThe new style (MD) notification should have time stamp (now, 3m, 1y, etc...) on the header. We should implement it by referencing Android notifications.
,
Jun 29 2017
,
Jun 30 2017
The notification timestamp field in Android is DateTimeView, https://android.googlesource.com/platform/frameworks/base/+/master/core/res/res/layout/notification_template_header.xml#72 and the formatting implementation is here. https://android.googlesource.com/platform/frameworks/base/+/master/core/java/android/widget/DateTimeView.java#228 Is is OK to reimplement this, but resource string consistency against Android might be problematic because there are number of them, including accessibility string (e.g. shown string "2h" vs. "2 hours ago", for all the languages). I would first try to resolve this by writing msgIds in .grd like this https://cs.chromium.org/chromium/src/ui/strings/ui_strings.grd?l=637&rcl=2308e6caa10e54555d344325d9b5ef61d84e81f4 but please let me know if there are better alternatives. (I would omit future form in DateTimeView.)
,
Jul 3 2017
,
Jul 5 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/0563d2235011452f270d01a7557e50d06e292f5b commit 0563d2235011452f270d01a7557e50d06e292f5b Author: tetsui <tetsui@chromium.org> Date: Wed Jul 05 08:54:03 2017 Implement time stamp in new-style notification. New-style notification should show the notification timestamp relative to now on the header. The format should be consistent with Android's one, so we have to implement our own version of formatter. BUG= 737003 TEST=manual Review-Url: https://codereview.chromium.org/2972493002 Cr-Commit-Position: refs/heads/master@{#484220} [modify] https://crrev.com/0563d2235011452f270d01a7557e50d06e292f5b/ui/message_center/views/notification_header_view.cc [modify] https://crrev.com/0563d2235011452f270d01a7557e50d06e292f5b/ui/message_center/views/notification_header_view.h [modify] https://crrev.com/0563d2235011452f270d01a7557e50d06e292f5b/ui/message_center/views/notification_view_md.cc [modify] https://crrev.com/0563d2235011452f270d01a7557e50d06e292f5b/ui/strings/ui_strings.grd
,
Jul 5 2017
,
Jan 22 2018
|
|||||
►
Sign in to add a comment |
|||||
Comment 1 by tetsui@chromium.org
, Jun 27 2017Labels: md-notification