Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
79 changes: 79 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
# Contributor Covenant Code of Conduct

## Our Pledge

We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, caste, color, religion, or sexual identity and orientation.

We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.

## Our Standards

Examples of behavior that contributes to a positive environment for our community include:

- Demonstrating empathy and kindness toward other people
- Being respectful of differing opinions, viewpoints, and experiences
- Giving and gracefully accepting constructive feedback
- Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
- Focusing on what is best not just for us as individuals, but for the overall community

Examples of unacceptable behavior include:

- The use of sexualized language or imagery, and sexual attention or advances of any kind
- Trolling, insulting or derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or email address, without their explicit permission
- Other conduct which could reasonably be considered inappropriate in a professional setting

## Enforcement Responsibilities

Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.

Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.

## Scope

This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official email address, posting via an official social media account, or acting as an appointed representative at an online or offline event.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at [contact@deityhub.com](mailto:contact@deityhub.com). All complaints will be reviewed and investigated promptly and fairly.

All community leaders are obligated to respect the privacy and security of the reporter of any incident.

## Enforcement Guidelines

Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:

### 1. Correction

**Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.

**Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.

### 2. Warning

**Community Impact**: A violation through a single incident or series of actions.

**Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.

### 3. Temporary Ban

**Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.

**Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.

### 4. Permanent Ban

**Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.

**Consequence**: A permanent ban from any sort of public interaction within the community.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.1, available at <https://www.contributor-covenant.org/version/2/1/code_of_conduct.html>.

Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity).

For answers to common questions about this code of conduct, see the FAQ at <https://www.contributor-covenant.org/faq>. Translations are available at <https://www.contributor-covenant.org/translations>.

[homepage]: https://www.contributor-covenant.org
77 changes: 77 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
# Contributing to Lienzo

Thanks for helping. Bug reports, ideas, documentation fixes and code are all welcome. By taking part you agree to follow the [Code of Conduct](CODE_OF_CONDUCT.md). For a security problem, please follow [SECURITY.md](SECURITY.md) instead of opening an issue.

## Ways to help

- **Report a bug or suggest something:** open a [GitHub issue](https://github.com/Deityhub/lienzo/issues). For a bug, say what you did, what you expected, what happened, and your browser. A screenshot or a `.lienzo.json` file that shows it helps.
- **Ask a question or share an idea:** use [GitHub Discussions](https://github.com/Deityhub/lienzo/discussions).
- **Send a change:** see below. For anything bigger than a small fix, please open an issue first so we can agree on the approach before you spend time on it.

## Set up

You need Node.js 22 (see `.nvmrc`) and Yarn 4 (`corepack enable` picks the pinned version).

```bash
git clone https://github.com/<your-username>/lienzo.git
cd lienzo
yarn install
yarn dev # http://localhost:5173
```

## Make a change

1. Fork the repository and create a branch from `develop`, for example `feat/text-alignment` or `fix/resize-offset`.
2. Make the change, and add or update tests for it.
3. Run the same checks CI runs:

```bash
yarn lint # Prettier and ESLint
yarn check # types
yarn test:unit:run # unit and browser-component tests
yarn test:e2e # builds the app and runs the Playwright tests (Chromium)
```

`yarn format` fixes formatting. The first time, run `yarn playwright install chromium`.

4. Open a pull request into `develop` and fill in the template.

### Pull request titles and commits

Pull requests are squash-merged, and the PR title becomes the commit message, so it must follow [Conventional Commits](https://www.conventionalcommits.org/) (CI checks this): `feat: add text alignment`, `fix: resize handle offset`, `docs: explain backups`. `feat`, `fix`, `perf`, `refactor` and `docs` appear in the changelog; `chore`, `ci`, `test` and similar do not.

### Code style

- TypeScript and Svelte 5 with runes (`$state`, `$derived`, `$effect`). State shared between components lives in `.svelte.ts` files.
- Keep pure logic (geometry, sorting, file formats) in `src/lib/utils` as plain functions with unit tests, apart from the components.
- Colours, spacing and radii come from the theme tokens in `src/app.css`, so both the light and the dark theme work. Please check a change in both.
- Interfaces must work with the keyboard and a screen reader: real buttons, labels for icon-only controls, visible focus, and touch targets of at least 44px on phones.

### Tests

- **Unit tests** (`*.spec.ts`) run in Node. Tests that need a browser (`*.browser.spec.ts`) run in Chromium.
- **End-to-end tests** (`e2e/`) run against a production build on port 4173. To keep them reliable on any machine:
- wait for hydration (`waitForLoadState('networkidle')`) before the first click;
- assert on the saved data (read from IndexedDB, in page units) rather than on screen pixels;
- use `dragTo` for drags, and `hasTouch: true` for tap tests.

## Documentation and generated files

- Update the README and other docs when behaviour changes.
- If you add or remove a runtime dependency or a font, run `yarn notices` to refresh [THIRD_PARTY_NOTICES.md](THIRD_PARTY_NOTICES.md).
- If you add a font, also regenerate the PDF export fonts with `python3 scripts/generate-pdf-fonts.py` (needs `fonttools` and `brotli`).
- The icons and the social image are generated by `yarn brand:assets`; the screenshots in the README by `yarn docs:screenshots`.

## Releases

Lienzo follows [Semantic Versioning](https://semver.org/) and keeps a [CHANGELOG](CHANGELOG.md) generated from the commit titles.

1. In GitHub, go to Actions, then **Prepare Release**, and run it on `develop` with `patch`, `minor` or `major`. It opens a `chore(release): vX.Y.Z` pull request that bumps `package.json` and the changelog.
2. Merge that pull request into `develop`.
3. Open a pull request from `develop` into `main` and merge it with a merge commit. The **Release** workflow tags the version and creates the GitHub release; the Docker image is published to GHCR and Docker Hub.

To run CI on the release pull request, add a personal access token as the repository secret `RELEASE_TOKEN`.

## License

Lienzo is licensed under the [GNU GPLv3](LICENSE). By contributing you agree that your contribution is licensed under the same terms.
Loading
Loading