Closed
Bug 1184265
Opened 10 years ago
Closed 7 years ago
Make last sync date be relative
Categories
(Firefox :: Sync, enhancement)
Firefox
Sync
Tracking
()
Tracking | Status | |
---|---|---|
firefox61 | --- | fixed |
People
(Reporter: rfeeley, Assigned: eoger)
References
Details
Attachments
(2 files)
Instead of showing an abbreviate day and time in the tooltip, perhaps we can instead show relative time.
Last sync:
Just now
2 secs ago
1 min ago
3 mins ago
1 hour ago
4 hours ago
1 day ago
5 days ago
1 week ago
6 weeks ago
1 month ago
7 months ago
1 year ago
7 years ago
Reporter | ||
Comment 1•10 years ago
|
||
If we can't do this, I can settle for "Today" and "Yesterday".
Updated•9 years ago
|
Assignee: edouard.oger → nobody
Flags: firefox-backlog+
Priority: -- → P3
Updated•9 years ago
|
Severity: normal → enhancement
Priority: P3 → --
Assignee | ||
Updated•7 years ago
|
Assignee | ||
Updated•7 years ago
|
Iteration: --- → 61.2 - Apr 9
Assignee | ||
Updated•7 years ago
|
Assignee: nobody → eoger
Status: NEW → ASSIGNED
Comment hidden (mozreview-request) |
Assignee | ||
Comment 5•7 years ago
|
||
Quick note: we don't update the title on |mouseover| in the page action menu since we don't really expect that menu to be open for long.
Comment 6•7 years ago
|
||
mozreview-review |
Comment on attachment 8960787 [details]
Bug 1184265 - Make last sync date be relative.
https://reviewboard.mozilla.org/r/229524/#review235314
::: browser/base/content/browser-sync.js:646
(Diff revision 1)
> formatLastSyncDate(date) {
> - let sixDaysAgo = (() => {
> - let tempDate = new Date();
> - tempDate.setDate(tempDate.getDate() - 6);
> - tempDate.setHours(0, 0, 0, 0);
> - return tempDate;
> + if (!date) { // Date can be null before the first sync!
> + return null;
> + }
> + const relativeDateStr = this.relativeTimeFormat.formatBestUnit(date);
> + return this.syncStrings.formatStringFromName("lastSync2.label", [relativeDateStr], 1);
Note that the comment for this string should be updated - it mentions "%S is the date and time at which the last sync successfully completed"
We should probably get feedback from Flod too, just in-case some locales might want to change the string given this change (ie, whether we should rename the string to force localizers to notice)
Attachment #8960787 -
Flags: review?(markh) → review+
Assignee | ||
Comment 7•7 years ago
|
||
Francesco are you okay with the changes here?
We are switching from:
- Last Sync: Tuesday 9:28PM
- Last Sync: March 12
To
- Last Sync: <new Services.intl.RelativeTimeFormat.formatBestUnit()>
Do we need a string change for |lastSync2.label|?
Flags: needinfo?(francesco.lodolo)
Comment 8•7 years ago
|
||
I think we're good keeping the existing string. All locales are following the English structure, as far as I see, so the different date format doesn't need a change.
https://transvision.mozfr.org/string/?entity=services/sync/sync.properties:lastSync2.label&repo=gecko_strings
Flags: needinfo?(francesco.lodolo)
Comment 9•7 years ago
|
||
Hey all! Cool to see the the use of Intl.RTF!
Two notes on the patch:
1) The way you currently use the formatter will give you things like "3 minutes ago". If you want "3 min. ago" switch to: `new Services.intl.RelativeTimeFormat(undefined, {style: "short"});`. (I'd recommend it based on the limited space in the UI)
2) The way you test it doesn't use any anchor. I think it may end up becoming an intermittent if you'll ever want to test particular values out of your UI since the time may pass between the moment you format and the moment you test. I don't see anything testing for particular values (good!), but wanted to raise it just in case you'll be also working with tests around it later :)
Comment hidden (mozreview-request) |
Assignee | ||
Comment 11•7 years ago
|
||
Thanks for the feedback everyone!
I've also confirmed with Ryan that we want the short style.
Comment 12•7 years ago
|
||
Pushed by eoger@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/8c007704dfef
Make last sync date be relative. r=markh
Comment 13•7 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
status-firefox61:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 61
You need to log in
before you can comment on or make changes to this bug.
Description
•