[EuiSuperDatePicker] Fixes for width and auto refresh#5383
[EuiSuperDatePicker] Fixes for width and auto refresh#5383cchaos merged 38 commits intoelastic:mainfrom
Conversation
- Adds `width` and `isQuickSelectOnly` props - Adjusts styles accordingly with sensible min-widths - Adds Playground - 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 expandin pretty format and opening start date popover
…`readOnly` And fixed border-radius for EuiSuperDatePicker with `append`
- disabling inputs if paused - invalidating value if 0 or less - always rendering (moved render logic to quick select) - render in one row
…uiAutoRefresh component - Increases the default `refreshInterval` to `1000` / `1s`
…urned on - [prettyInterval()] added `shortHand` parameter
…esponsive` to customizable prop - Support in EuiSuperDatePicker with `showUpdateButton = ‘iconOnly’` - Fix min-widths on smaller screens
|
Preview documentation changes for this PR: https://eui.elastic.co/pr_5383/ |
|
I've filled out the PR summary with screenshots and some more explanations now this PR is ready for review as I finalize all the checklist items. |
|
@cchaos I started reviewing this PR. Need to do some more tests. But before I continue, one thing that came to my mind for the This way users would have feedback and know that the refresh is working as expected. |
|
An animation could be helpful. I think that would require a new prop since the standalone EuiAutoRefresh doesn't actually handle the countdown. Can you make a specific issue for follow up? Since this PR is big enough already 😬 |
|
Preview documentation changes for this PR: https://eui.elastic.co/pr_5383/ |
|
Preview documentation changes for this PR: https://eui.elastic.co/pr_5383/ |
cee-chen
left a comment
There was a problem hiding this comment.
Changes LGTM once CI is passing!
|
Preview documentation changes for this PR: https://eui.elastic.co/pr_5383/ |
…d button - Change `TSX` source types examples back to `JS` for now
|
Preview documentation changes for this PR: https://eui.elastic.co/pr_5383/ |
|
@miukimiu Can you spot check this for any design issues next week? |
src-docs/src/views/super_date_picker/super_date_picker_example.js
Outdated
Show resolved
Hide resolved
|
Preview documentation changes for this PR: https://eui.elastic.co/pr_5383/ |
Co-authored-by: Constance <constancecchen@users.noreply.github.com>
|
Preview documentation changes for this PR: https://eui.elastic.co/pr_5383/ |
elizabetdev
left a comment
There was a problem hiding this comment.
Thanks, @cchaos! Great enhancements! LGTM! 🎉
Tested in Chrome, Safari, Edge, and Firefox. I also looked into the code.
src-docs/src/views/super_date_picker/super_date_picker_config.tsx
Outdated
Show resolved
Hide resolved
| export const SuperDatePickerExample = { | ||
| title: 'Super date picker', | ||
| intro: ( | ||
| <EuiText grow={false}> |
There was a problem hiding this comment.
Removing grow actually aligns better with our our EuiPageHeader renders the description prop. I know it may seem odd comparatively, but it's a much better line-length for readability and will align with our guidelines pages.
|
Preview documentation changes for this PR: https://eui.elastic.co/pr_5383/ |
|
Preview documentation changes for this PR: https://eui.elastic.co/pr_5383/ |
|
jenkins test this |
|
Preview documentation changes for this PR: https://eui.elastic.co/pr_5383/ |
|
Preview documentation changes for this PR: https://eui.elastic.co/pr_5383/ |

[EuiRefreshInterval] Updates
I did some user-testing on this with a sample size of 1 😂 , but the main feedback was that the "Start"/"Stop" nomenclature was confusing because it felt more like it was going to animate over a period of time, instead of refreshing. This new design was immediately recognizable as to what was going to occur.
refreshIntervalto1000/1sI also looked at attempting to fix #2249 but the problem is, if it doesn't turn back off, then the refresh continues to happen constantly.
[New] EuiAutoRefresh & EuiAutoRefreshButton components
Fixes #1545
[readOnly]text input that's wrapped in an EuiInputWrapper whose popover contains the EuiRefreshInterval.[EuiSuperDatePicker] Sizing updates
widthpropcompressed: Partially covers [EuiDatePicker] compressed flag support #4572Screen.Recording.2021-11-17.at.10.30.10.AM.mp4
isQuickSelectOnlypropScreen.Recording.2021-11-17.at.10.33.29.AM.mp4
Screen.Recording.2021-11-17.at.10.39.22.AM.mp4
[EuiSuperDatePicker] Auto refresh updates
Fixes #4213
isAutoRefreshOnlyto render the new EuiAutoRefresh componentprettyInterval(): addedshortHandparameter[EuiSuperDatePicker] Other fixes
appendroundswitch to popover footer to prepare for [EuiSuperDatePicker] Add "Round to" flag on commonly used section and expose a property to enable it by default #4537[EuiSuperUpdateButton] Added support for
iconOnlyversion and movedresponsiveto customizable propshowUpdateButton = ‘iconOnly’Screen.Recording.2021-11-17.at.10.58.57.AM.mp4
[EuiFormControlLayout] Fixes
dataTestSubj->data-test-subj(Added data-test-subj to EuiFormControlLayout component in super_date_picker file #5085 accidentally created the prop name incorrectly)readOnly[EuiIcon] Added
timeRefreshChecklist