Skip to content

Commit b082d7b

Browse files
feat: update dashboard auto refresh configuration overlay (#3701)
* style: replace toggle with SelectGroup * chore: re-group TimeRangeDropdown * style: stack names, descriptions, and buttons * style: replace Grid with FlexBox and add css styles for layover container * chore: css style renaming * feat: add TypeAheadDropDown for auto refresh input * feat: add menuMaxHeight to Dropdown.Menu * feat: replace SelectDropdown with DurationInput * style: set timerange-dropdown width and padding * feat: add selected option for auto refresh input * style: add clock icon to TimeRangeDropdown * style: adjust confirmation and cancel button width * chore: remove unused className and comment * chore: remove old component and related functions for refresh interval * style: increase input width * feat: add valid function for confirm button * fix: remove unused PAUSED * feature: replace SlideToggle with SelectDropdown for refresh indefinite option * feature: move refresh interval above the inactivity timeout * chore: remove unused import component * feat: replace SelectDropdown with Dropdown and DurationInput components for inactivity timeout * feat: move cancel and confirm button into FlexBox * chore: remove unused import component * chore: remove console.log * chore: replace hard coded values with constant * chore: use previous state in setPickerActive function * chore: rename active to infiniteDuration * chore: remove console.log * feat: add arrow button next to input field
1 parent 6662900 commit b082d7b

File tree

5 files changed

+231
-116
lines changed

5 files changed

+231
-116
lines changed
Lines changed: 38 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,23 @@
11
@import '@influxdata/clockface/dist/variables.scss';
2+
.refresh-form-header {
3+
padding: 0 $cf-space-l;
4+
}
5+
6+
.refresh-form-body {
7+
padding: $cf-space-m $cf-space-l;
8+
}
9+
210
.refresh-form-container {
3-
display: flex;
4-
align-items: center;
5-
justify-content: space-between;
6-
padding: $cf-space-2xs + 4px $cf-space-2xl;
7-
&.reverse {
8-
flex-direction: row-reverse;
9-
}
11+
padding-top: $cf-space-l;
12+
}
13+
14+
.refresh-form-container-title {
15+
padding-bottom: $cf-space-xs;
16+
}
17+
18+
.refresh-form-container-description {
19+
color: $cf-grey-65;
20+
padding-bottom: $cf-space-xs;
1021
}
1122

1223
.refresh-form-container-child {
@@ -20,33 +31,20 @@
2031
grid-template-columns: 1fr;
2132
}
2233
}
23-
.refresh-form-column {
24-
display: grid;
25-
}
26-
27-
.refresh-timeout-span {
28-
flex: 1;
29-
}
3034

3135
.refresh-form-buttons {
32-
display: grid;
33-
grid-template-columns: auto auto;
34-
grid-gap: 10px;
36+
display: flex;
37+
justify-content: flex-end;
3538
padding: $cf-space-s $cf-space-3xs $cf-space-2xs $cf-space-3xs;
3639
}
3740

3841
.refresh-form-cancel-button {
39-
width: 140px;
42+
width: 100px;
4043
justify-self: end;
4144
}
4245

4346
.refresh-form-activate-button {
44-
width: 140px;
45-
}
46-
47-
.refresh-form-timeout-dropdown {
48-
padding: 0 0 0 $cf-space-2xs;
49-
flex: 1;
47+
width: 100px;
5048
}
5149

5250
.refresh-form-time-label {
@@ -55,13 +53,24 @@
5553

5654
.timerange-dropdown {
5755
justify-self: end;
58-
width: 178px;
56+
width: 100%;
57+
padding-top: $cf-space-xs;
5958
}
6059

61-
.refresh-form-timerange-toggle {
62-
margin: 0px $cf-space-2xs;
60+
.refresh-input {
61+
width: 210px;
6362
}
6463

65-
.refresh-input {
66-
width: 100px;
64+
.refresh-inactivity-timeout-container {
65+
width: 210px;
66+
display: flex;
67+
}
68+
69+
.refresh-inactivity-timeout-num {
70+
flex: 1;
71+
padding-right: $cf-space-2xs;
72+
}
73+
74+
.refresh-inactivity-timeout-unit {
75+
flex: 1 0 20px;
6776
}

src/dashboards/components/AutoRefreshInput.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ const AutoRefreshInput: FC<Props> = ({handleRefreshMilliseconds, label}) => {
8686
customClass="refresh-input"
8787
validFunction={isValidInput}
8888
testID="auto-refresh-input"
89+
arrowButtonOn={true}
8990
/>
9091
</ButtonGroup>
9192
)

0 commit comments

Comments
 (0)