Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[4.1] Actionlogs: Added parameter to disable relative timestamps. #31675

Merged

Conversation

Harmageddon
Copy link
Contributor

Based on a request in the German support forum: https://forum.joomla.de/thread/12928-joomla-benutzeraktivit%C3%A4ten-datum-und-uhrzeit-protokollieren/

The actionlogs component displays date and time of an action relative to the current time ("X minutes/hours/days ago"). While this might be useful to some people, others prefer to see only the exact timestamp when the action happened. In J3, this timestamp is hidden in a tooltip. In J4, the display is better, as the timestamp is in small font below the relative one. But this becomes confusing and redundant again, at least for actions that happened more than 4 weeks ago. In this case, we have two times the same date in a different format:
joomla-pr-actionlog-date-relative-old

Summary of Changes

As some users might be fine with the relative date format, I introduced a parameter in the configuration of com_actionlogs, that allows to disable the relative display. To not change current experience, it defaults to the current behaviour, i.e., displaying both relative and absolute date.

Testing Instructions

  1. Make sure you have the action logs plugins enabled and actions are logged.
  2. Perform some actions in backend.
  3. Navigate to "Users - User Actions Log".
  4. Look at the list. It should look like the image at "actual result" below.
  5. Apply this PR.
  6. Reload the action log list. It should still look the same.
  7. Click on "Options" and set the new parameter "Show Relative Date/Time" to "No".
  8. Save & Close
  9. Look at the action log list again.

Actual result BEFORE applying this Pull Request

joomla-pr-actionlog-date-relative-yes

Expected result AFTER applying this Pull Request

joomla-pr-actionlog-date-relative-options

joomla-pr-actionlog-date-relative-no

Documentation Changes Required

Should be documented at https://docs.joomla.org/Help39:Components_User_Actionlogs_Options

@joomla-cms-bot joomla-cms-bot added Language Change This is for Translators PR-4.0-dev labels Dec 16, 2020
@brianteeman
Copy link
Contributor

Do we really need to add another option :(

@chmst
Copy link
Contributor

chmst commented Dec 16, 2020

I like to see the date and time, but think we just can display date and time. I see no advantage in the relative presentation - this relative presentation seems to be inspired by forum displays, where it makes more sense.

@Harmageddon
Copy link
Contributor Author

Do we really need to add another option :(

Not necessarily - I'm open for alternative proposals. And I'm in favour of reducing our number of parameters wherever possible.

I don't really like such relative date displays, especially when it's not "5 minutes ago", but "around 2 weeks ago", which might be 2 weeks, might be almost 4 weeks, nobody knows. And looking at the forum post and the comment by @chmst, I'm not alone. So my personal choice would be to get rid of the relative display and only show the exact timestamp.
But as I see this kind of display more and more across the internet, I guess there are people who prefer it like this and might find it easier to read.

Should we go for one of the two ways and ignore the other user group? Or introduce a new parameter (in a form that right now has only 5 parameters, so it's not crowded - yet) to allow for a choice?

@HLeithner
Copy link
Member

Just change it to absolute dates, I see no reason to add an option for this.

@brianteeman
Copy link
Contributor

I find it very useful to see "5 minutes ago" etc so I dont have to do mental arithmetic and check my phone for the date.

@ChristineWk
Copy link

I have tested this item ✅ successfully on ff32892

I als prefer, NOT to see e.g.: "5 minutes ago".....


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/31675.

@ReLater
Copy link
Contributor

ReLater commented Dec 16, 2020

I have tested this item ✅ successfully on ff32892


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/31675.

@ReLater
Copy link
Contributor

ReLater commented Dec 16, 2020

I think with the additional param this pr is fine like it is.

@Fedik
Copy link
Member

Fedik commented Dec 16, 2020

it can be both at same time, without extra option, kind of:
if difference less than a 12h then show "relative", and "tolltip" (title attribute) shows real time

@brianteeman
Copy link
Contributor

if difference less than a 12h then show "relative", and "tolltip" (title attribute) shows real time

tooltip is not accessible

@Fedik
Copy link
Member

Fedik commented Dec 16, 2020

tooltip is not accessible

title attribute

@ReLater
Copy link
Contributor

ReLater commented Dec 16, 2020

When I have a statistical list in front of me I don't want to hover, sorry, stupid text values to see the real date in a tooltip that I can't copy. There's a date filter in that view. Simply add additional options there.

@Harmageddon
Copy link
Contributor Author

I think the whole discussion here underlines the reason for the additional parameter, so both sides can choose their way without restricting the others.

it can be both at same time, without extra option, kind of:
if difference less than a 12h then show "relative", and "tolltip" (title attribute) shows real time

As @ReLater wrote: Hiding the information in a tooltip / title (the way it is in J3) is even worse, because you have to hover over each single item to access the information.

@Fedik
Copy link
Member

Fedik commented Dec 16, 2020

I think the whole discussion here underlines the reason for the additional parameter,

Yeap, exactly 😄
It really makes no sense, for such simple thing.
Either it should be a global parameter to switch all the backend dates to displaying to "relative", or no parameter at all.

so both sides can choose their way without restricting the others.

well, it is not possible to fulfill everyone's needs anyway 😉

Just drop the parameter, and display the date as everywhere on the site.

@ChristineWk
Copy link

I have tested this item ✅ successfully on bb6238c


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/31675.

1 similar comment
@ghost
Copy link

ghost commented Dec 20, 2020

I have tested this item ✅ successfully on bb6238c


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/31675.

@Quy
Copy link
Contributor

Quy commented Dec 26, 2020

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/31675.

@joomla-cms-bot joomla-cms-bot added the RTC This Pull Request is Ready To Commit label Dec 26, 2020
@Harmageddon
Copy link
Contributor Author

Is there anything that keeps this PR from being merged? Anything I could or should add here?

@rdeutz
Copy link
Contributor

rdeutz commented Mar 10, 2021

I am moving this to 4.1, we are in beta and this is a new feature. Thank you all who have been working on this and bringing it to the state it is now. But if we want to get 4.0 out of the door we need to make a cut.

Side note: this decision has be discussed in the production department and the maintainers team. It's not just mine even if I support the decision.

@rdeutz rdeutz changed the base branch from 4.0-dev to 4.1-dev March 10, 2021 19:06
@rdeutz rdeutz changed the title [4.0] Actionlogs: Added parameter to disable relative timestamps. [4.1] Actionlogs: Added parameter to disable relative timestamps. Mar 10, 2021
@Harmageddon
Copy link
Contributor Author

Okay, I see you (PLT) have to draw the line somewhere. Looking forward to 4.0 and 4.1 then. :-)

@bembelimen bembelimen merged commit a72fb5d into joomla:4.1-dev Jul 2, 2021
@joomla-cms-bot joomla-cms-bot removed the RTC This Pull Request is Ready To Commit label Jul 2, 2021
@bembelimen
Copy link
Contributor

Thanks

@bembelimen bembelimen added this to the Joomla 4.1 milestone Jul 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Language Change This is for Translators
Projects
None yet
Development

Successfully merging this pull request may close these issues.