Skip to content
Halorav0.1.0

Project

Contributing

Small, careful changes with tests. This page is rendered from CONTRIBUTING.md.

Thank you for considering a contribution. Halora is the Origin Labs design system, and five live sites depend on it, so changes are small, tested, and explained.

Getting started

  1. Fork the repository and clone it.
  2. Install with npm ci.
  3. Build the package and the site with npm run build:all.
  4. Preview the site with npm run serve and open http://localhost:4173.

Branch model

This repository uses GitFlow. develop is the integration branch and main is stable. All work happens on short-lived branches off develop.

BranchPurposeMerges into
mainStable. Every push builds and publishes the site image.release target
developIntegration branch.main through a release PR
feat/*New features.develop through a PR
fix/*Bug fixes.develop through a PR
docs/*Documentation only.develop through a PR
chore/*Dependencies, CI, tooling.develop through a PR

Commit messages

Use Conventional Commits in English: feat:, fix:, docs:, chore:, refactor:, test:. Write the subject in the imperative mood, in lowercase after the type, with no trailing period. Do not add AI attribution or co-author footers to commits or pull requests.

Text rules

  • Everything in git and GitHub is in English: branches, commits, pull requests, and docs.
  • Do not use em dash characters anywhere. npm run lint:text fails the build if it finds one.

Tests and gates

Run these before you push:

Terminal
npm run lint:text
npm test
npm run build
npm run size
npm run build:all
npm run a11y
  • npm test includes the contrast gate. Every text and background pair that components use must reach 4.5:1 (3:1 for large text and the focus ring) in light and dark, for every brand.
  • npm run size enforces the budget: all CSS under 20 kB gzipped and all JavaScript under 8 kB gzipped.
  • npm run a11y runs axe through Playwright against the built site, in both themes. It needs a Chromium binary. Set CHROMIUM_PATH if it is not at /usr/bin/chromium.

New behavior needs new tests. Behavior modules are tested with a small DOM fake in test/helpers/fake-dom.mjs.

Add a component

  1. Create src/css/components/<name>.css. Wrap everything in @layer ha-components { ... }.
  2. Prefix every class with ha-, use BEM-like modifiers (ha-thing--variant, ha-thing__part), and take every color, radius, shadow, easing, and duration from a --ha-* token.
  3. Check both themes and both brands, and apply the mobile rules: icon and label pairs stay inline, touch targets reach 44px on phones, and nothing overflows at 320px.
  4. Add the file name to COMPONENTS in scripts/lib.mjs.
  5. If the component uses a new text and background pair, add it to test/tokens.test.mjs.
  6. Document it in site/pages/components-a.mjs or components-b.mjs with live demos, a class table, accessibility notes, and do and don't guidance. Add the page key to site/nav.mjs.
  7. Add a line to CHANGELOG.md under Unreleased.

Add a brand

  1. Add an entry to brands in tokens/index.mjs. Define complete light and dark color sets (spread an existing set and override what differs) and the three font families.
  2. Run npm test. The contrast gate reports any pair that fails and by how much.
  3. Run npm run build. This writes dist/brands/<id>.css and a full bundle in dist/bundles/.
  4. Add the brand to the documentation site: the brand switch in site/lib/layout.mjs and a section in site/pages/tokens.mjs.

Pull request process

  1. Branch from develop.
  2. Make sure the checks above pass.
  3. Open a pull request into develop, assigned to @mateuseap, with this body:
Text
#### Changes made

- bullet

Releases

See docs/release-process.md. Maintainers merge to main, tag vX.Y.Z, and the release workflow attaches the tarball.

Edit this page on GitHub

Type to search.