Unified styles + React components for Church Center Web.
cd Code
git clone git@github.com:planningcenter/doxy-web.git
cd doxy-web
yarn install
-
yarn start
- compiles SCSS/JS + runs Storybook usinglocalhost
-
yarn develop
- compiles SCSS/JS + watchessrc
directory for changes -
yarn develop:yalc
- compiles/watches SCSS/JS and locally publishes bundled code viayalc
(this is the preferred way to test package changes locally inchurch-center
or proxied app - (check out the yalc development guide for more details) -
yarn test
- runs defined component tests using Jest -
yarn test:watch
- runs tests + watchessrc
directory for changes
- Run
yarn start
to use Storybook development environment
- using local
pco-box
-http://localhost:3000
- using
pco cloud-box
-http://first.churchcenter.test:3000
- In separate terminal, run
yarn develop:yalc
to watchsrc
for changes and push toyalc
registry - In
church-center
(or proxied app), runyalc add @planningcenter/doxy-web
to consume/test local changes
The sandbox provides another local testing/development environment where multiple UI elements/components can be viewed simultaneously. This is especially useful for making new CSS changes because you can see multiple instances of the UI states vs. in Storybook, where you can only toggle 1 state at a time.
- Run
yarn sandbox
(parallel command foryarn develop:yalc
&cd sandbox && yarn start
) - Follow
localhost
link in terminal to view local Parcel app
To add new views
- Add a contextually-named component to
sandbox/src/pages
directory and export frompages/index.js
- Import page/component to
src/App.jsx
and add to<Router />
with path - Add corresponding
<Link />
tosrc/components/Sidebar.jsx
- New versions to
@planningcenter/doxy-web
are made using a "batched" process by deploying changes to NPM frommain
. - All changes should be made using a "feature branch" forked from
main
and merged using our standard PR process. - Changes should be documented in the CHANGELOG before merging the approved PR.
See How we pre-release on Notion for detailed instructions/exampled.
Refer to the Planning Center release strategy on Notion.
yarn deploy:storybook
- view changes: https://planningcenter.github.io/doxy-web/
Import @planningcenter/doxy-web/dist/css/doxy-web
import { Heading } from "@planningcenter/doxy-web"