Syknapse / Contribute-To-This-Project

This project is waiting for your contribution. If you have never contributed code on GitHub before, this is the project to get you started.
https://syknapse.github.io/Contribute-To-This-Project/
MIT License
2.24k stars 3.05k forks source link

optimize code and make it better. #3898

Open sarwanazhar opened 4 weeks ago

sarwanazhar commented 4 weeks ago

Debounced Scroll Event: The scrollFunction is now debounced to prevent excessive triggering while scrolling.

Asynchronous Card Fetching: The card fetching is now asynchronous with async/await, which improves readability and error handling.

Modular Functions: The code is broken down into smaller functions (fetchAndDisplayCards, toggleNightMode, applyHighlightToSearchResults, etc.) for better maintainability.

Improved Night Mode Toggling: The night mode now toggles more efficiently with minimal DOM manipulation.

Search Optimization: The search functionality has been optimized for readability and performance with a clear separation of concerns.

CandidDeer commented 4 weeks ago

@Syknapse Please review and let me know if you'd like to implement these proposed changes. Thx.

Syknapse commented 3 weeks ago

@Syknapse Please review and let me know if you'd like to implement these proposed changes. Thx.

Thanks for the mention, this looks like a lot of very useful improvements to the JD file which is very welcome. However since it impacts the whole file we need to test it extensively and make sure all functionalities are working correctly, and all the changes improve the code in some way.

I invite all the maintainers to check out the branch and test it out in local as much as possible and also check the code and add reviews if necessary. And I will do the same as soon as I can and if everything looks good we can approve it.