Skip to content

Latest commit

 

History

History
48 lines (35 loc) · 2.38 KB

File metadata and controls

48 lines (35 loc) · 2.38 KB

Contributing to GenSpectrum Dashboards Components

Conventional Commits

This uses Release Please to generate releases for the components. As Release Please relies on Conventional Commits to determine the version, commit messages should follow the Conventional Commits specification.

  • The most important prefixes that affect new versions are feat: (new minor version) and fix: (new patch version).
  • Breaking changes must be indicated in the commit message. We prefer a footer that starts with BREAKING CHANGE: followed by a description of the breaking change. This will result in a new major version.
  • Commits changing components code should use the scope components, e.g. feat(components): add new component.
  • Release Please determines the commits that are relevant for the release by changed files. If you don't mean for a feat or fix commit to show up in the components change list, then you must not edit files in components/ in the same commit.

We squash-merge PRs, so only the PR title needs to follow this format.

Testing The Generated Changelog

To test the generated changelog, run

npm run release-please-dry-run -- --token=<GitHub PAT> --target-branch=<name of the upstream branch>

where

  • <GitHub PAT> is a GitHub Personal Access Token. It doesn't need any permissions.
  • <name of the upstream branch> is the name of the branch for which the changelog should be generated.

NOTE: This command does not respect local changes. It will pull the commit messages from the remote repository.

CSS

We use Tailwind and DaisyUI for styling. Prefer Tailwind or DaisyUI classes for styling the components. Only use custom CSS files and classes or inline styles if those don't work for your usecase.

Notice that Tailwind and DaisyUI classes cannot be generated dynamically, because Tailwind scans the code at build time to generate the necessary style sheets.

Make sure that you don't include any CSS files in the components like this: import './my-component.css'. If vite finds imports like these, it will generate a CSS file in the output. We don't want that. All styles should already be included in the components. Instead, apply the CSS files to the Lit components using the static styles field.