Closed g-a-v-i-n closed 6 years ago
The title of this PR doesn't correspond to the actual contents though! Other than that, I approve. Normally, I'm not the person to be the first to suggest tests, but for little things like incrementing the track, it would probably save time in the end to have some specs. In any case, let's do this.
As always, forever grateful.
Ah dang I forgot you can change the title for some reason. Yeah, I agree re: tests for this, was thinking the same thing.
This solves https://github.com/broskoski/mac.are.na/issues/40 with a few things. In general, the app was too reliant on knowing the index of the currently playing track.
track validation: 1) add validation messages etc immediately when playlist is loaded. 2) remove invalid items immediately after and move them to their own list
playback: 1) simplify track increment/decrement 2) pass actual content array, not it's parent object (lol) 3) separate track user selection function from track increment/decrement
filtering: 1) instead of filtering in presentational component, filter inside setSort and immutably update channel object