Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code Optimization and Enhancements for course.js #1081

Closed
smog-root opened this issue Oct 28, 2024 · 4 comments
Closed

Code Optimization and Enhancements for course.js #1081

smog-root opened this issue Oct 28, 2024 · 4 comments
Assignees
Labels
gssoc-ext These issue/pull request will be considered for GSSOC'24 Extd hacktoberfest-accepted Hacktoberfest level1 Beginner level issues/pull requests

Comments

@smog-root
Copy link
Contributor

smog-root commented Oct 28, 2024

The course.js file handles the rendering, filtering, and animation of course cards. While the current implementation is functional, there are several opportunities for optimization and enhancement to improve readability, maintainability, and performance.

Kindly add gssoc-ext with level and hacktoberfest-accepted labels! @vivekvardhan2810

Suggested Improvements:

1. Event Delegation for Card Creation:

  • Implement event delegation for card interactivity to reduce the number of event listeners attached to individual cards.

2. Modularization of Components:

  • Break down functions into smaller modules for better readability and reusability:
  • Group renderCourses(), createCourseCard(), and filterCourses() into a courseRenderer module.
  • Separate animation-related functions into an animation module.

3. Conditional Display of Elements:

  • Simplify the logic for toggling the visibility of the load more button using classList.toggle("hide-btn", condition).

4. Enhanced Filtering Logic:

  • Improve the filterCourses() function to support filtering based on multiple skills tags if skills contains multiple tags.

5. DOM Content Loaded Handling:

  • Consolidate the setup logic within a single DOMContentLoaded event listener to improve clarity and efficiency.
@vivekvardhan2810
Copy link
Member

@smog-root assigning this issue to you.

Make sure to complete this.

this will be the last issue i am gonna assign you.

@vivekvardhan2810 vivekvardhan2810 added level1 Beginner level issues/pull requests gssoc-ext These issue/pull request will be considered for GSSOC'24 Extd hacktoberfest-accepted Hacktoberfest labels Oct 28, 2024
@vivekvardhan2810
Copy link
Member

@smog-root from today night this project and I am are going to be inactive.

Reason being due to some of my works.

so make sure to complete this before.

this is the last issue i am assigning you.

After that please contribute to other projects.

I hope you understand.

@smog-root
Copy link
Contributor Author

smog-root commented Oct 28, 2024

@vivekvardhan2810 can you make it level 2. because i'm doing multiple stuff there!

@vivekvardhan2810
Copy link
Member

@smog-root I mean these are very small minor issues...that can be fixed within minutes.

And one more thing.

Though it seems these are multiple but all of them are just issues that can be fixed easily ...so I am sorry that I can't add it to level 2.

i hope you understand.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
gssoc-ext These issue/pull request will be considered for GSSOC'24 Extd hacktoberfest-accepted Hacktoberfest level1 Beginner level issues/pull requests
Projects
None yet
Development

No branches or pull requests

2 participants