|
| 1 | +# Contributing to UI Lovelace Minimalist |
| 2 | + |
| 3 | +>This is a living project and all input is very welcome! If you configured and designed a card, that you would like to share, please feel free to do so! We are happy to include your contribution so others can use it as well! |
| 4 | +
|
| 5 | +The following is a set of guidelines to contribute to the Minimalist 'theme'. You are always free to open an Issue or to make a PR to fix a bug, add a card or add enhancements. |
| 6 | + |
| 7 | +## Pull Requests |
| 8 | + |
| 9 | +For Pull Requeste we use for now two branches: |
| 10 | + |
| 11 | +- [`main`](https://github.com/UI-Lovelace-Minimalist/UI) |
| 12 | +- [`release`](https://github.com/UI-Lovelace-Minimalist/UI/tree/release) |
| 13 | + |
| 14 | +Both branches handle different types of pull requests. <br> |
| 15 | + |
| 16 | +The `main` branch is for pull requests related to "Custom-cards" and bugfixes/adaptations of documentation files. <br> |
| 17 | + |
| 18 | +The `release` branch is for all HACS-release related requests. |
| 19 | +These are mostly adaptations and or bugfixes to official cards and their documentation. It also includes changes in workflows related to the HACS integration. |
| 20 | + |
| 21 | +All pull requests need to be checked and approved by at least one admin. |
| 22 | + |
| 23 | +You can find [here](https://ui-lovelace-minimalist.github.io/UI/development/custom_cards/) instructions to develop your own "Custom-cards". |
| 24 | + |
| 25 | +## Guidelines |
| 26 | + |
| 27 | +All the YAML and documentation files need to follow some guidelines to provide consistency. |
| 28 | +These are the most important *guidelines*, click [here](https://ui-lovelace-minimalist.github.io/UI/development/custom_cards/) for the wiki. |
| 29 | + |
| 30 | +### Style and Qualtiy guidelines |
| 31 | + |
| 32 | +- Your file needs to satisfy some guidelines to assure your card is easy to read and looks like all the other files in the repository. |
| 33 | + 1. Each file needs to start only with `---` on the first line. |
| 34 | + 2. Each file needs to end with a empty code line. |
| 35 | + 3. All strings need to be `"double-quoted"`. |
| 36 | + 4. Only use `lowercase` in your code. |
| 37 | + 5. No trailing white-space (No random space between and around the code). |
| 38 | + 6. A line-length of 256. |
| 39 | + 7. **IMPORTANT!** Unix-style line endings. (It's recommended to use a code-editor like VSCode and set CRLF to LF) |
| 40 | + |
| 41 | + |
| 42 | +- More advanced users can make use of Pre-commit to apply most of the styles automatically. |
| 43 | + 1. Open your fork in a code-editor like VSCode. |
| 44 | + 2. Install [Pre-commit](https://pre-commit.com/) (Linux or Mac-system recommended). |
| 45 | + 3. All the needed hooks are available within the repository. |
| 46 | + 4. After your changes run `pre-commit run --all-files` in the terminal of your editor. |
| 47 | + 5. You could test your card in a dev-environment with the use of [Docker-desktop](https://www.docker.com/products/docker-desktop). |
| 48 | + 6. Make sure you read https://github.com/UI-Lovelace-Minimalist/UI/blob/dev/.devcontainer/README.md |
0 commit comments