Skip to content

[EuiSuperDatePicker] Auto-refresh button's pretty interval is too pretty #5752

Closed

Description

@chandlerprall

From elastic/kibana#126901

Set the super date picker's auto refresh interval to 90s, the UI unhelpfully rounds it to 2m

autorefreshinterval.mov

Activity

  1. cee-chen commented on Mar 31, 2022

    @cee-chen
    Contributor

    Might be worth discussing the parameters of this issue a bit more here. Do we basically just want to change the branching logic of prettyInterval to show seconds if under 2 minutes of time? Personally I think showing 180 s instead of 3 m (or even 200 s instead of 3 m) to be cognitively harder to grasp.

  2. cee-chen commented on Mar 31, 2022

    @cee-chen
    Contributor

    My suggestion:

    • If it's under 60 seconds show seconds
    • If it's exactly 60 seconds show 1 m
    • If it's between 61 seconds and 120 seconds (1-2 minutes) show seconds
    • If it's 120 seconds or above show m (until it reaches an hour, of course)

    Thoughts?

  3. cee-chen commented on Mar 31, 2022

    @cee-chen
    Contributor

    Hm, the above still gets a little silly if people try to put in odd intervals.

    Screen Shot 2022-03-31 at 11 40 24 AM

    Maybe we should simply limit this logic to show seconds if 90 seconds or under, with an extra case for (if it's exactly 60 seconds show 1 m.

    Also worth noting that our actual refresh dropdown still attempts to transmute 90 seconds into 1.5 minutes.

    So maybe instead the issue is we should be not rounding to the nearest whole number but instead to the nearest single decimal point?

  4. JasonStoltz commented on Jan 17, 2023

    @JasonStoltz
    Contributor

    We've decided not to address this issue for now. This appears to be related to #5571.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions