Commit de0b4fc
authored
Search Relative Time Queries (#1305)
Adds "Relative Time" switch to TimePicker component (if relative time is supported by parent). When enabled, searches will work similar to Live Tail but be relative to the option selected.
<img width="555" height="418" alt="Screenshot 2025-10-27 at 2 05 25 PM" src="https://github.com/user-attachments/assets/20d38011-d5d0-479f-a8ea-6b0be441ca87" />
Some notes:
1. When relative is enabled, I disabled very large time ranges to prioritize performance.
2. If you select "Last 15 mins" then reload, the Input will save "Live Tail" because these are the same option, this should be an edge case.
3. In the future, we might want to make "Relative Time" the default, but I didn't want to immediately do that. We could probably improve the UX further (cc @elizabetdev).
4. Moves a lot of the "Live Tail" logic out of various spots and centralizes it in a unified spot to support other values
Fixes HDX-26531 parent 808413f commit de0b4fc
File tree
11 files changed
+584
-87
lines changed- .changeset
- packages/app
- src
- components/TimePicker
- tests/e2e/features/search
11 files changed
+584
-87
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | 4 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
| 66 | + | |
66 | 67 | | |
67 | 68 | | |
68 | 69 | | |
| |||
125 | 126 | | |
126 | 127 | | |
127 | 128 | | |
| 129 | + | |
128 | 130 | | |
129 | 131 | | |
130 | 132 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
| 27 | + | |
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
52 | | - | |
53 | | - | |
| 52 | + | |
| 53 | + | |
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
| |||
43 | 44 | | |
44 | 45 | | |
45 | 46 | | |
46 | | - | |
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| |||
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
94 | | - | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
95 | 99 | | |
96 | 100 | | |
97 | 101 | | |
98 | 102 | | |
99 | 103 | | |
100 | 104 | | |
101 | 105 | | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
102 | 110 | | |
103 | 111 | | |
104 | 112 | | |
| |||
417 | 425 | | |
418 | 426 | | |
419 | 427 | | |
420 | | - | |
| 428 | + | |
421 | 429 | | |
422 | 430 | | |
423 | 431 | | |
| |||
426 | 434 | | |
427 | 435 | | |
428 | 436 | | |
429 | | - | |
| 437 | + | |
430 | 438 | | |
431 | 439 | | |
432 | 440 | | |
| |||
664 | 672 | | |
665 | 673 | | |
666 | 674 | | |
667 | | - | |
668 | | - | |
| 675 | + | |
| 676 | + | |
| 677 | + | |
| 678 | + | |
669 | 679 | | |
670 | 680 | | |
671 | 681 | | |
| |||
727 | 737 | | |
728 | 738 | | |
729 | 739 | | |
730 | | - | |
| 740 | + | |
731 | 741 | | |
732 | 742 | | |
733 | 743 | | |
| |||
736 | 746 | | |
737 | 747 | | |
738 | 748 | | |
739 | | - | |
740 | | - | |
741 | | - | |
742 | | - | |
743 | | - | |
744 | | - | |
745 | | - | |
746 | | - | |
747 | | - | |
748 | | - | |
749 | | - | |
750 | | - | |
751 | 749 | | |
752 | 750 | | |
753 | 751 | | |
| |||
1014 | 1012 | | |
1015 | 1013 | | |
1016 | 1014 | | |
| 1015 | + | |
| 1016 | + | |
| 1017 | + | |
| 1018 | + | |
| 1019 | + | |
| 1020 | + | |
| 1021 | + | |
| 1022 | + | |
| 1023 | + | |
| 1024 | + | |
| 1025 | + | |
| 1026 | + | |
| 1027 | + | |
| 1028 | + | |
| 1029 | + | |
| 1030 | + | |
| 1031 | + | |
| 1032 | + | |
| 1033 | + | |
| 1034 | + | |
1017 | 1035 | | |
1018 | 1036 | | |
1019 | | - | |
| 1037 | + | |
1020 | 1038 | | |
1021 | 1039 | | |
1022 | 1040 | | |
| |||
1043 | 1061 | | |
1044 | 1062 | | |
1045 | 1063 | | |
1046 | | - | |
| 1064 | + | |
1047 | 1065 | | |
1048 | 1066 | | |
1049 | 1067 | | |
1050 | 1068 | | |
1051 | | - | |
1052 | | - | |
| 1069 | + | |
1053 | 1070 | | |
1054 | 1071 | | |
1055 | 1072 | | |
| |||
1508 | 1525 | | |
1509 | 1526 | | |
1510 | 1527 | | |
1511 | | - | |
1512 | | - | |
1513 | | - | |
1514 | | - | |
1515 | | - | |
| 1528 | + | |
1516 | 1529 | | |
1517 | 1530 | | |
| 1531 | + | |
| 1532 | + | |
| 1533 | + | |
| 1534 | + | |
| 1535 | + | |
| 1536 | + | |
1518 | 1537 | | |
| 1538 | + | |
| 1539 | + | |
| 1540 | + | |
| 1541 | + | |
| 1542 | + | |
1519 | 1543 | | |
1520 | 1544 | | |
1521 | 1545 | | |
| |||
0 commit comments