screwdriver
screwdriver copied to clipboard
[UI] Need user setting for pedantic time wants
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
Sounds like a customer for the preferences API https://github.com/screwdriver-cd/models/pull/475
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
@banusha2 maybe you can take a look.
what should we do here use a user's local TZ or give a toggle button to convert timestamp to UTC?
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
I have 3 options in mind: UTC Timestamp
, Local Timestamp
, Human Readable Timestamp
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.
- the list view,
and 2) the event view
Once that "User Preference" is set, should all have the same time format, with respect to the user's preferred timestamp selection.
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?
This setting should be a global one, user shouldn't have to go to each Pipeline to update preference.
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
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?
https://cd.screwdriver.cd/pipelines/1/builds/827342
Looks good to me now