-
Notifications
You must be signed in to change notification settings - Fork 10
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
Create DateDetails component #460
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@hoorayimhelping @gjones I think we should rename this component to something else as datetime component usually represents the dropdown component to choose the date and time which we would be implementing as it is being used in some other projects like the ones @gingerwizard is working on |
Hey @hoorayimhelping , I almost forgot about this, apologies. As I started thinking about this, I started wondering: how important is it for users to see this info in unix timestamp and other timezones that are not theirs. Could you provide some scenarios? |
@crisalbu no worries, we're all busy. Let's use the following screenshot as an example for both questions. Let's say someone is looking at the
That's a convenience thing. Most software systems use either unix timestamps or ISO8601 formatted dates internally in their systems. In our last run example, the user wants to search their system for something that happened after the last run (maybe a misconfiguration of a service, maybe a bad query). They have a timestamp of the last good run, so they know that the thing that broke their query had to have happened after that. Whatever date format their system uses, they can just copy that and write a query and just paste it in, rather than having to look up documentation about how to convert an ISO8601 timestamp into a unix timestamp (or vise versa).
Another convenience. Imagine Zach notices the last run is off, and he pings Fabio about it because he thinks its a code change broke the query. They both start looking over recent commits to see if one is suspicious. If the tools they use to do that show the commits in local time or UTC time, they don't have to do any kind of conversion because they have right format right in front of them. Does that illustrate the reasoning a little better? |
Yep, it makes sense, thank you very much for the examples. I'll add it as an action item for early next week. |
Met with both Gareth and Bucky to discuss when we should use this component - and decided to use it there where time precision is necessary, e.g.: recent queries, audit page, notifications. We also discussed that on these pages, the time should be presented relative to present time (5 min ago, 5h30 min ago, 1 day ago). When displaying the date , we should use this format:
The design of the component can be found here The position of the arrow can be: top, bottom, left, right. This component was derived from the Popover component. |
1929e86
to
f4fc6fd
Compare
71d7df9
to
7293a85
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great, thank you @hoorayimhelping !
Now that I see it implemented, I realize that the text might be too big, could we use typography/styles/product/text/normal/sm
instead?
Regarding the color, let's mute the labels.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, instead of saying GMT+1
, could we try to avoid using numbers and simply say CET
, or WAT
, or WEST
, depending on the location? See this map as example: https://www.timeanddate.com/time/map/
I realise that what I'm suggesting increases the complexity, so we can leave it as GMT+1, or GMT+7, if it's not possible to do it now.
@crisalbu I'll try to make this work. I made an attempt on Friday and had trouble with it, but I'll look at it again with fresh eyes and see how it goes :) |
@crisalbu So I did some more research into time zone abbreviations, and it's a whole mess. There isn't any standardization on abbreviations, and there is ambiguity around them, which is why libraries use offsets. For example:
I think we have a couple of options:
I personally think we should go with option one - it's standard and doesn't take up a ton of space and is generally pretty well understood, but any option will work and if you strongly prefer the abbreviations, we can certainly do that. |
Let's go with option #1 for simplicity. Out of curiosity, why do we have EST and PST instead of GMT-5 or GMT-8? 🤔 If we go with GMT, it feels like we should be consistent, no? |
@crisalbu because my locale is In the cases where the user is in a timezone and locale near to the server, everything should look normal. These are just some specific edge cases where the user's locale and timezone is far from the server. |
Understood, thanks for clarifying! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💪🏻 🙌🏻
DateDetails
component