Workflow

PreviousNext

From picking an issue to a merged pull request, including the commit rules that decide whether your work is accepted.

Zard UI follows a plain GitHub flow: master is the only long-lived branch, every change arrives through a pull request from a fork, and merges are squashed. Releases are derived from commit messages, which is why their format is enforced.

Branches

Branch from an up-to-date master and name the branch after the issue you are solving: feat/#<issue>-<short-name> or fix/#<issue>-<short-name> .

Start from an issue Copy
git checkout master
git pull origin master
git checkout -b feat/#123-button-loading

Commit as often as you like โ€” the squash merge collapses the branch into a single commit whose message is the pull request title, so that title must follow the format below too.

Before you push Copy
npx nx run-many --target=lint --p=zard,blocks --parallel
npm test
npm run build

Commit Format

The header is <emoji> type(scope): subject . The scope is optional; the emoji is not. Add ! after the type โ€” or the scope โ€” for a breaking change, which promotes the release to a major bump.

EmojiTypeUsed forVersion bump
โœจfeatA new featureminor
๐Ÿ›fixA bug fixpatch
๐Ÿš€perfA performance improvementpatch
โช๏ธrevertReverts a previous commitpatch
๐Ÿ“ฆrefactorA change that neither fixes a bug nor adds a featurenone
๐Ÿ“docsDocumentation onlynone
๐Ÿ’„styleFormatting, no behaviour changenone
๐ŸงชtestAdding or fixing testsnone
๐Ÿ—๏ธbuildBuild system or dependenciesnone
๐Ÿ”งciCI configuration and scriptsnone
๐ŸšงchoreAnything that does not touch src or testsnone
Commit โ€” the emoji is mandatory Copy
git add .
git commit -m "โœจ feat(button): add loading state"

# Valid
# โœจ feat(button): add loading state
# ๐Ÿ› fix(input): resolve focus bug on Safari
# ๐Ÿ“ docs(contribute): document the block generator
# โœจ feat(button)!: redesign the button API   <- breaking change, major bump

# Rejected by commitlint
# feat(button): add loading state             <- no emoji
# โœจ feat(button): fix                        <- subject shorter than 10 chars
# โœจ feat(button): add loading state.          <- trailing period
# โœจ Feat(button): add loading state          <- type must be lower-case
!

No Co-Authored-By trailers

Do not add Co-Authored-By trailers to commits, and never bypass the hooks with --no-verify . If a hook fails, fix the cause.

Why Commits Are Rejected

These rules come straight from commitlint.config.mjs . The commit-msg hook applies them locally, and the CI applies them again to every commit in the pull request.

Rejected becauseFix
No emoji at the start of the headerPrefix the message with the emoji for your type.
A type outside the allowed listUse one of the types in the table above, in lower case.
Subject shorter than 10 charactersDescribe the change, do not just name the area.
Subject longer than 72 charactersMove the detail to the commit body.
Subject ending with a periodDrop the trailing period.
Header longer than 100 charactersShorten the scope or the subject.
A body line longer than 100 charactersWrap the body.

Pull Request

Open the pull request against master . The repository template asks what you did, for screenshots, for the linked issue, for the type of change and for a browser checklist โ€” fill all of it in.

  • โ€ขThe pull request targets master.
  • โ€ขThe title follows the same emoji + type + subject format as the commits.
  • โ€ขThe related issue is linked.
  • โ€ขUnit tests pass locally: npm test.
  • โ€ขThe full build passes: npm run build.
  • โ€ขE2E specs were updated if a component or its first demo changed.
  • โ€ขGenerated files that your change produced are committed.
  • โ€ขScreenshots or a GIF are attached when the change is visual.

What the CI Runs

Five jobs, defined in .github/workflows/ci.yml . All of them must pass before a review can be merged.

JobWhat it does
commitlintValidates every commit message in the pull request, failing on warnings.
lintnpx nx run-many --target=lint --p=zard,blocks --parallel
buildnpm run build
testnpm test โ€” runs after build
e2enpx nx e2e web-e2e โ€” runs after build, uploads the Playwright report

Once the checks are green and a maintainer approves, the pull request is squash-merged into master . From there the release automation takes over โ€” see the Release page.

github iconwhatsapp icondiscord iconX icon

Made with โค in Brazil. Open source and available on GitHub .