Kam227 / site-unit2-project1-music-playlist-explorer-starter

Starter code for the Music Playlist Explorer project
0 stars 0 forks source link

Project 1: Campus Life Starter Feedback #1

Open spencm1 opened 5 months ago

spencm1 commented 5 months ago

Overall, good job! Your code is for the most part well-organized and easy to understand.

For this review, I'll provide code snippets and feedback on code snippets:

https://github.com/Kam227/site-unit2-project1-music-playlist-explorer-starter/blob/27da41a2decf815a5665cb4f0ea081267c1b28a5/music-playlist-creator/script.js#L1 You don't seem to use this variable and its name doesn't match its function, you can probably delete it.

https://github.com/Kam227/site-unit2-project1-music-playlist-explorer-starter/blob/27da41a2decf815a5665cb4f0ea081267c1b28a5/music-playlist-creator/script.js#L25-L26 Setting an id here is confusing, because this is a function that runs for multiple cards. Therefore, if we give them all the same id, this can lead to bugs in our code. Since your code doesn't need to keep track of each card at the id level, it's best not to include an id here IMO.

https://github.com/Kam227/site-unit2-project1-music-playlist-explorer-starter/blob/27da41a2decf815a5665cb4f0ea081267c1b28a5/music-playlist-creator/script.js#L63-L64 This is a clever workaround. You can get a clearer solution, however, with: heart.addEventListener('click', (event) => event.stopPropagation()); and then you could add the event listener as normal.

https://github.com/Kam227/site-unit2-project1-music-playlist-explorer-starter/blob/27da41a2decf815a5665cb4f0ea081267c1b28a5/music-playlist-creator/script.js#L106 Why is this line floating here?

https://github.com/Kam227/site-unit2-project1-music-playlist-explorer-starter/blob/27da41a2decf815a5665cb4f0ea081267c1b28a5/music-playlist-creator/script.js#L115 Is this line necessary?

https://github.com/Kam227/site-unit2-project1-music-playlist-explorer-starter/blob/27da41a2decf815a5665cb4f0ea081267c1b28a5/music-playlist-creator/script.js#L140-L148 Few comments on this:

https://github.com/Kam227/site-unit2-project1-music-playlist-explorer-starter/blob/27da41a2decf815a5665cb4f0ea081267c1b28a5/music-playlist-creator/script.js#L215 For organization purposes, I'd recommend splitting this into its own .js file

I would also recommend making smaller commit that are more descriptively named so that we can review/revert changes more easily

ushanakg commented 5 months ago

Spencer covered all the things I noticed but also wanted to add that in general, we try not to commit unnecessary comments (like the ones telling you to fill in footer content). Looks good Kam!