MichaelPachec0 / nodejs-project-night

Project night for May 27 2022
MIT License
5 stars 12 forks source link

Fixing issue #27 Rendering pokemon card to DOM #41

Closed Mire-web closed 2 years ago

Mire-web commented 2 years ago

Added the function to reveal pokemon on click Added alt attribute to image tags for Accessibility

JoeDravarol commented 2 years ago

I don't think this should contain the alt attribute part, it should be opened to its own issue.

Also make sure you reference the issue you are fixing in either the title or description. (In this case this is fixing #27),

Dex-theDev commented 2 years ago

Also in the js file. i see that you created an array of the back of the cards with [cardBack], but you're iterating through cardFront? Forgive me if that's on purpose, can you explain your code just a tiny bit?

Mire-web commented 2 years ago

I don't think this should contain the alt attribute part, it should be opened to its own issue.

Also make sure you reference the issue you are fixing in either the title or description. (In this case this is fixing #27),

forgot to add that, you are the accessibility should have it's issue correction taken. Thanks

Mire-web commented 2 years ago

Also in the js file. i see that you created an array of the back of the cards with [cardBack], but you're iterating through cardFront? Forgive me if that's on purpose, can you explain your code just a tiny bit?

className/querySelectorAll returns a node list, to access individual elements, it's mapped over, that way the styling or whatever event is effected only on the affected element. So i iterate cardBack to get each card-back to addevent listener to each and then iterate over the cardFront so the change only affects corresponding cardFront. else it would flip all cards if statement is true.

Dex-theDev commented 2 years ago

Also in the js file. i see that you created an array of the back of the cards with [cardBack], but you're iterating through cardFront? Forgive me if that's on purpose, can you explain your code just a tiny bit?

className/querySelectorAll returns a node list, to access individual elements, it's mapped over, that way the styling or whatever event is effected only on the affected element. So i iterate cardBack to get each card-back to addevent listener to each and then iterate over the cardFront so the change only affects corresponding cardFront. else it would flip all cards if statement is true.

I would do a forEach for the card array to add the eventlistener

MichaelPachec0 commented 2 years ago

If we do commit this, make sure we squash these commits instead of committing as is, deleting files like this really messes up git history of files.

Didn't realize the files were in the root folder, disregard my message then.