Contributing
Contributions to UI eXtension are most welcome, either integration or frontend code, or updates to documentation.
Integration
The integrations main purpose is to handle updates to Frontend resource. However being an integration opens an avenue for services to communicate with Frontend resource. If you have any creative ideas on new UIX services, please submit a PR. If you are not sure then start a discussion to see where it may lead.
Developing integration
If you are a seasoned integration developer, you will find the best way is to add custom_components/uix as a mount to your Home Assistant core dev container. Tips when testing:
- update version in
package.jsondevelopment tag e.g. 5.0.1-mydev.1 - run
npm run buildwhich will update the version in the integrationmanifest.jsonand compileuix.js - restart Home Assistant running in your dev container
Warning
Failure to follow best practice integration building tips will leave your UIX integration in a indeterminate state as far as integration vs Frontend resource, where your changes may not work, you will receive repeated Reload warnings and/or needing to clear Frontend caches on devices.
Frontend
The Frontend javascript resource is the where all the UIX magic happens. If you have thoughts on a new UIX to add, or UI element that needs patching by UIX, please submit a PR. If you are not sure then start a discussion to see where it may lead.
Developing Frontend
If you have a Home Assistant dev container, following the tips in integration. Otherwise follow these tips when testing:
- update version in
package.jsondevelopment tag e.g. 5.0.1-mydev.1 - run
npm run buildwhich will update the version in the integrationmanifest.jsonand compileuix.js - copy
uix.jsandmanifest.jsontocustom_components/uix - restart Home Assistant.
Warning
Failure to follow best practice Frontend resource building tips will leave your UIX Frontend resource in a indeterminate state as far as integration vs Frontend resource, where your changes may not work, you will receive repeated Reload warnings and/or needing to clear Frontend caches on devices.
Documentation
Documentation is where every UIX user can contribute. As long as you have python installed in your environment you can modify the document source and see results in real time.
Documentation updating
UIX documentation is built from markdown source files using Zensical. Follow these tips to server teh documentation website in your local environment:
- Clone repo
- Make a python virtual environment and install zensical (not required if you have zensical installed globally)
python3 -m venv .venv source .venv/bin/activate pip3 install zensical - Change to the
docsdirectory and run zensicalcd docs zensical serve - Documentation website will then be available at
http://localhost:8000 - You can run zensical at another bound ip address and/or port using
--dev-addr. e.g.zensical serve localhost:9000to run on port 9000.
Submitting pull requests
- DO NOT include
uix.jsin your commits in a pull request. The resource file will be built on release. As UIX is an integration it can't use release assets asuix.jsneeds to be in thecustom_components/uixfolder. - Use conventional commits style naming for commits. While this is not mandatory as pull requests will be squash and title updated to use conventional commit naming.
- In commit footer or pull request include
BREAKING CHANGE: ...if it is a breaking change. - In commit footer or pull request include references to issues fixed/closed e.g.
fixes #1234.