screwdriver icon indicating copy to clipboard operation
screwdriver copied to clipboard

[UI] Need user setting for pedantic time wants

Open dwmarshall opened this issue 4 years ago • 8 comments

What happened:

When I look at events, I see that several events happened "2 months ago." When I look at the list view, I see a timestamp such as "August 18, 2020 4:52 PM."

What you expected to happen:

My personal preference is to have absolute timestamps on the events sidebar. Also, "4:52 PM" is ambiguous? Is it my timezone, is it UTC? I'd rather see that as "2020-08-18 23:52 UTC."

Lots of people have different preferences, so it would be best to allow a preference for time formats.

How to reproduce it:

Look at any pipeline

dwmarshall avatar Sep 22 '20 22:09 dwmarshall

Sounds like a customer for the preferences API https://github.com/screwdriver-cd/models/pull/475

jithine avatar Sep 23 '20 23:09 jithine

Looks like a reoccurring ask: https://github.com/screwdriver-cd/ui/pull/731#issuecomment-877393593 https://github.com/screwdriver-cd/screwdriver/issues/1581 https://github.com/screwdriver-cd/screwdriver/issues/2511 https://github.com/screwdriver-cd/screwdriver/issues/2160

tkyi avatar Jul 19 '22 18:07 tkyi

@banusha2 maybe you can take a look.

adong avatar Jul 19 '22 19:07 adong

what should we do here use a user's local TZ or give a toggle button to convert timestamp to UTC?

banusha2 avatar Jul 20 '22 15:07 banusha2

what should we do here use a user's local TZ or give a toggle button to convert timestamp to UTC?

I dont know what David thinks, and my take on this to have a session for Event Timeline Format under the Options -> User Preference

image

I have 3 options in mind: UTC Timestamp, Local Timestamp, Human Readable Timestamp

image

See reference: https://www.unixtimestamp.com/index.php.

See the below example for the explicit local timezone time, after PR https://github.com/screwdriver-cd/ui/pull/731.

  1. the list view, image

and 2) the event view image

Once that "User Preference" is set, should all have the same time format, with respect to the user's preferred timestamp selection.

adong avatar Jul 25 '22 20:07 adong

Some people might like "2 months ago," but I'm not one of them. I also don't care whether time is presented in my local time or UTC, but I need to know what time zone is being used. "04:27 PM" isn't very helpful. Is it 4:27 PM PDT or 11:27 PM PDT?

dwmarshall avatar Jul 25 '22 20:07 dwmarshall

This setting should be a global one, user shouldn't have to go to each Pipeline to update preference.

jithine avatar Aug 10 '22 17:08 jithine

This setting should be a global one, user shouldn't have to go to each Pipeline to update preference.

This change will increase the scope a little bit, as this section would be moved to /user-settings rather than pipeline -> options

cc @banusha2

adong avatar Aug 15 '22 15:08 adong

New changes look good in the pipeline page, but can you also update the createTime in the build details page to also be controlled by user pref for time format? Screen Shot 2022-10-20 at 1 13 51 PM https://cd.screwdriver.cd/pipelines/1/builds/827342

tkyi avatar Oct 20 '22 20:10 tkyi

Looks good to me now Screen Shot 2022-11-30 at 11 31 50 AM

tkyi avatar Nov 30 '22 19:11 tkyi