You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 30, 2024. It is now read-only.
* Refactor Popover UI
- Add aria attribute to the popover trigger
- Fix problem with return focus to target
- Remove legacy RAF schedule call in tether
- Add new hook API for exposing popover state
* Fix Combobox UI
- Fix group option layout
- Fix scroll into view logic (add scroll into center functionality)
* Connect forward ref and truncated text element
* Make all dashboard names unique
* Refactor DashboardSelect UI (use combobox + popover over the reach ui listbox)
* Remove legacy dashboard select UI components
* Remove @reach/listbox styles from the main style entry
* Fix dashboard content import
* Fix combobox popover close logic
* Fix dashboard page unit tests
* Update dashboard select story
* Fix unit tests of UI components that use popover UI
* Update feedback prompt unit tests
* Fix chart tooltip return to target logic
* Fix insight integration tests (dashboard select selectors)
* Fix layout and dashboard option selectors
* Bring back async tether scheduling
* Fix jest snapshots
* Remove reach ui listbox package
Copy file name to clipboardexpand all lines: client/web/src/enterprise/insights/pages/dashboards/dashboard-page/components/dashboard-select/DashboardSelect.module.scss
+105-37
Original file line number
Diff line number
Diff line change
@@ -1,41 +1,117 @@
1
-
.list {
2
-
display: block;
3
-
position: static;
4
-
width: 100%;
5
-
overflow: auto;
6
-
max-height: 32rem;
7
-
// This value is synced with dashboard select input width
8
-
max-width: 22.75rem;
9
-
10
-
&:focus {
11
-
// Reach-ui implicitly reset box-shadow to none if list element is focused
12
-
// to preserve visual state we have to explicitly set a box shadow value to
13
-
// our standard --dropdown-shadow
14
-
box-shadow: var(--dropdown-shadow);
1
+
.trigger-button {
2
+
display: flex;
3
+
align-items: center;
4
+
background-color: var(--input-bg);
5
+
font-weight: normal;
6
+
7
+
&--text {
8
+
display: flex;
9
+
align-items: baseline;
10
+
gap: 0.5rem;
11
+
12
+
/*
13
+
Without min-width with value, the flex child containing the other text elements
14
+
won’t narrow past the “implied width” of those text elements.
15
+
16
+
More info (https://css-tricks.com/flexbox-truncated-text/)
17
+
*/
18
+
min-width: 0;
19
+
white-space: nowrap;
20
+
margin-right: 0.25rem;
21
+
}
22
+
23
+
&--icon {
24
+
flex-shrink: 0;
25
+
margin-left: auto;
26
+
// Compensate inner view box SVG padding
27
+
margin-right: -0.25rem;
28
+
color: var(--icon-color);
15
29
}
16
30
}
17
31
18
-
.popover {
19
-
// Reset reach-ui styles for popover element.
20
-
outline: none!important;
21
-
box-shadow: none!important;
22
-
border: none;
23
-
background: none;
32
+
.badge {
33
+
max-width: 8rem;
34
+
flex-shrink: 0;
24
35
}
25
36
26
-
.group-label {
27
-
font-weight: normal;
28
-
font-size: 0.75rem;
29
-
border-top: 1pxsolidvar(--border-color);
30
-
padding: 0.5rem0.75rem0;
37
+
.popover {
38
+
display: flex;
31
39
}
32
40
33
-
.option {
34
-
margin: 0.25rem0;
41
+
.combobox {
42
+
display: flex;
43
+
flex-direction: column;
44
+
height: 100%;
45
+
max-width: 25rem;
46
+
47
+
&-unchanged {
48
+
[data-user-value] {
49
+
font-weight: normal;
50
+
}
51
+
}
35
52
36
-
& + & {
37
-
margin-top: -0.25rem;
53
+
&--input-container {
54
+
padding: 0.5rem;
55
+
position: sticky;
56
+
top: 0;
57
+
z-index: 1;
58
+
border-bottom: 1pxsolidvar(--border-color);
59
+
background: var(--dropdown-bg);
60
+
}
61
+
62
+
&--input {
63
+
font-size: 0.75rem;
64
+
padding-bottom: 0.25rem;
38
65
}
66
+
67
+
&--list {
68
+
padding-top: 0.25rem;
69
+
padding-bottom: 0.25rem;
70
+
@-moz-documenturl-prefix('') {
71
+
scrollbar-width: thin;
72
+
scrollbar-color: var(--text-muted);
73
+
}
74
+
}
75
+
76
+
&--option-group {
77
+
[data-group-heading] {
78
+
position: sticky;
79
+
top: calc(-0.25rem-1px);
80
+
background-color: var(--body-bg);
81
+
}
82
+
}
83
+
84
+
&--option {
85
+
display: flex;
86
+
align-items: baseline;
87
+
justify-content: space-between;
88
+
gap: 0.5rem;
89
+
padding-left: 1rem;
90
+
91
+
&[data-highlighted] {
92
+
/* Badge-secondary variant for improved contrast when background color changes */
93
+
.badge {
94
+
background-color: var(--color-bg-1);
95
+
border-color: var(--color-bg-1);
96
+
}
97
+
}
98
+
99
+
&-selected {
100
+
background-color: var(--color-bg-3);
101
+
102
+
/* Badge-secondary variant for improved contrast when background color changes */
Copy file name to clipboardexpand all lines: client/web/src/enterprise/insights/pages/dashboards/dashboard-page/components/dashboard-select/DashboardSelect.story.tsx
0 commit comments