Cleaned up a no-selection state
Brian Vaughn committed
Mar 25, 2019 at 10:34 UTC
3fa951d3c303ecca5fac1d34b649faf208345f29
4 files changed
+12
-6
src/devtools/views/Profiler/Profiler.css
+1
@@ -22,6 +22,7 @@
22
flex: 1 1 100px;
23
max-width: 300px;
24
border-left: 1px solid var(--color-border);
25
+ border-top: 1px solid var(--color-border);
26
}
27
28
.Content {
src/devtools/views/Profiler/SidebarCommitInfo.css
+9
-2
@@ -4,13 +4,12 @@
4
flex: 0 0 auto;
5
display: flex;
6
align-items: center;
7
- border-bottom: 1px solid var(--color-border);
8
- border-top: 1px solid var(--color-border);
7
}
8
9
.Content {
10
padding: 0.5rem;
11
user-select: none;
12
+ border-top: 1px solid var(--color-border);
13
}
14
15
.List,
@@ -45,3 +44,11 @@
44
font-family: var(--font-family-monospace);
45
font-size: var(--font-size-monospace-normal);
46
}
47
+
48
+.NothingSelected {
49
+ display: flex;
50
+ align-items: center;
51
+ justify-content: center;
52
+ height: 100%;
53
+ color: var(--color-dim);
54
+}
src/devtools/views/Profiler/SidebarCommitInfo.js
+1
-1
@@ -21,7 +21,7 @@ export default function SidebarCommitInfo(_: Props) {
21
const { profilingCache } = useContext(StoreContext);
22
23
if (selectedCommitIndex === null) {
24
- return null; // TODO (profiling) Use a better UI
24
+ return <div className={styles.NothingSelected}>Nothing selected</div>;
25
}
26
27
const { commitDurations, commitTimes } = profilingCache.ProfilingSummary.read(
src/devtools/views/Profiler/SidebarInteractions.css
+1
-3
@@ -4,13 +4,12 @@
4
flex: 0 0 auto;
5
display: flex;
6
align-items: center;
7
- border-bottom: 1px solid var(--color-border);
8
- border-top: 1px solid var(--color-border);
7
}
8
9
.Content {
10
padding: 0.5rem;
11
user-select: none;
12
+ border-top: 1px solid var(--color-border);
13
}
14
15
.Name {
@@ -21,7 +20,6 @@
20
}
21
22
.NothingSelected {
24
- border-top: 1px solid var(--color-border);
23
display: flex;
24
align-items: center;
25
justify-content: center;