-
Notifications
You must be signed in to change notification settings - Fork 843
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
[EuiSuperDatePicker] Add "Round to" flag on commonly used section and expose a property to enable it by default #4537
Comments
@cchaos Can i take this issues ? |
This issue is marked as needs design as it will have to implement a new UI element to handle the feature request. I don't think we have a good path forward just yet. |
@cchaos okay i will check it out once the design implementation is ready |
👋 Hey there. This issue hasn't had any activity for 180 days. We'll automatically close it if that trend continues for another week. If you feel this issue is still valid and needs attention please let us know with a comment. |
Still valid |
@cchaos curious if we can prioritise this? I think it'd be helpful for increasing shard request cache hit ratio. Especially with elastic/elasticsearch#79610, this seems like relatively low-hanging fruit with potentially a high positive impact on search performance/CPU usage in a cluster. I can also pick it up myself if these specs are final. This would allow us to move forward with elastic/kibana#94280 as well. |
I took a stab at this, but IMO the current handling of date rounding in the date picker leads to confusing behaviour. E.g., I actually think we want to round up, not down in most cases, and we want to apply date rounding on both the start and end of the date range. Right now I think the lower end will be rounded down and the upper end will be rounded up which leads to a bigger date range being selected than I would intuitively guess. E.g. if I select from: now-15m/m, to: now/m, 16 minutes will be selected instead of 15 (as far as I can tell). Maybe the date picker itself should not apply date rounding, and it should be left up to the consumer, only propagating a round property. Thoughts? |
Can someone elaborate why we round down by default? I see that we set date ranges like |
Also, @nreese was instrumental in building this component. I wonder if he's got further insight? |
The EUI date picker components just followed the model of the existing Kibana date picker components so all of these rounding decisions pre-date the EUI components. The reason the start date is rounded down and the end date is rounded up can be seen in an example like
Maybe @spalger or @lukasolson can provide more history? |
One more thought, changing the rounding would be a breaking change as For better or worse, I don't think it's possible to change the rounding without breaking existing users. |
Yeah I don't expect this to change anytime soon given the impact. But it's very counterintuitive that |
Maybe a good workaround is to change the default values for date ranges? E.g.:
|
Any changes to the defaults should be coordinated with the Kibana repo. https://github.com/elastic/kibana/blob/main/src/plugins/data/server/ui_settings.ts#L356 is where Kibana's defaults come from. How about opening this issue in the Kibana repo and get a discussion about defaults going there? |
* [EuiSuperDatePicker] Sizing updates - Adds `width` and `isQuickSelectOnly` props - Adjusts styles accordingly with sensible min-widths - Updated Save Queries example to show auto width and reducing to quick select only when KQL is in focus - Fixed `dataTestSubj` -> `data-test-subj` - Removed ‘Show dates’ in favor of automatically expanding pretty format and opening start date popover * [EuiIcon] Added `timeRefresh` * [EuiFormControlLayout] Fix background of button prepend/appends with `readOnly` - And fixed border-radius for EuiSuperDatePicker with `append` * [EuiRefreshInterval] Using a toggle for start/stop - disabling inputs if paused - invalidating value if 0 or less - always rendering (moved render logic to quick select) - render in one row * [New] EuiAutoRefresh & EuiAutoRefreshButton components * [EuiSuperDatePicker] Simplify `isAutoRefreshOnly` to render the new EuiAutoRefresh component - Increases the default `refreshInterval` to `1000` / `1s` * [EuiSuperDatePicker] Added EuiAutoRefreshButton as an `append` when turned on - [prettyInterval()] added `shortHand` parameter * Fix color of prepend/append backgrounds in dark mode * Moved round switch to popover footer to prepare for #4537 * [EuiSuperDatePicker] Now supports `compressed` * [EuiSuperUpdateButton] Add support for `iconOnly` version and move `responsive` to customizable prop - Support in EuiSuperDatePicker with `showUpdateButton = ‘iconOnly’` - Fix min-widths on smaller screens * [EuiSuperUpdateButton] Splitting up prop types between internal and configurable
👋 Hey there. This issue hasn't had any activity for 180 days. We'll automatically close it if that trend continues for another week. If you feel this issue is still valid and needs attention please let us know with a comment. |
Kibana issue follow-up: elastic/kibana#94280 |
👋 Hey there. This issue hasn't had any activity for 180 days. We'll automatically close it if that trend continues for another week. If you feel this issue is still valid and needs attention please let us know with a comment. |
...
@dgieselaar Do we still need this from EUI or can we close this and instead start recommending users that they should change their defaults (perhaps through a warning in APM UI)? |
We lost quite a bit of context for this issue recently. Is there still something that Kibana needs from EUI here? |
@JasonStoltz It's not a priority for us anymore, we've abandoned the idea of improving cache efficiency. I do think something is fundamentally broken with date rounding in the date picker, but I can see how changing that is a significant effort. |
Since this is no longer a priority, we'll close this issue. If this changes, please open a new issue. |
On the
Relative
tab there's a flag calledRound to the ${unit}
that when enabled rounds the selected time.I would like to have a similar flag on the commonly used section:
When that is enabled any option selected would be rounded.
I would also like to have a new property to enable it by default.
The text was updated successfully, but these errors were encountered: