Skip to content

Latest commit

 

History

History
321 lines (218 loc) · 11.2 KB

CONTRIBUTING.md

File metadata and controls

321 lines (218 loc) · 11.2 KB

Contributing to GlassyUI 🛡️

Thank you for considering contributing to the GlassyUI project! We welcome contributions from the community and are grateful for your help in making this project better.


Code of Conduct 📃

Please read and adhere to our Code of Conduct. By participating, you are expected to uphold this code. Please report unacceptable behavior to the project maintainers.


Star our Repository ⭐

Stars Forks Issues PRs Open PRs Closed


Table of Contents

  1. Code of Conduct
  2. Need Help With Basics
  3. Project Structure
  4. How to Contribute
  5. Setting Up Your Development Environment
  6. Style Guides
  7. Good Coding Practices
  8. Help And Support

Need Help With The Basics? 🤔

If you're new to Git and GitHub, no worries! Here are some useful resources:


Project Structure 📂

GLASSYUI-COMPONENTS/
├── .github/                  # GitHub-related configurations such as workflows, issue templates, etc
│
├── .husky/                   # Some pre-committed files
│
├── Images/                   # Contains images related to the project
│
├── public/                   # Some core components of the project
│
├── src/                      # All the typescripts and react related files
│
├── .dockerignore
│
├── .eslintignore
│
├── .gitignore
│
├── .prettierignore
│
├── .prettierrc
│
├── CODE_OF_CONDUCT.md        # Some rules for contributors
├──
├── CONTRIBUTING.md           # Instructions for the contributors
├──
├── docker-compose.yml
├──
├── Dockerfile
├──
├── eslint.config.mjs
├──
├── git
├──
├── package-lock.json
├──
├── package.json
├──
├── postcss.config.js
├──
├── README.md                  # Some instructions related to the contributions
├──
├── tailwind.config.js
├──
├── tsconfig.json

How to Contribute

Creating a New Issue ⛏️

When creating a new issue, please provide the following information:

  • Title: A brief description of the issue.
  • Description: A detailed description of the issue or enhancement.
  • Steps to Reproduce: For bugs, provide steps to reproduce the issue.
  • Screenshots: Include any relevant screenshots.

First Pull Request ✨

  1. Star this repository Click on the top right corner marked as Stars at last.

  2. Fork this repository Click on the top right corner marked as Fork at second last.

  3. Clone the forked repository

git clone https://github.com/<your-github-username>/GlassyUI-Components.git
  1. Navigate to the project directory
cd GlassyUI-Components
  1. Create a new branch
git checkout -b <your_branch_name>
  1. To make changes
git add .
  1. Now to commit
git commit -m "add comment according to your changes or addition of features inside this"
  1. Push your local commits to the remote repository
git push -u origin <your_branch_name>
  1. Create a Pull Request

  2. Congratulations! 🎉 you've made your contribution

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 project repository yet, you can do so by clicking on the "File" menu and selecting "Clone Repository."
  • Choose the project repository from the list of repositories on GitHub and clone it to your local machine.
  1. 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.
  1. Make Changes:
  • Make your changes to the code or files in the repository using your preferred code editor.
  1. 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.
  1. 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.
  1. Create a Pull Request:
  • Go to the GitHub website and navigate to your fork of the project repository.
  • You should see a button to "Compare & pull request" between your fork and the original repository. Click on it.
  1. 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.
  1. 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 project repository.

Submitting a Pull Request 💾

  1. Submit a Pull Request: Go to the repository on GitHub and click the "New pull request" button.
  2. Provide a Description: Include a detailed description of your changes and link to the issue being addressed.
  3. Wait for Review: One of the maintainers will review your pull request and provide feedback.

Reporting Bugs 🐞

If you find a bug, please report it by creating a new issue. Provide as much information as possible, including steps to reproduce the bug and any relevant screenshots.

Suggesting Enhancements 🌿

We welcome suggestions for new features and enhancements. Please open an issue to discuss your idea before implementing it to ensure it aligns with the project's goals.

Contributing Code 🌸

  1. Look through the open issues for tasks labeled with "good first issue" or "enhancement."
  2. Comment on the issue to let others know you are working on it.
  3. Fork the repository and create a new branch for your work.
  4. Implement your changes following the project's coding standards and guidelines.
  5. Submit a pull request for review.

Setting Up Your Development Environment 🔧

  1. Fork the Repository: Click the "Fork" button at the top right of the repository page.

  2. Clone Your Fork:

    git clone https://github.com/your-username/GlassyUI-Components.git
    cd GlassyUI-Components
  3. Install Dependencies:

    npm install
  4. Start the Development Server:

    npm start

Style Guides ✍️

Git Commit Messages

  • Use the present tense ("Add feature" not "Added feature").
  • Use the imperative mood ("Move cursor to..." not "Moves cursor to...").
  • Limit the first line to 72 characters or less.
  • Reference issues and pull requests liberally.

JavaScript Style Guide

CSS/SCSS Style Guide

  • Use SCSS for styling.
  • Follow the BEM methodology for class naming.
  • Keep styles modular and reusable.

React Components

  • Use functional components with hooks where possible.
  • Ensure components are modular and reusable.
  • Write unit tests for all components using a testing library such as Jest.

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.

For Help And Support 💬


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! 🚀