Suppress horizontal scroll bars in snapshot selector
Brian Vaughn committed
Mar 26, 2019 at 11:23 UTC
691068b0a38e011a88c1a4a69be18e4d1b2b0b1c
2 files changed
+12
src/devtools/views/Profiler/SnapshotCommitList.css
new
+9
@@ -0,0 +1,9 @@
1
+.List {
2
+ /**
3
+ * The decision to suppress the default (horizontal) scroll bars is intentional.
4
+ * The snapshot selector is small enough that the scrollbar renders it essentially useless.
5
+ * There are two alternative navigation mechanisms (arrow keys and arrow buttons).
6
+ * If necessary, we could also expand the click-and-drag mechanism to scroll.
7
+ */
8
+ overflow-x: hidden;
9
+}
src/devtools/views/Profiler/SnapshotCommitList.js
+3
@@ -12,6 +12,8 @@ import { FixedSizeList } from 'react-window';
12
import SnapshotCommitListItem from './SnapshotCommitListItem';
13
import { minBarWidth } from './constants';
14
15
+import styles from './SnapshotCommitList.css';
16
+
17
export type ItemData = {|
18
commitDurations: Array<number>,
19
commitTimes: Array<number>,
@@ -160,6 +162,7 @@ function List({
162
style={{ height, width }}
163
>
164
<FixedSizeList
165
+ className={styles.List}
166
direction="horizontal"
167
height={height}
168
itemCount={filteredCommitIndices.length}