Skip to content

Commit

Permalink
Add issue templates, code of conduct, contribution guide, and privacy…
Browse files Browse the repository at this point in the history
… policy (#31)

* Update issue templates

* Add contributing.md, code of conduct, and privacy policy
  • Loading branch information
rosslh committed Sep 25, 2024
1 parent 9442d87 commit 6422459
Show file tree
Hide file tree
Showing 10 changed files with 761 additions and 27 deletions.
3 changes: 2 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
snapshots/ linguist-generated
mandelbrot/src/snapshots/** linguist-generated
client/html/privacy-policy.html linguist-vendored
38 changes: 38 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

**Smartphone (please complete the following information):**
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]

**Additional context**
Add any other context about the problem here.
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
39 changes: 39 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Code of Conduct

All participants of Mandelbrot.site are expected to abide by our Code of Conduct, both online and during in-person events that are hosted and/or associated with Mandelbrot.site.

## The Pledge

In the interest of fostering an open and welcoming environment, we pledge to make participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.

## The Standards

Examples of behaviour that contributes to creating a positive environment include:

- Using welcoming and inclusive language
- Being respectful of differing viewpoints and experiences
- Gracefully accepting constructive criticism
- Referring to people by their preferred pronouns and using gender-neutral pronouns when uncertain

Examples of unacceptable behaviour by participants include:

- Trolling, insulting/derogatory comments, public or private harassment
- Publishing others' private information, such as a physical or electronic address, without explicit permission
- Not being respectful to reasonable communication boundaries, such as 'leave me alone,' 'go away,' or 'I’m not discussing this with you.'
- The usage of sexualized language or imagery and unwelcome sexual attention or advances
- Swearing, usage of strong or disturbing language
- Demonstrating the graphics or any other content you know may be considered disturbing
- Starting and/or participating in arguments related to politics
- Assuming or promoting any kind of inequality including but not limited to: age, body size, disability, ethnicity, gender identity and expression, nationality and race, personal appearance, religion, or sexual identity and orientation
- Drug promotion of any kind
- Other conduct which you know could reasonably be considered inappropriate in a professional setting.

## Enforcement

Violations of the Code of Conduct may be reported by sending an email to [[email protected]](mailto:[email protected]). All reports will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. Further details of specific enforcement policies may be posted separately.

We hold the right and responsibility to remove comments or other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any members for other behaviors that they deem inappropriate, threatening, offensive, or harmful.

## Attribution

This Code of Conduct is adapted from [dev.to](https://dev.to/).
169 changes: 169 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,169 @@
<!-- omit in toc -->

# Contributing to Mandelbrot.site

Thank you for taking the time to contribute! ❤️

All types of contributions are encouraged and valued. Please refer to the [Table of Contents](#table-of-contents) for various ways you can help and details on how the project handles them. Reading the relevant section before contributing will make it easier for the maintainers and smooth out the experience for everyone involved. The community looks forward to your contributions. 🎉

> [!TIP]
> If you like the project but don't have time to contribute, that's totally fine! There are other ways to show your support:
>
> - Star the project
> - Tweet about it
> - Mention this project in your project's readme
> - Share it with your friends and colleagues
<!-- omit in toc -->

## Table of Contents

- [Contributing to Mandelbrot.site](#contributing-to-mandelbrotsite)
- [Table of Contents](#table-of-contents)
- [Code of Conduct](#code-of-conduct)
- [I Have a Question](#i-have-a-question)
- [I Want To Contribute](#i-want-to-contribute)
- [Reporting Bugs](#reporting-bugs)
- [Before Submitting a Bug Report](#before-submitting-a-bug-report)
- [How Do I Submit a Good Bug Report?](#how-do-i-submit-a-good-bug-report)
- [Suggesting Enhancements](#suggesting-enhancements)
- [Before Submitting an Enhancement](#before-submitting-an-enhancement)
- [How Do I Submit a Good Enhancement Suggestion?](#how-do-i-submit-a-good-enhancement-suggestion)
- [Your First Code Contribution](#your-first-code-contribution)
- [Commands](#commands)
- [Project Structure](#project-structure)
- [Opening a Pull Request](#opening-a-pull-request)

## Code of Conduct

This project and everyone participating in it are governed by the [Mandelbrot.site Code of Conduct](https://github.com/rosslh/Mandelbrot.site/blob/master/CODE_OF_CONDUCT.md). By participating, you are expected to uphold this code. Please report unacceptable behavior to <[email protected]>.

## I Have a Question

Before asking a question, please search for existing [issues](https://github.com/rosslh/Mandelbrot.site/issues) that might help you. If you find a relevant issue but still need clarification, you can comment there. It's also advisable to search the internet first.

If you still have a question:

- Open a new [issue](https://github.com/rosslh/Mandelbrot.site/issues/new).
- Provide as much context as possible.
- Include project and platform versions (Node.js, npm, etc.) as relevant.

We will address your issue as soon as possible.

## I Want To Contribute

### Reporting Bugs

#### Before Submitting a Bug Report

A good bug report shouldn't leave others needing more information. Please investigate carefully, collect details, and describe the issue thoroughly. Before submitting, please:

- Ensure you're using the latest version.
- Determine if your issue is indeed a bug and not a misconfiguration or environment issue. If you need support, check [this section](#i-have-a-question).
- Check the [bug tracker](https://github.com/rosslh/Mandelbrot.site/issues?q=label%3Abug) to see if the issue has already been reported.
- Search the internet (including Stack Overflow) to see if others have encountered the issue.
- Collect relevant information:
- Stack trace or error messages
- Operating system, platform, and version (e.g., Windows 10 x64)
- Versions of Node.js, npm, and other relevant software
- Steps to reproduce the issue reliably
- Any relevant input and output

#### How Do I Submit a Good Bug Report?

We use GitHub issues to track bugs and errors. If you encounter an issue:

- Open a new [issue](https://github.com/rosslh/Mandelbrot.site/issues/new).
- Describe the expected behavior and the actual behavior.
- Provide as much context as possible, including steps to reproduce the issue.
- Include the information you collected above.

Once filed:

- The team will label the issue accordingly.
- A team member will try to reproduce the issue. If reproduction steps are missing or unclear, we may ask for more details.
- If the issue is confirmed, it will be labeled appropriately and left to be [implemented](#your-first-code-contribution).

### Suggesting Enhancements

This section guides you through submitting an enhancement suggestion for Mandelbrot.site, **including completely new features and minor improvements to existing functionality**.

#### Before Submitting an Enhancement

- Ensure you're using the latest version.
- Search the [issues](https://github.com/rosslh/Mandelbrot.site/issues) to see if the enhancement has already been suggested. If so, comment on the existing issue.
- Consider whether your idea fits within the scope of the project. Make a strong case for your suggestion.

#### How Do I Submit a Good Enhancement Suggestion?

Enhancement suggestions are tracked as [GitHub issues](https://github.com/rosslh/Mandelbrot.site/issues).

- Use a **clear and descriptive title**.
- Provide a **detailed description** of the enhancement.
- **Describe the current behavior** and **explain the desired behavior**.
- Include **screenshots or GIFs** if helpful.
- **Explain why this enhancement would be useful** to most users.

### Your First Code Contribution

> [!WARNING]
> By contributing to this project, you agree that you have authored 100% of the content, have the necessary rights to the content, and that the content you contribute may be provided under the project license.
This project requires [Node.js](https://nodejs.org/) to be installed on your system. Check the [`.nvmrc`](client/.nvmrc) file for the recommended Node.js version. We recommend using a modern code editor like Visual Studio Code, IntelliJ IDEA, or Neovim.

#### Commands

Run all commands from within the `client` directory.

- **Install dependencies**: `npm install`
- **Start development server**: `npm run dev`
- **Build the project**: `npm run build`
- **Run code quality checks**:
- Type errors: `npm run typecheck`
- Linting: `npm run lint`
- Formatting: `npm run format`
- Rust tests: `npm run test`
- **Preview production build**: `npm run serve`
- **Clean caches and build artifacts**: `npm run clean`

#### Project Structure

- **Mandelbrot set implementation**: [`mandelbrot/src/lib.rs`](mandelbrot/src/lib.rs)
- **Rust unit tests**: [`mandelbrot/src/lib_test.rs`](mandelbrot/src/lib_test.rs)
- **TypeScript entry point**: [`client/js/index.ts`](client/js/index.ts)

#### Opening a Pull Request

Once you've made your changes:

1. **Fork the repository** on GitHub.
2. **Clone your fork** to your local machine:

```bash
git clone https://github.com/your-username/Mandelbrot.site.git
```

3. **Create a new branch** for your changes:

```bash
git checkout -b my-feature
```

4. **Make your changes** and **commit** them with clear commit messages:

```bash
git add .
git commit -m "Add feature XYZ"
```

5. **Push your changes** to your fork:

```bash
git push origin my-feature
```

6. **Open a pull request** from your branch to the main repository's `main` branch.
7. In the pull request, **provide a clear description** of your changes and any relevant context.
8. A maintainer will review your PR and may request changes or provide feedback.
For detailed guidance, see [Creating a Pull Request](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request).
27 changes: 5 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
<img src="https://img.shields.io/github/check-runs/rosslh/mandelbrot.site/main?style=flat&label=Checks" alt="GitHub branch check runs">
<img src="https://img.shields.io/uptimerobot/status/m792388109-4c544ded2b0e440130ddd401?up_message=online&style=flat&label=Status" alt="Uptime Robot status">
<img src="https://img.shields.io/uptimerobot/ratio/m792388109-4c544ded2b0e440130ddd401?style=flat&label=Uptime%20(1mo)" alt="Uptime Robot ratio (30 days)">
<img src="https://img.shields.io/badge/License-MIT-brightgreen?style=flat" alt="MIT license">
</p>

## Features
Expand All @@ -23,7 +24,7 @@ Mandelbrot.site offers a variety of features to enhance your experience:
- **Zoom in** by scrolling or selecting a region.
- Adjust the **detail level** by modifying the iteration count or resolution.
- Download **high-resolution images** of your current view.
- Generate URLs to **share** your favorite views.
- Generate URLs to **share** your favorite Mandelbrot set locations.
- Customize your experience with different **color palettes**.
- Explore **multibrot sets** by changing the exponent parameter.
- View and update **viewport coordinates** on the complex plane.
Expand All @@ -46,33 +47,15 @@ This robust architecture ensures that Mandelbrot.site provides a seamless and re

## Development

This project requires [Node.js](https://nodejs.org/) to be installed on your system. Check the [`.nvmrc`](client/.nvmrc) file for the recommended Node.js version.
This project requires [Node.js](https://nodejs.org/) to be installed on your system. Check the [`client/.nvmrc`](client/.nvmrc) file for the recommended Node.js version. Development scripts are available in [`client/package.json`](client/package.json).

### Commands

To set up and run the project on your local environment, navigate to the `client` directory and use the following commands.

- **Install dependencies**: `npm install`
- **Build the project**: `npm run build`
- **Start development server**: `npm run dev`
- **Preview production build**: `npm run serve`
- **Check for type errors**: `npm run typecheck`
- **Identify code issues**: `npm run lint`
- **Format the code**: `npm run format`
- **Run Rust tests**: `npm run test`
- **Cleanup**: `npm run clean` - removes caches and build artifacts

### Project Structure

- **Mandelbrot set implementation**: [`mandelbrot/src/lib.rs`](mandelbrot/src/lib.rs)
- **Rust unit tests**: [`mandelbrot/src/lib_test.rs`](mandelbrot/src/lib_test.rs)
- **TypeScript entry point**: [`client/js/index.ts`](client/js/index.ts)
A complete guide can be found in [CONTRIBUTING.md](CONTRIBUTING.md#your-first-code-contribution).

## Contributors

Many thanks to the following contributors who have helped shape this project:

| Avatar | Name | GitHub Profile |
| | Name | GitHub Profile |
| ------------------------------------------------------------------------------------------------------------------ | ------------------------ | --------------------------------------------------------------------------- |
| <img src="https://avatars.githubusercontent.com/u/8635605?v=4" width="60" height="60" alt="Ross Hill"> | **Ross Hill** | [rosslh](https://github.com/rosslh) |
| <img src="https://avatars.githubusercontent.com/u/122646?v=4" width="60" height="60" alt="Joseph Weissman"> | **Joseph Weissman** | [jweissman](https://github.com/jweissman) |
Expand Down
2 changes: 2 additions & 0 deletions client/html/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@ <h1 class="nav-heading">
>
&middot;
<a href="/how-mandelbrot-site-was-built">Technical details</a>
&middot;
<a href="/privacy-policy">Privacy</a>
</div>
</div>
<div id="navSpacer"></div>
Expand Down
Loading

0 comments on commit 6422459

Please sign in to comment.