You need to sign in or sign up before continuing.
UI shows future relative time for resource that was already created
This issue is a specific case of #766 with a clear solution. It can be resolved without needing to resolve all of #766.
Problem/Opportunity Statement
simplescreenrecorder-2022-06-03_10.23.27
For a moment, the UI shows the new volume is created "in a few seconds", then it switches to "just now". This is currently reproducible on Jetstream2. This is likely due to an API server time that's slightly ahead of the user's browser time, so for a brief moment, Exosphere claims the volume was created in the future. This is impossible. When displaying relative time for when an existing resource was created, it should never be created later than "just now".
I don't believe this situation is otherwise harmful, this is just an opportunity to improve the UI.
What would success / a fix look like?
Something like this:
- Make a helper function
Helpers.Time.relativeTimeNeverInTheFuture
, which wrapsDateFormat.Relative.relativeTime
but ensuring that theend
time is never later than thestart
time - Survey the code for all uses of
DateFormat.Relative.relativeTime
(e.g.). At each call site:- Decide whether we want to avoid showing relative times that may be in the future
- If we do want to avoid this, switch to
relativeTimeNeverInTheFuture