Contributing
DXPR Builder development happens on GitHub at github.com/dxpr/dxpr_builder. All contributions follow the workflow described in the repository's CONTRIBUTING.md.
Git workflow
- Every pull request must be linked to a GitHub issue
- Branch naming convention:
person/target-branch/#issue-description(e.g.jur/3.x/#42-fix-carousel-autoplay) - Write atomic commits following the alphagov Git styleguide
- Pull requests must contain a short description of the solution
- Keep changes inside the scope of the issue: no unrelated formatting or refactoring
Code owner
@jjroelofs is the code owner. No pull requests can be merged without their review.
Coding standards
- PHP: Drupal coding standards
- JavaScript: ES6+ only (no
var, no jQuery in new code). Follow the Airbnb JavaScript coding standards with project exceptions - CSS: follow the Design System for custom properties and token naming
- A change to an element's
showedmethod must include the updateddxpr_frontend.js. Generate it from the full output the editor prints to the browser console when you click a container's save button. - New features need QA Analytics coverage.
Run npm install once after cloning. It installs the Husky
pre-commit hook, which lints your staged files; see
Testing.
Running E2E tests
Tests are triggered via slash commands in PR comments:
| Command | Description |
|---|---|
/e2e |
Run the full BS5 editor and anonymous suites |
/e2e groups=group-name |
Run specific test groups |
/e2e tests=ClassName |
Run specific test classes |
/e2e-bs3 |
Run the BS3 editor suite |
/e2eV2 |
Run the BS5 suites on the DXPR CMS stack |
/e2e maven_ref=branch |
Test with a custom dxpr_maven branch |
When a builder change needs a test change, the QA engineer updates
dxpr_maven on a branch, and you run /e2e maven_ref=<branch> on
your pull request. The builder pull request merges first, then the
dxpr_maven one.
Before requesting review
- Implement the change
- Test carefully
- Do a cleanup/refactoring round
- Re-test to confirm nothing broke
- Commit and push with clean git history
- Check that linter checks pass
- Comment
/e2eon the PR to run regression tests - Request review after all checks pass
Something wrong or missing on this page?
Report it
or edit the page.