You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[EuiSuperDatePicker] Does not properly restore relative dates #4026
Click start date to edit the start date and enter 15months ago
Observe SuperDatePicker puts human friendly desc in start date of ~ 1 year ago which is handy.
Click Update
Observe the time picker reflects 15 months ago just fine.
Click to edit the start date again
Observe that 1year ago is populate in the time picker GUI instead of 15 months ago. Note the underlying date is still correct (verify this by looking at the absolute date at the bottom of the picker).
changed the title [-]SuperDatePicker does not properly restore relative dates[/-][+][EuiSuperDatePicker] Does not properly restore relative dates[/+]on Sep 20, 2020
Hi @JasonStoltz@cee-chen after seeing this elastic/kibana#143157 I think it would be great if you could re-prioritize this task. The proposed solution (adding a prop to disable rounding) sounds good to me.
As stated here elastic/kibana#143157 (comment) we are not gaining much when we round the values (in UI terms, probably just a couple of characters, on readability is pretty limited the gain IMHO) , our use cases mostly require precise timings.
I see how easy it is to read ~2m instead of 115s, but 115s could be there because of a specific use case.
We can round up only on fixed intervals that are multiples of a bigger unit: 120s to 2m, 180m to 3h, 7 days to 1 week etc.
Everything that is not a multiple should be kept in its original (30 days is 30 days not 1 month) form even if it could look "difficult" to read.
I'm also fine having no rounding multiples at all: the user can always configure 120s or 2min they can do that by themself.
I strongly believe that the humanized version of an interval/duration should be applied to timestamps that require minimal precision like here in GitHub where I don't need to know at which second or minute a comment was posted but is just fine knowing that happened ~16 hours ago.
Activity
[-]SuperDatePicker does not properly restore relative dates[/-][+][EuiSuperDatePicker] Does not properly restore relative dates[/+]JasonStoltz commentedon Mar 20, 2023
We're thinking that a viable solution to this may be to add a prop which turns off rounding (for #5752 as well).
markov00 commentedon Jan 23, 2024
Hi @JasonStoltz @cee-chen after seeing this elastic/kibana#143157 I think it would be great if you could re-prioritize this task. The proposed solution (adding a prop to disable rounding) sounds good to me.
As stated here elastic/kibana#143157 (comment) we are not gaining much when we round the values (in UI terms, probably just a couple of characters, on readability is pretty limited the gain IMHO) , our use cases mostly require precise timings.
I see how easy it is to read
~2minstead of115s, but115scould be there because of a specific use case.We can round up only on fixed intervals that are multiples of a bigger unit:
120sto2m,180mto3h,7 daysto1 weeketc.Everything that is not a multiple should be kept in its original (
30 daysis30 daysnot1 month) form even if it could look "difficult" to read.I'm also fine having no rounding multiples at all: the user can always configure
120sor2minthey can do that by themself.I strongly believe that the humanized version of an interval/duration should be applied to timestamps that require minimal precision like here in GitHub where I don't need to know at which second or minute a comment was posted but is just fine knowing that happened ~16 hours ago.
JasonStoltz commentedon Jan 30, 2024
We bumped this issue up in priority. We'll plan to implement this sometime in the next few weeks.