From 0b4617ab7032bcf48b7be18f9ebaea2a427b72ae Mon Sep 17 00:00:00 2001 From: Ross Hill Date: Tue, 24 Sep 2024 20:05:03 -0400 Subject: [PATCH] Add issue templates, code of conduct, contribution guide, and privacy policy (#31) * Update issue templates * Add contributing.md, code of conduct, and privacy policy --- .github/ISSUE_TEMPLATE/bug_report.md | 38 ++ .github/ISSUE_TEMPLATE/feature_request.md | 20 + CODE_OF_CONDUCT.md | 39 ++ CONTRIBUTING.md | 169 ++++++++ README.md | 27 +- client/html/index.html | 2 + client/html/privacy-policy.html | 474 ++++++++++++++++++++++ client/static/sitemap.xml | 4 + client/webpack.config.js | 12 +- 9 files changed, 759 insertions(+), 26 deletions(-) create mode 100644 .github/ISSUE_TEMPLATE/bug_report.md create mode 100644 .github/ISSUE_TEMPLATE/feature_request.md create mode 100644 CODE_OF_CONDUCT.md create mode 100644 CONTRIBUTING.md create mode 100644 client/html/privacy-policy.html diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 00000000..dd84ea78 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -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. diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 00000000..bbcbbe7d --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -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. diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 00000000..df2b4d76 --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -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 [mandelbrot@rosshill.ca](mailto:mandelbrot@rosshill.ca). 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/). diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 00000000..675acfba --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,169 @@ + + +# 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 + + + +## 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 . + +## 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). diff --git a/README.md b/README.md index 77ff81f7..6b0e480e 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,7 @@ GitHub branch check runs Uptime Robot status Uptime Robot ratio (30 days) + MIT license

## Features @@ -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. @@ -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 | | ------------------------------------------------------------------------------------------------------------------ | ------------------------ | --------------------------------------------------------------------------- | | Ross Hill | **Ross Hill** | [rosslh](https://github.com/rosslh) | | Joseph Weissman | **Joseph Weissman** | [jweissman](https://github.com/jweissman) | diff --git a/client/html/index.html b/client/html/index.html index 8733b93b..775f993a 100644 --- a/client/html/index.html +++ b/client/html/index.html @@ -86,6 +86,8 @@

> · Technical details + · + Privacy diff --git a/client/html/privacy-policy.html b/client/html/privacy-policy.html new file mode 100644 index 00000000..b49d3223 --- /dev/null +++ b/client/html/privacy-policy.html @@ -0,0 +1,474 @@ + + + + + Privacy Policy + + + +

Privacy Policy

+

Last updated: September 24, 2024

+

+ This Privacy Policy describes Our policies and procedures on the + collection, use and disclosure of Your information when You use the + Service and tells You about Your privacy rights and how the law protects + You. +

+

+ We use Your Personal data to provide and improve the Service. By using the + Service, You agree to the collection and use of information in accordance + with this Privacy Policy. +

+

Interpretation and Definitions

+

Interpretation

+

+ The words of which the initial letter is capitalized have meanings defined + under the following conditions. The following definitions shall have the + same meaning regardless of whether they appear in singular or in plural. +

+

Definitions

+

For the purposes of this Privacy Policy:

+ +

Collecting and Using Your Personal Data

+

Types of Data Collected

+

Personal Data

+

+ While using Our Service, We may ask You to provide Us with certain + personally identifiable information that can be used to contact or + identify You. Personally identifiable information may include, but is not + limited to: +

+ +

Usage Data

+

Usage Data is collected automatically when using the Service.

+

+ Usage Data may include information such as Your Device's Internet Protocol + address (e.g. IP address), browser type, browser version, the pages of our + Service that You visit, the time and date of Your visit, the time spent on + those pages, unique device identifiers and other diagnostic data. +

+

+ When You access the Service by or through a mobile device, We may collect + certain information automatically, including, but not limited to, the type + of mobile device You use, Your mobile device unique ID, the IP address of + Your mobile device, Your mobile operating system, the type of mobile + Internet browser You use, unique device identifiers and other diagnostic + data. +

+

+ We may also collect information that Your browser sends whenever You visit + our Service or when You access the Service by or through a mobile device. +

+

Tracking Technologies and Cookies

+

+ We use Cookies and similar tracking technologies to track the activity on + Our Service and store certain information. Tracking technologies used are + beacons, tags, and scripts to collect and track information and to improve + and analyze Our Service. The technologies We use may include: +

+ +

+ Cookies can be "Persistent" or "Session" Cookies. + Persistent Cookies remain on Your personal computer or mobile device when + You go offline, while Session Cookies are deleted as soon as You close + Your web browser. +

+

+ We use both Session and Persistent Cookies for the purposes set out below: +

+ +

+ For more information about the cookies we use and your choices regarding + cookies, please visit our Cookies Policy or the Cookies section of our + Privacy Policy. +

+

Use of Your Personal Data

+

The Organization may use Personal Data for the following purposes:

+ +

We may share Your personal information in the following situations:

+ +

Retention of Your Personal Data

+

+ The Organization will retain Your Personal Data only for as long as is + necessary for the purposes set out in this Privacy Policy. We will retain + and use Your Personal Data to the extent necessary to comply with our + legal obligations (for example, if we are required to retain your data to + comply with applicable laws), resolve disputes, and enforce our legal + agreements and policies. +

+

+ The Organization will also retain Usage Data for internal analysis + purposes. Usage Data is generally retained for a shorter period of time, + except when this data is used to strengthen the security or to improve the + functionality of Our Service, or We are legally obligated to retain this + data for longer time periods. +

+

Transfer of Your Personal Data

+

+ Your information, including Personal Data, is processed at the + Organization's operating offices and in any other places where the parties + involved in the processing are located. It means that this information may + be transferred to ā€” and maintained on ā€” computers located outside of Your + state, province, country or other governmental jurisdiction where the data + protection laws may differ than those from Your jurisdiction. +

+

+ Your consent to this Privacy Policy followed by Your submission of such + information represents Your agreement to that transfer. +

+

+ The Organization will take all steps reasonably necessary to ensure that + Your data is treated securely and in accordance with this Privacy Policy + and no transfer of Your Personal Data will take place to an organization + or a country unless there are adequate controls in place including the + security of Your data and other personal information. +

+

Delete Your Personal Data

+

+ You have the right to delete or request that We assist in deleting the + Personal Data that We have collected about You. +

+

+ Our Service may give You the ability to delete certain information about + You from within the Service. +

+

+ You may update, amend, or delete Your information at any time by signing + in to Your Account, if you have one, and visiting the account settings + section that allows you to manage Your personal information. You may also + contact Us to request access to, correct, or delete any personal + information that You have provided to Us. +

+

+ Please note, however, that We may need to retain certain information when + we have a legal obligation or lawful basis to do so. +

+

Disclosure of Your Personal Data

+

Business Transactions

+

+ If the Organization is involved in a merger, acquisition or asset sale, + Your Personal Data may be transferred. We will provide notice before Your + Personal Data is transferred and becomes subject to a different Privacy + Policy. +

+

Law enforcement

+

+ Under certain circumstances, the Organization may be required to disclose + Your Personal Data if required to do so by law or in response to valid + requests by public authorities (e.g. a court or a government agency). +

+

Other legal requirements

+

+ The Organization may disclose Your Personal Data in the good faith belief + that such action is necessary to: +

+ +

Security of Your Personal Data

+

+ The security of Your Personal Data is important to Us, but remember that + no method of transmission over the Internet, or method of electronic + storage is 100% secure. While We strive to use commercially acceptable + means to protect Your Personal Data, We cannot guarantee its absolute + security. +

+

Children's Privacy

+

+ Our Service does not address anyone under the age of 13. We do not + knowingly collect personally identifiable information from anyone under + the age of 13. If You are a parent or guardian and You are aware that Your + child has provided Us with Personal Data, please contact Us. If We become + aware that We have collected Personal Data from anyone under the age of 13 + without verification of parental consent, We take steps to remove that + information from Our servers. +

+

+ If We need to rely on consent as a legal basis for processing Your + information and Your country requires consent from a parent, We may + require Your parent's consent before We collect and use that information. +

+

Links to Other Websites

+

+ Our Service may contain links to other websites that are not operated by + Us. If You click on a third party link, You will be directed to that third + party's site. We strongly advise You to review the Privacy Policy of every + site You visit. +

+

+ We have no control over and assume no responsibility for the content, + privacy policies or practices of any third party sites or services. +

+

Changes to this Privacy Policy

+

+ We may update Our Privacy Policy from time to time. We will notify You of + any changes by posting the new Privacy Policy on this page. +

+

+ We will let You know via email and/or a prominent notice on Our Service, + prior to the change becoming effective and update the "Last + updated" date at the top of this Privacy Policy. +

+

+ You are advised to review this Privacy Policy periodically for any + changes. Changes to this Privacy Policy are effective when they are posted + on this page. +

+

Contact Us

+

+ If you have any questions about this Privacy Policy, You can contact us: +

+ + + + diff --git a/client/static/sitemap.xml b/client/static/sitemap.xml index 902f201d..61e247ad 100644 --- a/client/static/sitemap.xml +++ b/client/static/sitemap.xml @@ -30,6 +30,10 @@ https://mandelbrot.site/why-mandelbrot-set-important 0.80 + + https://mandelbrot.site/privacy-policy + 0.60 + diff --git a/client/webpack.config.js b/client/webpack.config.js index 16dae133..accc9814 100644 --- a/client/webpack.config.js +++ b/client/webpack.config.js @@ -11,6 +11,14 @@ const camelCase = require("lodash/camelCase"); const fromPairs = require("lodash/fromPairs"); const Dotenv = require("dotenv-webpack"); +if (!fs.existsSync("./dist")) { + fs.mkdirSync("./dist"); +} + +const privacyPolicySrc = path.join(__dirname, "html", "privacy-policy.html"); +const privacyPolicyDest = path.join(__dirname, "dist", "privacy-policy.html"); +fs.copyFileSync(privacyPolicySrc, privacyPolicyDest); + const blogDir = "./blog"; for (const file of fs.readdirSync(blogDir)) { if (file.endsWith(".md")) { @@ -45,10 +53,6 @@ for (const file of fs.readdirSync(blogDir)) { ...linkClasses, }); - if (!fs.existsSync("./dist")) { - fs.mkdirSync("./dist"); - } - fs.writeFileSync(path.join("./dist", htmlFile), result); } }