Modified current-projects.js to remove OR logic from project filter#8538
Modified current-projects.js to remove OR logic from project filter#8538aadilahmed wants to merge 1 commit intohackforla:gh-pagesfrom
Conversation
|
Want to review this pull request? Take a look at this documentation for a step by step guide! From your project repository, check out a new branch and test the changes. |
dvernon5
left a comment
There was a problem hiding this comment.
Hello @aadilahmed, thank you for taking on this project.
What you did well:
- You successfully replaced the conditional statement on line 537
- You successfully wrapped the conditional statement on line 586
- In the filter toolbar, when you select the same category, the AND logic is applied successfully
- When you search categories in the search bar, the OR logic is properly applied
- After each operation, the project page updates with the correct selected project while staying functional
Issues Found: None, I found no issues with this implementation.
Congratulations on a fantastic job. I'll go ahead and approve this!
|
Review ETA: 4/20 10PM |
viet456
left a comment
There was a problem hiding this comment.
Hi @aadilahmed , you made all the necessary changes in this PR.
I did leave a comment about .map() vs .forEach() but it's a small detail of no issue.
Thanks for your contributions. Approved
| } | ||
| cardsToHideContainer.map(item => document.getElementById(`${item[1]}`).style.display = 'none'); | ||
| if (cardsToHideContainer.length > 0){ | ||
| cardsToHideContainer.map(item => document.getElementById(`${item[1]}`).style.display = 'none'); |
There was a problem hiding this comment.
Nit: Since the issue instructions used .map() here, this isn't on you, but consider .forEach() instead.
cardsToHideContainer.forEach(item => document.getElementById(`${item[1]}`).style.display = 'none');.map() is reserved for transformations that use the returned array. Here it's purely a side effect, which is what .forEach() is for.
It's non blocking, and you did follow the instructions well. Thanks for the contribution
Fixes #8353
What changes did you make?
Why did you make the changes (we will use this info to test)?
CodeQL Alerts
After the PR has been submitted and the resulting GitHub actions/checks have been completed, developers should check the PR for CodeQL alert annotations.
Check the PR's comments. If present on your PR, the CodeQL alert looks similar as shown
Please let us know that you have checked for CodeQL alerts. Please do not dismiss alerts.
Instructions for resolving CodeQL alerts
If CodeQL alert/annotations appear, refer to How to Resolve CodeQL alerts.
In general, CodeQL alerts should be resolved prior to PR reviews and merging
Screenshots of Proposed Changes To The Website (if any, please do not include screenshots of code changes)
Visuals before changes are applied
Visuals after changes are applied