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] Show relative date instead of date time in logged in module #32911

Closed
wants to merge 3 commits into from
Closed

[4] Show relative date instead of date time in logged in module #32911

wants to merge 3 commits into from

Conversation

PhilETaylor
Copy link
Contributor

@PhilETaylor PhilETaylor commented Mar 28, 2021

Summary of Changes

Propose showing of relative date instead of date time in the Logged in Users module in admin.

Testing Instructions

Check the Home Dashboard -> Logged In Users module - look at it
Apply PR
Look at it again and note the times are now relative

Actual result BEFORE applying this Pull Request

Screenshot 2021-03-28 at 21 14 12

Expected result AFTER applying this Pull Request

Screenshot 2021-03-28 at 21 14 02

Documentation Changes Required

none

@PhilETaylor PhilETaylor changed the title Show relative date instead of date time [4] Show relative date instead of date time in logged in module Mar 28, 2021
@rjharishabh
Copy link
Contributor

It always shows Less than a minute ago.

@PhilETaylor

This comment was marked as abuse.

@rjharishabh
Copy link
Contributor

Without this PR, logged in date and time shown,

I think results after this PR should be the same as #32910

@PhilETaylor

This comment was marked as abuse.

@rjharishabh
Copy link
Contributor

Thanks for clarification

Copy link
Contributor

@chmst chmst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested: Use Factory::getDate(..)

@PhilETaylor

This comment was marked as abuse.

@Harmageddon
Copy link
Contributor

Can we please make this configurable? As I created PR #31675 already some time ago, where it is documented that not everyone prefers the relative display instead of an absolute one. If we add relative display not only for the action logs, but also in other places in core, it might be better to have a user-specific setting for this instead of the parameter I added for com_actionlogs.

@PhilETaylor

This comment was marked as abuse.

@ceford
Copy link
Contributor

ceford commented Mar 29, 2021

I have tested this item ✅ successfully on 43cd9ef

I was confused by the Less than a minute ago too but with the explanation of the time being since the last page load I definitely approve. I use this feature quite a loy in a J3 installation.


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

@alikon
Copy link
Contributor

alikon commented Mar 29, 2021

i'm not sure if this is the way to go ... like #32910
only my 2eurocent

@PhilETaylor

This comment was marked as abuse.

@PhilETaylor

This comment was marked as abuse.

@PhilETaylor PhilETaylor requested a review from chmst March 29, 2021 17:37
@alikon
Copy link
Contributor

alikon commented Mar 29, 2021

maybe i've been unexplicative
matter of personal taste
much more imho

@PhilETaylor

This comment was marked as abuse.

@alikon
Copy link
Contributor

alikon commented Mar 29, 2021

grr
i always hate when something is on the bordeline
whatever can be your choice....i'm optimistic here 50/50... 2025?
🍭

@PhilETaylor

This comment was marked as abuse.

@Harmageddon
Copy link
Contributor

Harmageddon commented Mar 29, 2021

If I read the code right, the relative date will only show if the date is less than 4 weeks, else the full date would be shown as normal.

That's correct. Still I'm confused by things like "2 weeks ago" or "5 days ago" - was it Wednesday? Thursday? Let me calculate...

Though I see your point here:

The home dashboard is an overview of the RECENT happenings on a site therefore it MAKES SENSE that this screen should have relative dates.

On normal listing screens date stamps are better, and can be ordered etc, but on the Home Dashboard a relative timestamp is better.... unless your site is dead and inactive and you have nothing to show recently of course, then, the relative date AFTER FOUR WEEKS turns back into a date

Whether one or the other is better is a question of personal taste, thus, I'd prefer the parameter. As you see in #31675, there are several people saying "just get rid of the parameter and display it in absolute format" and several saying "just get rid of the parameter and display it in relative format".

I agree that the argumentation for relative dates is stronger in this case here than for the whole action logs table.

IIRC you can also hover over "one hour ago" to see the exact date/time. Apparently not, although that could easily be added.

So I'd kindly ask you to at least include this tooltip in your PRs to give users the chance to see the absolute date.

Well as Joomla 3.9, 3.10 and 4.0 are no longer accepting "new features" any "preference selection" would have to be a different PR aimed at 4.1 whenever that would be released in 2030+

Seems a bit counterintuitive to me that changing the display would be considered a bug fix or cosmetical change (for 4.0), but making it configurable would be a new feature (4.1)?

Okay, you two are writing faster than I am.

I'll do the work, but I have no say in when, if ever, it gets merged. At the moment Ive had several rejected.

Would be very much appreciated! :-)

Signed-off-by: Phil E. Taylor <[email protected]>
@toivo
Copy link
Contributor

toivo commented Mar 29, 2021

I have tested this item ✅ successfully on 2479611

Tested successfully in Beta8-dev of 29 March in Wampserver 3.2.4 using PHP 8.0.2.


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

@PhilETaylor

This comment was marked as abuse.

@ceford
Copy link
Contributor

ceford commented Mar 31, 2021

I have tested this item ✅ successfully on 2479611

Works fine - I like it.


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

@Quy
Copy link
Contributor

Quy commented Mar 31, 2021

RTC


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

@joomla-cms-bot joomla-cms-bot added the RTC This Pull Request is Ready To Commit label Mar 31, 2021
@Quy Quy added this to the Joomla 4.0 milestone Mar 31, 2021
@dgrammatiko
Copy link
Contributor

Did anyone tested that filtering by date is still functional after applying this PR?

@PhilETaylor

This comment was marked as abuse.

@dgrammatiko
Copy link
Contributor

Yeah, just realised that this is not a list view although it resembles one

@HLeithner
Copy link
Member

I'm against this change for multiple reasons but most of them are personal ;-)

Anyway column header is "Date" the value "2 minutes ago" is not a date so it should be "last seen" aside this I prefer real dates especially if the values are bigger then a day. Also there is no fallback like a tooltip with the real date.

@PhilETaylor PhilETaylor closed this Apr 8, 2021
@joomla-cms-bot joomla-cms-bot removed the RTC This Pull Request is Ready To Commit label Apr 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.