New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 737003 link

Starred by 2 users

Issue metadata

Status: Archived
Owner:
Closed: Jul 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 1
Type: Bug

Blocking:
issue 723144



Sign in to add a comment

Show time stamp in new style notifications.

Project Member Reported by fukino@chromium.org, Jun 27 2017

Issue description

The new style (MD) notification should have time stamp (now, 3m, 1y, etc...) on the header.
We should implement it by referencing Android notifications.
 

Comment 1 by tetsui@chromium.org, Jun 27 2017

Cc: yoshiki@chromium.org
Labels: md-notification

Comment 2 by tetsui@chromium.org, Jun 29 2017

Owner: tetsui@chromium.org
Status: Assigned (was: Available)

Comment 3 by tetsui@chromium.org, 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.)
Status: Started (was: Assigned)
Project Member

Comment 5 by bugdroid1@chromium.org, 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

Status: Fixed (was: Started)

Comment 7 by dchan@chromium.org, Jan 22 2018

Status: Archived (was: Fixed)

Sign in to add a comment