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

Refactor activity.js and activity-works.js to Remove Redundant Code and Improve Code Quality #22

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ravjot07
Copy link
Contributor

Overview
This pull request refactors the activity.js and activity-works.js file to eliminate redundant code, enhance readability, and improve overall code quality. By organizing the code into a DrawingApp class and removing unnecessary repetitions, I made the codebase more maintainable and accessible for current and future contributor

Changes Made:-

  • Removed Redundant Code by Consolidating similar Functions
  • Wrapped related variables and functions within the DrawingApp class to encapsulate the this activities state and behaviour. Improved the modularity of the code.
  • Simplified the way event handlers are attached to objects, reducing complexity. And Ensured consistent use of this by leveraging closures and binding methods where appropriate.
  • Applied consistent code formatting for better readability.

@ravjot07
Copy link
Contributor Author

@chimosky As suggested by you i have opened new PR for refactoring can you review and test this PR......

@quozl
Copy link
Contributor

quozl commented Nov 24, 2024

Your changes would have been better done in more than one commit, separating formatting changes from refactoring changes. It would have made it easier to review.

@ravjot07
Copy link
Contributor Author

@quozl i have changes commit message to a better suitable one. For review you can just test all the features i have created a drawing app class to encapsulate all the working and removed duplicate code from activity-works.js. like most of the code was redundant there for some reason...

@quozl
Copy link
Contributor

quozl commented Nov 24, 2024

@ravjot07
Copy link
Contributor Author

https://github.com/sugarlabs/sugar-docs/blob/master/src/contributing.md#guide-for-reviewers is our guide for reviewers.

Yes sir, for sure 😀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants