-
Notifications
You must be signed in to change notification settings - Fork 13
Add a tooltip with absolute datetime to relative time element #1879
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
Add a tooltip with absolute datetime to relative time element #1879
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
"Run state updated" is a helpful label for the timestamp, and matches what it's called in the API. It makes me wonder if there's a way we could be clearer about it in the table. You can reasonably guess that the time given is the amount of time the thing has been in the current state, but it's not ideal to have to hover over it to be sure. ![]() What if we add "for" before the time ago, so it's like ![]() Out of scope for this PR: this also makes me wonder if we should change Another thing I noticed is that the tooltip appears to be centered over the div rather than the text itself: ![]() ![]() |
If |
The I'd like to investigate some other options, and look into how this is handled on other platforms. But this doesn't need to be a blocker on this PR. |
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.
love it
oxidecomputer/console@367142c...644a45b * [644a45b8](oxidecomputer/console@644a45b8) oxidecomputer/console#1882 * [69927db1](oxidecomputer/console@69927db1) oxidecomputer/console#1879 * [a3165dff](oxidecomputer/console@a3165dff) oxidecomputer/console#1883 * [4f706c2b](oxidecomputer/console@4f706c2b) oxidecomputer/console#1877 * [7999343d](oxidecomputer/console@7999343d) oxidecomputer/console#1880
oxidecomputer/console@367142c...644a45b * [644a45b8](oxidecomputer/console@644a45b8) oxidecomputer/console#1882 * [69927db1](oxidecomputer/console@69927db1) oxidecomputer/console#1879 * [a3165dff](oxidecomputer/console@a3165dff) oxidecomputer/console#1883 * [4f706c2b](oxidecomputer/console@4f706c2b) oxidecomputer/console#1877 * [7999343d](oxidecomputer/console@7999343d) oxidecomputer/console#1880
Fixes #641
This PR pulls the formatted "X {seconds|minutes|hours|days|etc.} ago" relative time into a new component that also wraps it in a tooltip that renders the absolute value of that timestamp.
For example:

The description is optional; a relative time without that label still renders the absolute time appropriately:
