Skip to content

powerhome/playbook

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

npm version Gem Version

Playbook Design System

Playbook is the first design system built for both Rails & React interfaces. Inspired by Velocity, Playbook takes a modern design approach and applies it in a way that makes it easy to support bleeding edge or legacy systems. Playbook is built & maintained by the User Experience & Development teams at Power Home Remodeling, the largest home remodeler in the US.

Development

Requirements

Getting Started and Running Playbook for Development

  1. After cloning the repo, you should have the following nested folders among other files. It will be important to pay attention to which folder we are in as we get playbook running:

    playbook
    │   playbook
    │   playbook-website
    
  2. Ensure your installed version of bundler is the same as the BUNDLED WITH section found in Gemfile.lock. You can check the version you have by running bundle -v.

  3. From the root directory, run ./setup.sh

  4. From the top-level playbook folder run yarn start-dev This may take a little while.

  5. Once you see the "compiled successfully" message in your terminal, navigate to http://localhost:3000 and you should see the playbook website.

Post Installation Startup

Use ./run.sh to run the application in one step. This will handle dependency updates then start the server. Helpful for fast start-up without bootstrapping especially when switching branches. 🚀

Running Library Tests

  1. cd playbook && ./test.sh

Additional Resources

Adding NPM Dependencies

  1. You need to be working in playbook/playbook or playbook/playbook-website subdirectory
  2. run yarn workspace playbook-website add <lib name> to add to the website
  3. run yarn workspace playbook-ui add <lib name> to add to the kit source
  4. run yarn workspace playbook-project add <lib name> to add to the main project

Upgrading between versions

See docs/upgrade-guide

Releases

Development Environment

Building Playbook Kits

Testing Playbook Kits Locally

Testing React Kits locally

  1. From inside the playbook-ui directory, run yarn link;
  2. From Inside the project you want to test with playbook-ui, run yarn link playbook-ui;
  3. Rebuild the project now using this version of playbook-ui;
  4. Test all the things!
  5. When finished, from inside the project you were testing with playbook-ui, run yarn unlink playbook-ui;
  6. From Inside the playbook-ui directory, run yarn unlink;

Jest & React-Testing-Library for Writing Tests

We are currently backfilling test cases for React kit test coverage using Jest and React Testing Library. More additions and enhancements to the testing libraries are currently in the works. In the meantime, please take a look at these resources:

When a new kit is generated, a placeholder React kit test will also be created. You can run all the tests with yarn test.

Important Note

Keep in mind: Styles are brought in from playbook through the rails gem, so you will not be able to test scss updates with yarn linking.

The gem & npm package is available as open source under the terms of the ISC License.