Skip to content

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

  1. Every pull request must be linked to a GitHub issue
  2. Branch naming convention: person/target-branch/#issue-description (e.g. jur/3.x/#42-fix-carousel-autoplay)
  3. Write atomic commits following the alphagov Git styleguide
  4. Pull requests must contain a short description of the solution
  5. 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 showed method must include the updated dxpr_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

  1. Implement the change
  2. Test carefully
  3. Do a cleanup/refactoring round
  4. Re-test to confirm nothing broke
  5. Commit and push with clean git history
  6. Check that linter checks pass
  7. Comment /e2e on the PR to run regression tests
  8. Request review after all checks pass
Something wrong or missing on this page? Report it or edit the page.