From 3215aed270705da6adc6a6c73baa2378e36debdb Mon Sep 17 00:00:00 2001 From: Jordan Eldredge Date: Sat, 7 Oct 2017 22:48:21 -0700 Subject: [PATCH] Fix snapshot --- .../__snapshots__/index.test.js.snap | 98 +------------------ js/components/PlaylistWindow/index.js | 3 + 2 files changed, 4 insertions(+), 97 deletions(-) diff --git a/js/components/PlaylistWindow/__snapshots__/index.test.js.snap b/js/components/PlaylistWindow/__snapshots__/index.test.js.snap index a6c35d13..e4cadf37 100644 --- a/js/components/PlaylistWindow/__snapshots__/index.test.js.snap +++ b/js/components/PlaylistWindow/__snapshots__/index.test.js.snap @@ -40,13 +40,7 @@ exports[`PlaylistWindow renders to snapshot 1`] = `
-
+
-
-
- 5 - . -
-
- - Dragula - -
-
- 03:11 -
-
-
-
- 6 - . -
-
- - Ultrasonic Sound - -
-
- 03:11 -
-
-
-
- 7 - . -
-
- - Du hast - -
-
- 03:11 -
-
diff --git a/js/components/PlaylistWindow/index.js b/js/components/PlaylistWindow/index.js index ab996fad..013c6c85 100644 --- a/js/components/PlaylistWindow/index.js +++ b/js/components/PlaylistWindow/index.js @@ -64,6 +64,9 @@ const PlaylistWindow = props => { overflowTracks + 1 ); + // Ugh. By not rendering some tracks, we can end up in a situation where + // scrolling causes the number of digits in the tracks to go up, thus causing + // a horizontal jump. const tracks = trackOrder.slice(offset, offset + numberOfVisibleTracks); return (