Skip to content

Commit

Permalink
enhance the readme
Browse files Browse the repository at this point in the history
  • Loading branch information
tardyp committed Mar 23, 2019
1 parent c8ac982 commit 56f6bf3
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 8 deletions.
22 changes: 16 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,12 @@ install:

```
npm install
webpack
pip install -e .
pip install -e . # this should run webpack automatically
```

iterate:

```webpack --watch```
```npm run watch```

## Why?

Expand Down Expand Up @@ -110,11 +109,18 @@ then...

```
npm install
npm run webpack
pip install -e .
```

Once you have done the ```pip install```, buildbot should automatically start using your new plugin without you needing to do any other explicit hookup (I was a bit surprised by this as I thought it would require mentioning your new plugin in ```master.cfg``` but from my experience that's not necessary)
Because we are using ``gulp dev proxy``, the proxy uses all the plugin available in the virtualenv to build the UI, so `pip install` is only needed to start working (and restart `gulp dev proxy`).

When running in a real buildbot, you need to change the master.cfg to configure your plugin

```python
c['www']['plugins']['buildbot_react_plugin_boilerplate'] = {}
```
`buildbot_react_plugin_boilerplate` being the name of the `www entry_point` in `setup.py`


### Fixing up Javascript to use your own plugin name

Expand Down Expand Up @@ -152,7 +158,11 @@ In this repo, the setup is similar, except
* the top level React Component gets its data (its **props**) from the Angular Controller, which calls ```ReactDOM.render``` to invoke React to update


* The Controller is a bit slimmer, since more of the view logic is contained in the React components. The controller's main role now is to get the data from the services and forward it as **props** to React. The controller may want to massage the data a bit get it into a form that's more appropriate for the view. Ideally the **props** should only change when you want the view to change, so if there's extra data returned by the ```dataService``` that your view doesn't need, the controller can play the role of filtering that into a more view-relevant form.
* We don't use a controller, but rather a custom directive, which is the way to connect with different UI framework in JS. The directive has two roles:
* interconnect react and angular.js
* Get the buildbot data from the api and forward it as **props** to React.

The directive may want to massage the data a bit get it into a form that's more appropriate for the view. Ideally the **props** should only change when you want the view to change, so if there's extra data returned by the ```dataService``` that your view doesn't need, the directive can play the role of filtering that into a more view-relevant form.

### Taking Advantage of Typescript

Expand Down
2 changes: 0 additions & 2 deletions setup.cfg

This file was deleted.

0 comments on commit 56f6bf3

Please sign in to comment.