Getting Started
Before contributing, familiarize yourself with:- QML and Qt Quick fundamentals
- KDE Plasma widget development
- Home Assistant WebSocket API
- The project structure and codebase
Development Setup
Clone the repository with submodules:Installing for Development
Install the plasmoid locally for testing:Branch Strategy
The project uses a branch-based workflow with thedev branch as the primary development branch.
Create a feature or bugfix branch
Create a new branch from For bug fixes:Use descriptive, lowercase names with hyphens (e.g.,
dev using the appropriate prefix:For new features:feature/entity-grouping, bugfix/websocket-reconnect).Never commit directly to the
dev or main branches. Always use feature or bugfix branches.Commit Message Guidelines
The project follows the Conventional Commits specification for commit messages. This ensures consistent history and enables automated changelog generation.Commit Format
Commit Types
| Type | Description | Example |
|---|---|---|
feat | New feature | feat(entities): add support for entity grouping |
fix | Bug fix | fix: resolve websocket reconnection issue |
docs | Documentation changes | docs: update installation instructions |
style | Code style changes (formatting, no logic change) | style: fix indentation in Client.qml |
refactor | Code refactoring (no feature change) | refactor(api): simplify service call handling |
perf | Performance improvements | perf: optimize state update processing |
test | Adding or updating tests | test: add unit tests for entity model |
chore | Maintenance tasks | chore: update dependencies |
Examples
Basic commit:Code Style Guidelines
Maintain consistency with the existing codebase:QML Style
- Use 4 spaces for indentation (no tabs)
- Follow Qt QML coding conventions
- Place opening braces on the same line
- Use camelCase for property and function names
- Group related properties together
- Add comments for complex logic
File Organization
- Keep components in the
components/directory - Use descriptive file names that match the component
- Place reusable utilities in appropriate subdirectories
- Import statements at the top, grouped logically
Best Practices
- Avoid hardcoded strings; use
i18n()for user-facing text - Handle errors gracefully with appropriate error messages
- Clean up resources in
Component.onDestruction - Use property bindings instead of imperative updates when possible
- Document public APIs with comments
Testing Your Changes
Before submitting a pull request:Test locally
Install the plasmoid and verify your changes work as expected:Test all affected functionality thoroughly.
Check for QML errors
Monitor the logs for any QML errors or warnings:Fix any errors before submitting.
Test different scenarios
- Test with and without network connectivity
- Test with invalid configurations
- Test WebSocket reconnection
- Test with multiple entities
- Verify KDE Wallet integration works
Pull Request Process
When you’re ready to submit your changes:Ensure branch is up to date
Rebase your branch on the latest Resolve any conflicts if they occur.
dev branch:Run final checks
- All commits follow Conventional Commits format
- No QML errors in logs
- Code follows project style guidelines
- Changes are tested locally
Create pull request
- Go to the GitHub repository
- Click New Pull Request
- Select
devas the base branch - Select your branch as the compare branch
- Fill out the PR template with:
- Clear description of changes
- Motivation and context
- Related issues (use
Closes #123syntax) - Testing performed
- Screenshots (if UI changes)
Pull Request Checklist
Before submitting, verify:- Changes are based on the
devbranch - All commits use Conventional Commits format
- Code follows project style guidelines
- Changes have been tested locally
- No QML errors or warnings
- Documentation updated (if needed)
- Issue references included (if applicable)
Reporting Issues
Found a bug or have a feature request? Use the GitHub issue templates:Bug Reports
Use the bug report template and include:- Clear description of the bug
- Steps to reproduce
- Expected vs. actual behavior
- System information:
- Distribution and version
- KDE Plasma version
- KDE Frameworks version
- Home Assistant version
- Error messages or logs
- Screenshots (if applicable)
Feature Requests
Use the feature request template and include:- Problem description or motivation
- Proposed solution
- Alternative solutions considered
- Additional context or mockups
Before submitting a feature request, search existing issues to avoid duplicates.
Code of Conduct
- Be respectful and constructive in all interactions
- Focus on what is best for the project and community
- Accept constructive criticism gracefully
- Show empathy towards other contributors
Questions?
If you have questions about contributing:- Check existing GitHub Discussions
- Search closed issues for similar questions
- Open a new discussion for general questions
Resources
- QML Documentation
- KDE Plasma Widget Tutorial
- Home Assistant WebSocket API
- Conventional Commits Specification
