Add an option to the disable the "X months ago" format for dates

RESOLVED FIXED

Status

()

bugzilla.mozilla.org
User Interface: Modal
RESOLVED FIXED
2 years ago
2 years ago

People

(Reporter: botond, Assigned: dylan)

Tracking

Production
Dependency tree / graph

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Reporter)

Description

2 years ago
I'm trying out the experimental user interface activated under General Preferences -> "Use experimental user interface". I like it, except for one thing: the dates have all changed from "2015-09-28 16:02 EDT" format to "a minute ago" / "2 months ago" etc. format, which I really dislike. It would be great to provide an option to use the original date format.
(In reply to Botond Ballo [:botond] from comment #0)
> I'm trying out the experimental user interface activated under General
> Preferences -> "Use experimental user interface". I like it, except for one
> thing: the dates have all changed from "2015-09-28 16:02 EDT" format to "a
> minute ago" / "2 months ago" etc. format, which I really dislike. It would
> be great to provide an option to use the original date format.

If you mouse over and of the relative dates, it will show the exact timestamp.

dkl

Comment 2

2 years ago
We already have quite a number of preferences, so we are hesitant to add any more, particularly since, as dkl says, you can get the absolute time, even if it's not displayed by default.
(Reporter)

Comment 3

2 years ago
I realize you can mouse over it, but it's still not the same as seeing all dates on the page in your preferred format. It's the sort of thing that's very likely to make me (and I'm guessing, at least some others) switch back to the original interface in spite of the other improvements.
Depends on: 1209599
i see value in having this preference, but let's tidy up the prefs page first (bug 1209599).
Blocks: 1150541
(Assignee)

Updated

2 years ago
Assignee: nobody → dylan
(Assignee)

Comment 5

2 years ago
Created attachment 8758918 [details] [diff] [review]
1209219_1.patch

- added semicolon to bug-modal.js for consistency/not triggering the linter.
- added user pref for toggling between absolute and relative times on the modal page.
- removed suppoer for calling rel_time.html.tmpl with WRAPPER. We don't do this and supporting it would be annoying.

Relative times are still calculated, and put in the 'title' attribute.
Attachment #8758918 - Flags: review?(dkl)
Comment on attachment 8758918 [details] [diff] [review]
1209219_1.patch

Review of attachment 8758918 [details] [diff] [review]:
-----------------------------------------------------------------

Should we up update these places to do the setting check? Meaning, show the absolute time as the title instead of the relative time like it does now.

https://github.com/mozilla/webtools-bmo-bugzilla/blob/master/extensions/BugModal/template/en/default/bug_modal/flags.html.tmpl#L88
https://github.com/mozilla/webtools-bmo-bugzilla/blob/master/extensions/BugModal/template/en/default/bug_modal/activity_stream.html.tmpl#L161
https://github.com/mozilla/webtools-bmo-bugzilla/blob/master/extensions/BugModal/template/en/default/bug_modal/attachments.html.tmpl#L72
https://github.com/mozilla/webtools-bmo-bugzilla/blob/master/extensions/BugModal/template/en/default/bug_modal/edit.html.tmpl#L249

Updated

2 years ago
Flags: needinfo?(dylan)
Also eventually I would like this to be a global setting now just for show_bug.cgi. We should honor this setting for MyDashboard and other reports that currently show relative times. We can create separate bugs for each of the other pages.
(Assignee)

Comment 8

2 years ago
(In reply to David Lawrence [:dkl] from comment #6)
> Comment on attachment 8758918 [details] [diff] [review]
> 1209219_1.patch
> 
> Review of attachment 8758918 [details] [diff] [review]:
> -----------------------------------------------------------------
> 
> Should we up update these places to do the setting check? Meaning, show the
> absolute time as the title instead of the relative time like it does now.
> 
> https://github.com/mozilla/webtools-bmo-bugzilla/blob/master/extensions/
> BugModal/template/en/default/bug_modal/flags.html.tmpl#L88
> https://github.com/mozilla/webtools-bmo-bugzilla/blob/master/extensions/
> BugModal/template/en/default/bug_modal/activity_stream.html.tmpl#L161
> https://github.com/mozilla/webtools-bmo-bugzilla/blob/master/extensions/
> BugModal/template/en/default/bug_modal/attachments.html.tmpl#L72
> https://github.com/mozilla/webtools-bmo-bugzilla/blob/master/extensions/
> BugModal/template/en/default/bug_modal/edit.html.tmpl#L249

I interpreted this bug narrowly -- and I'd prefer that way in light of the recent additional blocking bugs that have been filed.

the decision is yours, as reviewer. :-)
Flags: needinfo?(dylan)
(In reply to Dylan William Hardison [:dylan] from comment #8)
> (In reply to David Lawrence [:dkl] from comment #6)
> I interpreted this bug narrowly -- and I'd prefer that way in light of the
> recent additional blocking bugs that have been filed.

My main reason is we would have a mix of relative and absolute times whereas I would expect when one sets the user preference, all dates would be one or the other. We can work it out as smaller chunks (bugs) if you like.

dkl
(Assignee)

Updated

2 years ago
Attachment #8758918 - Flags: review?(dkl)
(Assignee)

Comment 10

2 years ago
Created attachment 8759850 [details] [diff] [review]
1209219_2.patch

all relative dates in bug_modal should be absolute with that user pref.

note we'll want to figure out how to adjust the times on relative dates when the title= contains more than just a date (right now, they do not update which might be confusing at some point)
Attachment #8758918 - Attachment is obsolete: true
Attachment #8759850 - Flags: review?(dkl)
Comment on attachment 8759850 [details] [diff] [review]
1209219_2.patch

Review of attachment 8759850 [details] [diff] [review]:
-----------------------------------------------------------------

r=dkl

::: extensions/BugModal/template/en/default/bug_modal/flags.html.tmpl
@@ +85,5 @@
>          <span
>        [% END %]
> +        [% IF user.setting("ui_use_absolute_time") == "on"  %]
> +            class="abs-time-title[% " activity-ref" IF activity_id %]"
> +            title="[%~ f.creation_date FILTER time('%Y-%m-%d %H:%M %Z') ~%]"

omit the '~' at the beginning and end brackets.

::: extensions/BugModal/web/bug_modal.js
@@ +149,3 @@
>          });
>  
>      // use non-native tooltips for relative times and bug summaries

Nit: // use non-native tooltips for relative/absolute times and bug summaries
Attachment #8759850 - Flags: review?(dkl) → review+
(Assignee)

Comment 12

2 years ago
To ssh://gitolite3@git.mozilla.org/webtools/bmo/bugzilla.git
   d2507d1..37b2bd1  master -> master
Status: NEW → RESOLVED
Last Resolved: 2 years ago
Resolution: --- → FIXED
See if this is causing a regression with readable statuses.
Flags: needinfo?(ehumphries)
I think it is, but I need a console log to confirm.
Flags: needinfo?(ehumphries)
It's happening on setting a needinfo.
Flags: needinfo?(ehumphries)
See Also: → bug 1281189
Flags: needinfo?(ehumphries)
(Reporter)

Comment 16

2 years ago
Thanks a lot for fixing this!

Updated

2 years ago
Depends on: 1281429
You need to log in before you can comment on or make changes to this bug.