Skip to content

Latest commit

 

History

History
45 lines (32 loc) · 2.68 KB

CONTRIBUTING.md

File metadata and controls

45 lines (32 loc) · 2.68 KB
layout title permalink
untitled
Contributing
/contributing/

Contributing

Install Required Packages

  1. Install node v11.15.0. It's recommended to install nvm to switch between node versions.
  2. Install Ruby v2.7.2. It's recommended to install rvm to safely switch between ruby versions.
  3. Go to project root folder. Run npm install to install all required packages for the project.

Initialize Local Showcase

  1. Execute npm run watch:assets to build and start watching SCSS and JS files changes.
  2. Execute npm run watch:showcase to initialize Jekyll locally.
  3. Open http://127.0.0.1:4000/shared-ui/ on your browser to visualize the showcase.

Did you experience any problem executing showcase? Run gem install bundler jekyll to install missing Jekyll bundler, but also make sure you meet all requirements.

Workflow.

Note: Do not commit directly on master, development or gh-pages branches.

  1. Run git checkout -b branch-name development to create a new branch from development branch. You must give it a descriptive name based on the task you are working on, for example:
    • new/SUI-124 for new features.
    • fix/SUI-124 for bugfixing and improvements.
    • doc/SUI-124 for documentation.
  2. Commit and push your changes to your new branch: git push -u development branch-name.
  3. Update CHANGELOG.md file with the correct description of your changes. Include DEV NOTES where applicable.
  4. Once you're done with a task, file a Pull Request for your branch against development branch. Make sure PR name follows Conventional Commits guidelines.
  5. Assign your PR to @iamleigh for code review. Note: CHANGELOG.md must be updated in order for your changes to be approved.
  6. Once the Pull Request has been approved, it will be merged in development branch.
  7. You can delete your branch locally and make sure it does not longer exist remote.

As soon as you start working with your task, it's a good idea to move it to "In Development" column on the JIRA board and as soon as you submit the Pull Request, move it to "Waiting for Merge" column so everybody knows what's going on with the project.

Scoping Styles & Scripts

In order to avoid conflicts with other versions of this library, we are using a versioned body class in the format .sui-x-y-z. This class is automatically generated by the body-class mixin which should wrap all scss in the project.

Any base styles should also include the .sui-wrap class. This class is used in place of the .wrap class for plugin admin pages to prevent any Shared UI specific styles from bleeding into the wp-admin menubar and sidebar.