Skip to content

Latest commit

 

History

History
213 lines (147 loc) · 7.63 KB

Contributing.md

File metadata and controls

213 lines (147 loc) · 7.63 KB

🎨 Contributing to Canvas Editor

Thank you for your interest in contributing to Canvas Editor! We’re excited to see what creative ideas you bring. Follow the simple guidelines below to get started.


🚀 Getting Started

  1. ** 🍴 Fork the Repository **
    Click the "Fork" button at the top-right corner to create your own copy of the repo.

  2. ** 📥 Clone Your Fork **
    Clone your forked repository to your local machine:

   git clone https://github.com/<your-github-username>/Canvas-Editor
  1. ** 📂 Change the working directory: **
   cd Canvas-Editor
  1. 🔗 Add a reference to the original repository.
   git remote add upstream https://github.com/vishanurag/Canvas-Editor.git
  1. 🔍 Check the remotes for this repository.
   git remote -v
  1. ⬇️ Always take a pull from the upstream repository to your main branch to keep it up-to-date with the main project (updated repository).
   git pull upstream main
  1. 🌿 Create a new branch.
   git checkout -b <your-branch-name>

📂 Project Structure

Canvas-Editor/
│
├── src/                        # Source code files
│   ├── components/             # Reusable UI components (e.g., buttons, toolbars)
│   ├── tools/                  # Drawing tools and utilities
│   ├── styles/                 # CSS and styling files
│   ├── assets/                 # Images, icons, and other media assets
│   ├── App.js                  # Main React component
│   └── index.js                # Entry point for the application
│
├── public/                     # Public files (HTML, favicon, etc.)
│   ├── index.html              # Main HTML file
│   └── manifest.json           # Web app manifest file
│
├── tests/                      # Unit and integration tests
│   └── toolTests/              # Test cases for individual drawing tools
│
├── README.md                   # Project documentation
├── CONTRIBUTING.md             # Contribution guidelines
├── package.json                # Node.js dependencies and scripts
├── .gitignore                  # Git ignore file
└── LICENSE                     # Project license

🖌️ Making Changes

  1. Code Changes
    Make your modifications, ensuring they align with the project’s coding standards. Add exciting features or squash bugs!

  2. Commit Your Changes
    Write meaningful commit messages:

   git commit -m "Add: New drawing tool feature"
  1. Push Your Changes
    Push your changes to your forked repository:
   git push origin feature/your-feature-name
  1. ** Create a pull request to the main branch. **
  • Go to your forked repository on GitHub and click on Compare & pull request.

🎉 Voila! You have made a PR to the Canvas-Editor project. Sit back patiently and relax while the project maintainers review your PR.


🖥️ Alternatively contribute using GitHub Desktop

  1. Open GitHub Desktop: Launch GitHub Desktop and log in to your GitHub account if you haven't already.

  2. Clone the Repository:

    • If you haven't cloned the repository yet, you can do so by clicking on the "File" menu and selecting "Clone Repository."
    • Choose the repository from the list of repositories on GitHub and clone it to your local machine.
  3. Switch to the Correct Branch:

    • Ensure you are on the branch that you want to submit a pull request for.
    • If you need to switch branches, you can do so by clicking on the "Current Branch" dropdown menu and selecting the desired branch.
  4. Make Changes: Make your changes to the code or files in the repository using your preferred code editor.

  5. Commit Changes:

    • In GitHub Desktop, you'll see a list of the files you've changed. Check the box next to each file you want to include in the commit.
    • Enter a summary and description for your changes in the "Summary" and "Description" fields, respectively. Click the "Commit to " button to commit your changes to the local branch.
  6. Push Changes to GitHub: After committing your changes, click the "Push origin" button in the top right corner of GitHub Desktop to push your changes to your forked repository on GitHub.

  7. Create a Pull Request:

    • Go to the GitHub website and navigate to your fork of the repository.
    • You should see a button to "Compare & pull request" between your fork and the original repository. Click on it.
  8. Review and Submit:

    • On the pull request page, review your changes and add any additional information, such as a title and description, that you want to include with your pull request.
    • Once you're satisfied, click the "Create pull request" button to submit your pull request.
  9. Wait for Review: Your pull request will now be available for review by the project maintainers. They may provide feedback or ask for changes before merging your pull request into the main branch of the repository.


🛠️ Creating a Pull Request

  1. Once your changes are pushed, create a pull request (PR) on the original repository.
  2. Provide a detailed description of your changes and link any relevant issues.
  3. Wait for reviews and engage with feedback!

📌 Issue Report Process

  1. Go to the project's issues.
  2. Give proper description for the issues.
  3. Don't spam to get the assignment of the issue 😀.
  4. Wait for till someone is looking into it !.
  5. Start working on issue only after you got assigned that issue 🚀.

💬 Need Help

Admin :- Anurag

Email: [email protected]

Github Issues


🧑‍💻 Good Coding Practices

  1. Follow the Project's Code Style

    • Maintain consistency with the existing code style (indentation, spacing, comments).
    • Use meaningful and descriptive names for variables, functions, and classes.
    • Keep functions short and focused on a single task.
    • Avoid hardcoding values; instead, use constants or configuration files when possible.
  2. Write Clear and Concise Comments

    • Use comments to explain why you did something, not just what you did.
    • Avoid unnecessary comments that state the obvious.
    • Document complex logic and functions with brief explanations to help others understand your thought -process.
  3. Keep Code DRY (Don't Repeat Yourself)

    • Avoid duplicating code. Reuse functions, methods, and components whenever possible.
    • If you find yourself copying and pasting code, consider creating a new function or component.
  4. Write Tests

    • Write unit tests for your functions and components.
    • Ensure your tests cover both expected outcomes and edge cases.
    • Run tests locally before making a pull request to make sure your changes don’t introduce new bugs.
  5. Code Reviews and Feedback

    • Be open to receiving constructive feedback from other contributors.
    • Conduct code reviews for others and provide meaningful suggestions to improve the code.
    • Always refactor your code based on feedback to meet the project's standards.

🎉 Additional Notes

  • Make sure to sync your fork with the latest changes from the original repo before pushing new features.
  • Respect coding conventions and keep code clean.
  • Animated elements or creative contributions are highly encouraged!

Thank you for contributing💗

We truly appreciate your time and effort to help improve our project. Feel free to reach out if you have any questions or need guidance. Happy coding! 🚀