-
Notifications
You must be signed in to change notification settings - Fork 860
[EuiSuperDatePicker] Time window buttons #9151
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
Merged
acstll
merged 30 commits into
elastic:feat/super-date-picker-track-1-ms-1
from
acstll:super-date-picker-time-window-toolbar
Nov 5, 2025
Merged
Changes from all commits
Commits
Show all changes
30 commits
Select commit
Hold shift + click to select a range
8fed495
Render toolbar UI
acstll c83ed61
Implement time window logic
acstll 357e577
Correct method name
acstll 4e742f8
[TimeWindowToolbar] Make which buttons to show configurable
acstll 9e06fce
[TimeWindowToolbar] Add tilde prefix for _inexact_ ranges only
acstll 596fc01
[TimeWindowToolbar] Rename variables for readability
acstll 9c0cc3d
[TimeWindowToolbar] Fix displayInterval, consistent tilde, start addi…
acstll 095dcb6
[TimeWindowButtons] Rename TimeWindowToolbar
acstll 548659c
[TimeWindowButtons] Zoom factor default to 0.5
acstll f605001
[TimeWindowButtons] Display full units instead of short hand in tooltips
acstll 9595438
[TimeWindowButtons] Add unit tests for useTimeWindow hook
acstll 87df23b
[TimeWindowButtons] Test integration in EuiSuperDatePicker
acstll 46bbc7c
[TimeWindowButtons] Translate labels and tooltips
acstll 7c70b82
[TimeWindowButtons] Test disabled state
acstll 034a66b
Remove leftovers of previous toolbar naming
acstll 89ce75e
[Docs][EuiSuperDatePicker] Add Time window buttons section
acstll d52cddb
[EuiSuperDatePicker] Add TimeWindowButtons story
acstll 2481264
[Docs] Polish example snippet
acstll 68a1f47
[TimeWindowButtons] Improve screen-reader output
acstll cb338c7
[TimeWindowButtons] Fix compressed styles
acstll c7a1559
Update VRT
acstll ce59f27
Changelog
acstll da66b3c
Lint, argh
acstll 5de7681
[EuiSuperDatePicker][Tests] Remove unnecessary bangs
acstll 6c50c8b
[TimeWindowButtons] Rename config props to be more explicit
acstll 0680122
[TimeWindowButtons] Do not show when isAutoRefreshOnly is true
acstll a5e2e0d
[EuiSuperDatePicker] Move isRelativeToNow util to shared utils file
acstll 8b65549
[TimeWindowButtons] Improve date/time parsing, more gracefully handle…
acstll cd48c7a
[TimeWindowButtons] Improve util that provides final zoom factor value
acstll 286650c
[EuiSuperDatePicker] Test actual time shifted or zoomed out
acstll File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
Binary file modified
BIN
-9 Bytes
(100%)
...hrome_desktop_Forms_EuiSuperDatePicker_EuiSuperDatePicker_Quick_Select_Only.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+4.2 KB
...ome_desktop_Forms_EuiSuperDatePicker_EuiSuperDatePicker_Time_Window_Buttons.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+4 Bytes
(100%)
...chrome_mobile_Forms_EuiSuperDatePicker_EuiSuperDatePicker_Quick_Select_Only.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+7.84 KB
...rome_mobile_Forms_EuiSuperDatePicker_EuiSuperDatePicker_Time_Window_Buttons.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| - Updated `EuiSuperDatePicker` with new time window buttons for time shifting and zoom out, opt-in via `showTimeWindowButtons` boolean prop. | ||
|
|
87 changes: 87 additions & 0 deletions
87
.../components/date_picker/super_date_picker/__snapshots__/time_window_buttons.test.tsx.snap
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,87 @@ | ||
| // Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
|
||
| exports[`TimeWindowButtons renders 1`] = ` | ||
| <div | ||
| class="euiSuperDatePicker__timeWindowButtons emotion-euiButtonGroup__buttons-m-TimeWindowButtons" | ||
| data-test-subj="timeWindowButtons" | ||
| > | ||
| <span | ||
| class="euiToolTipAnchor euiButtonGroup__tooltipWrapper emotion-euiToolTipAnchor-inlineBlock-tooltipWrapper-m" | ||
| > | ||
| <button | ||
| aria-pressed="false" | ||
| class="euiButtonGroupButton euiButtonGroupButton-isIconOnly emotion-euiButtonDisplay-m-defaultMinWidth-euiButtonGroupButton-iconOnly-hasToolTip-uncompressed-base-text" | ||
| data-test-subj="timeWindowButtonsPrevious" | ||
| title="" | ||
| type="button" | ||
| > | ||
| <span | ||
| class="emotion-euiButtonDisplayContent-euiButtonGroupButton__content" | ||
| > | ||
| <span | ||
| color="inherit" | ||
| data-euiicon-type="arrowLeft" | ||
| /> | ||
| <span | ||
| class="eui-textTruncate emotion-euiButtonGroupButton__iconOnly" | ||
| data-text="Previous" | ||
| > | ||
| Previous | ||
| </span> | ||
| </span> | ||
| </button> | ||
| </span> | ||
| <span | ||
| class="euiToolTipAnchor euiButtonGroup__tooltipWrapper emotion-euiToolTipAnchor-inlineBlock-tooltipWrapper-m" | ||
| > | ||
| <button | ||
| aria-pressed="false" | ||
| class="euiButtonGroupButton euiButtonGroupButton-isIconOnly emotion-euiButtonDisplay-m-defaultMinWidth-euiButtonGroupButton-iconOnly-hasToolTip-uncompressed-base-text" | ||
| data-test-subj="timeWindowButtonsZoomOut" | ||
| title="" | ||
| type="button" | ||
| > | ||
| <span | ||
| class="emotion-euiButtonDisplayContent-euiButtonGroupButton__content" | ||
| > | ||
| <span | ||
| color="inherit" | ||
| data-euiicon-type="magnifyWithMinus" | ||
| /> | ||
| <span | ||
| class="eui-textTruncate emotion-euiButtonGroupButton__iconOnly" | ||
| data-text="Zoom out" | ||
| > | ||
| Zoom out | ||
| </span> | ||
| </span> | ||
| </button> | ||
| </span> | ||
| <span | ||
| class="euiToolTipAnchor euiButtonGroup__tooltipWrapper emotion-euiToolTipAnchor-inlineBlock-tooltipWrapper-m" | ||
| > | ||
| <button | ||
| aria-pressed="false" | ||
| class="euiButtonGroupButton euiButtonGroupButton-isIconOnly emotion-euiButtonDisplay-m-defaultMinWidth-euiButtonGroupButton-iconOnly-hasToolTip-uncompressed-base-text" | ||
| data-test-subj="timeWindowButtonsNext" | ||
| title="" | ||
| type="button" | ||
| > | ||
| <span | ||
| class="emotion-euiButtonDisplayContent-euiButtonGroupButton__content" | ||
| > | ||
| <span | ||
| color="inherit" | ||
| data-euiicon-type="arrowRight" | ||
| /> | ||
| <span | ||
| class="eui-textTruncate emotion-euiButtonGroupButton__iconOnly" | ||
| data-text="Next" | ||
| > | ||
| Next | ||
| </span> | ||
| </span> | ||
| </button> | ||
| </span> | ||
| </div> | ||
| `; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Love that VRT test... 🙃