Skip to content

Commit 0b045d0

Browse files
committed
Add contributing guide
1 parent b48a0ea commit 0b045d0

1 file changed

Lines changed: 168 additions & 0 deletions

File tree

CONTRIBUTING.md

Lines changed: 168 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,168 @@
1+
# Contributing To HOMEii Flow
2+
3+
Thank you for wanting to help improve HOMEii Flow.
4+
5+
HOMEii Flow is not meant to be just another Home Assistant card. The goal is to make Music Assistant feel like a polished, visual, app-like music experience inside Home Assistant, especially for wall tablets, phones, multi-room homes, and Hebrew/RTL users. Contributions are welcome when they protect that direction.
6+
7+
## Good Contributions
8+
9+
Good contributions usually do one of these things:
10+
11+
- Make the card easier and more reliable to use in a real home.
12+
- Improve the touch experience on phones, tablets, and wall panels.
13+
- Improve Music Assistant integration without adding setup friction.
14+
- Improve RTL/Hebrew support and keep English support clean.
15+
- Fix HACS packaging, Home Assistant dashboard picker behavior, or browser compatibility.
16+
- Add focused tests around shared state, config defaults, media handling, or layout helpers.
17+
- Improve documentation, screenshots, release notes, or install guidance.
18+
19+
## Before You Start
20+
21+
For larger UI, flow, or behavior changes, please open an issue first and describe:
22+
23+
- What user problem the change solves.
24+
- Which screen or workflow is affected.
25+
- How it should behave on phone, tablet, and desktop.
26+
- Whether it changes configuration, defaults, HACS packaging, or Music Assistant calls.
27+
28+
Small fixes, documentation improvements, and clear bug fixes can go straight to a pull request.
29+
30+
## Project Setup
31+
32+
Clone the repository and install dependencies:
33+
34+
```bash
35+
git clone https://github.com/r11a/homeii-music-flow.git
36+
cd homeii-music-flow
37+
npm install
38+
```
39+
40+
Run the validation checks:
41+
42+
```bash
43+
npm run check
44+
```
45+
46+
Build the release package:
47+
48+
```bash
49+
npm run build
50+
```
51+
52+
## Main Files
53+
54+
- `src/homeii-music-flow.js` is the main card implementation.
55+
- `src/core/` contains shared helpers for state, media, layout, theme, and validation.
56+
- `src/sendspin-js/` contains the local browser player support.
57+
- `tests/` contains Vitest coverage for shared logic.
58+
- `dist/` is the HACS-ready release output.
59+
- `hacs.json` tells HACS which JavaScript file to load.
60+
- `README.md`, `CHANGELOG.md`, `PUBLISHING.md`, and `LOCAL_DEPLOYMENT.md` document install, release, and deployment behavior.
61+
62+
Most feature work should start in `src/`. Do not hand-edit generated release output in `dist/` unless the change is specifically about packaging and you understand the release flow.
63+
64+
## Development Rules
65+
66+
- Keep changes focused. Avoid unrelated refactors in the same pull request.
67+
- Preserve existing variable names and local patterns unless there is a clear reason to change them.
68+
- Prefer small, understandable helpers over broad rewrites.
69+
- Do not add telemetry, tracking, analytics, or external network calls unrelated to Home Assistant or Music Assistant functionality.
70+
- Do not include personal Home Assistant URLs, tokens, player IDs, screenshots with private data, or local credentials.
71+
- Keep the card usable without a complicated setup path.
72+
- Keep visual changes consistent with the premium, app-like HOMEii Flow style.
73+
74+
## UI And UX Guidelines
75+
76+
HOMEii Flow is designed for everyday touch use. When changing the interface:
77+
78+
- Prioritize clarity over feature density.
79+
- Keep the current queue, player state, and selected action visible whenever possible.
80+
- Avoid modals when an inline or drawer interaction is clearer.
81+
- Make primary actions obvious and secondary actions quiet.
82+
- Test long Hebrew labels, RTL alignment, and narrow phone layouts.
83+
- Check that text does not overflow buttons, cards, headers, or bottom bars.
84+
- Keep phone, tablet, desktop, and wall-panel use cases in mind.
85+
86+
## HACS And Release Package Requirements
87+
88+
HACS installs the package from `dist/`, so release safety matters.
89+
90+
Before a release-oriented pull request is merged, confirm:
91+
92+
- `npm run build` completes successfully.
93+
- `dist/homeii-music-flow.js` exists.
94+
- `dist/sendspin-js/` exists when the local browser player is enabled.
95+
- `dist/vendor/embla-carousel.umd.js` exists when swipe browsing is enabled.
96+
- `dist/homeii-flow-logo.svg` exists.
97+
- `hacs.json` still points to `homeii-music-flow.js`.
98+
- The card type remains:
99+
100+
```yaml
101+
type: custom:homeii-music-flow
102+
```
103+
104+
## Testing
105+
106+
Run:
107+
108+
```bash
109+
npm run lint
110+
npm run test
111+
npm run build
112+
```
113+
114+
For UI changes, also smoke test in Home Assistant:
115+
116+
- Add the resource through HACS or `/local/community/homeii-music-flow/homeii-music-flow.js`.
117+
- Add the card from the dashboard picker when possible.
118+
- Verify manual YAML still works.
119+
- Test main player, compact player, FLOW, Studio, queue, library, actions, timers, settings, lyrics, history, and recommendations.
120+
- Test phone, tablet, and desktop widths.
121+
- Test dark and light themes.
122+
- Test RTL/Hebrew text where relevant.
123+
124+
## Pull Request Checklist
125+
126+
Before opening a pull request:
127+
128+
- Explain what changed and why.
129+
- Include screenshots or screen recordings for visible UI changes.
130+
- Mention which Home Assistant and Music Assistant versions you tested with.
131+
- Mention whether the change affects HACS install, `dist/`, config defaults, or card picker registration.
132+
- Run `npm run check`.
133+
- Run `npm run build` when runtime or package output changes.
134+
- Update `README.md` or `CHANGELOG.md` when users need to know about the change.
135+
136+
## Bug Reports
137+
138+
Please include:
139+
140+
- HOMEii Flow version.
141+
- Home Assistant version.
142+
- Music Assistant version.
143+
- Browser and device type.
144+
- How the card was installed: HACS or manual.
145+
- The card YAML configuration, with private values removed.
146+
- Console errors from the browser developer tools, if available.
147+
- Clear steps to reproduce the issue.
148+
149+
## Feature Requests
150+
151+
Please describe the real-life use case, not only the proposed button or setting.
152+
153+
Helpful details:
154+
155+
- Who is using it: phone user, wall tablet, guest, child, multi-room listener, etc.
156+
- What they are trying to do.
157+
- What currently feels confusing, slow, or missing.
158+
- Why this belongs inside HOMEii Flow instead of Home Assistant core, Music Assistant, or another card.
159+
160+
## Release Ownership
161+
162+
Maintainers handle version bumps, tags, GitHub Releases, and final HACS release validation.
163+
164+
If your pull request changes release behavior, update the relevant documentation and call it out clearly in the PR.
165+
166+
## License
167+
168+
By contributing, you agree that your contribution is licensed under the MIT License used by this project.

0 commit comments

Comments
 (0)