Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…t-storybook into pietrop-master

# Conflicts:
#	package-lock.json
  • Loading branch information
Eimi Okuno committed Mar 9, 2020
2 parents e1e5ee2 + 8847c0e commit bbccbca
Show file tree
Hide file tree
Showing 11 changed files with 14,907 additions and 8,251 deletions.
11 changes: 6 additions & 5 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
title: ""
labels: enhancement
assignees: pietrop
assignees: bbc
---**Is your feature request related to a problem? Please describe.**

---

**Is your feature request related to a problem? Please describe.**
<!-- A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] -->

**Describe the solution you'd like**

<!-- A clear and concise description of what you want to happen. -->

**Describe alternatives you've considered**

<!-- A clear and concise description of any alternative solutions or features you've considered. -->

**Additional context**

<!-- Add any other context or screenshots about the feature request here. -->

<!--
Expand Down
9 changes: 3 additions & 6 deletions .github/ISSUE_TEMPLATE/question.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
---
name: Question
about: Ask a question about this project
title: ''
title: ""
labels: question
assignees: pietrop

---

<!-- _where applicable, please provide context and use case around your question._ -->
assignees: bbc
---<!-- _where applicable, please provide context and use case around your question._ -->
28 changes: 15 additions & 13 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,30 +3,32 @@
This project has a [Code of Conduct](./CODE_OF_CONDUCT.md) that we expect all of our contributors to abide by, please check it out before contributing.

## Contributor license agreement

By submitting code as an individual or as an entity you agree that your code is licensed the same as the [Digital Paper Edit](./LICENCE.md).

## Pull requests and branching

1. [Feel free to start by raising an issue](https://github.com/bbc/digital-paper-edit-react-components/issues/new?template=feature_request.md) so that others can be aware of areas where there is active development, and if needed we can synchronies the effort.
1. [Feel free to start by raising an issue](https://github.com/bbc/digital-paper-edit-storybook/issues/new?template=feature_request.md) so that others can be aware of areas where there is active development, and if needed we can synchronies the effort.

2. [Fork the repo](https://help.github.com/articles/fork-a-repo/)

3. Before working on a feature **always** create a new branch first. Createa a branch with a meaningful name.
4. Branches should be short lived - consider doing multiple PR breaking down functionalities as opposed to one big change.
5. If you've added code that should be tested, add tests, if you need help with automated testing, feel free to raise an [issue](https://github.com/bbc/digital-paper-edit-react-components/issues/new?template=feature_request.md).
5. If you've added code that should be tested, add tests, if you need help with automated testing, feel free to raise an [issue](https://github.com/bbc/digital-paper-edit-storybook/issues/new?template=feature_request.md).
6. Ensure the test suite passes.
7. Make sure your code lints.
8. If you've changed APIs, consider [updating the documentation](https://github.com/bbc/digital-paper-edit-react-components#documentation) and QA Testing docs.
8. If you've changed APIs, consider [updating the documentation](https://github.com/bbc/digital-paper-edit-storybook#documentation) and QA Testing docs.
9. Once the work is complete push the branch up on to GitHub for review. Make sure your branch is up to date with `master` before making a pull request. eg use [`git merge origin/master`](https://git-scm.com/docs/git-merge) or [rebase](https://git-scm.com/book/en/v2/Git-Branching-Rebasing)
10. Once a branch has been merged into `master`, delete it.

`master` is rarely committed to directly unless the change is quite trivial or a code review is unnecessary (code formatting or documentation updates for example).

## Code Quality
## Code Quality

- Aim for solutions that are easy to explain and reason around so that others can contribute to it.
- Use meaningfull descriptive variables and function names. eg avoid using `x`,`y`,`z` as variable names.
- Keep lines short
- Keep functions small and avoid [side effects](https://en.wikipedia.org/wiki/Side_effect_(computer_science)) when possible.
- Keep lines short
- Keep functions small and avoid [side effects](<https://en.wikipedia.org/wiki/Side_effect_(computer_science)>) when possible.
- etc..

See [this blog post for more on this](https://medium.com/mindorks/how-to-write-clean-code-lessons-learnt-from-the-clean-code-robert-c-martin-9ffc7aef870c)
Expand All @@ -35,14 +37,14 @@ See [this blog post for more on this](https://medium.com/mindorks/how-to-write-c

- [ ] Fork the repository
- [ ] Create a branch with a meaningful name
- [ ] Add automated tests where appropriate
- [ ] Add automated tests where appropriate
- [ ] Ensure test suite passes (`npm run test`)
- [ ] Make sure your code lints. (`npm run lint`)
- [ ] consider re-factoring for code quality and readability
- [ ] Update documentation and QA docs where appropriate - [see updating the documentation](https://github.com/bbc/digital-paper-edit-react-components#documentation)
- [ ] Setup your PR for review
- [ ] Update documentation and QA docs where appropriate - [see updating the documentation](https://github.com/bbc/digital-paper-edit-storybook#documentation)
- [ ] Setup your PR for review

<!--
<!--
Good example of contribution guideline
https://reactjs.org/docs/how-to-contribute.html
Expand All @@ -51,7 +53,7 @@ another example - with more tech details
https://github.com/facebook/create-react-app/blob/master/CONTRIBUTING.md
https://github.com/facebookresearch/wav2letter/blob/master/CONTRIBUTING.md
https://github.com/facebookresearch/wav2letter/blob/master/CONTRIBUTING.md
https://github.com/hiddentao/fast-levenshtein/blob/master/CONTRIBUTING.md
-->
https://github.com/hiddentao/fast-levenshtein/blob/master/CONTRIBUTING.md
-->
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Pietro Passarelli CC0 BBC 2019
Pietro Passarelli CC0 2020

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
68 changes: 31 additions & 37 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ See [here](https://github.com/bbc/digital-paper-edit-client#project-architecture
_How to build and run the code/app_ -->

```sh
git clone [email protected]:bbc/digital-paper-edit-react-components.git
git clone [email protected]:bbc/digital-paper-edit-storybook.git
```

```sh
cd digital-paper-edit-react-components
cd digital-paper-edit-storybook
```

Optional step to setup [nvm](https://github.com/nvm-sh/nvm) to use node version 10, otherwise just use node version 10
Expand All @@ -37,19 +37,29 @@ npm install

## Usage - development

Start the storybook

```sh
npm run start
npm start
```

Server API is listening on [`http://localhost:6006/`](http://localhost:6006)
[Storybook](https://storybook.js.org/) is at [`http://localhost:6006/`](http://localhost:6006)

- [ ] TODO: available on npm
## Usage - production

<!-- Available on `npm` [npm - `@bbc/react-transcript-editor`](https://www.npmjs.com/package/@bbc/react-transcript-editor) -->
```sh
npm install @bbc/digital-paper-edit-storybook
```

<!-- ```
npm install @bbc/react-transcript-editor
``` -->
<!-- Example of import
```js
import 'Breadcrumb' from '@bbc/digital-paper-edit-storybook/Breadcrumb'
<Breadcrumb />
```
-->

## System Architecture

Expand All @@ -76,13 +86,11 @@ Node version is set in node version manager [`.nvmrc`](https://github.com/creati

<!-- _How to run build_ -->

- [ ] TODO

<!-- > To transpile `./packages` and create a build in the `./dist` folder, run:
To transpile `./src` and create a build in the `./dist` folder, run:

```sh
npm run build
```
npm run build:component
``` -->

## Demo & storybook

Expand All @@ -94,27 +102,21 @@ npm run build:component
To build the storybook as a static site

```sh
npm run build:storybook
npm run build-storybook
```

## Publish storybook & demo to github pages

This github repository uses [github pages](https://pages.github.com/) to host the storybook and the demo of the component. **Make sure to commit and push any changes to MASTER before deploying to github pages.**

```sh
npm run deploy:ghpages
npm run publish-ghpages
```

Alternatively, if you simply want to build the demo locally in the `build` folder then just

```sh
npm run build:storybook
```

you can then run this command to serve the static site locally

```sh
npm run build:storybook:serve
npm run build-storybook
```

## Tests
Expand All @@ -127,33 +129,25 @@ Test coverage using [`jest`](https://jestjs.io/), to run tests
npm run test
```

During development you can use

```
npm run test:watch
```

## Travis CI

- [ ] TODO

<!-- On commit this repo uses the [.travis.yml](./.travis.yml) config tu run the automated test on [travis CI](https://travis-ci.org/bbc/react-transcript-editor). -->
On commit this repo uses the [.travis.yml](./.travis.yml) config tu run the automated test on [travis CI](https://travis-ci.org/bbc/digital-paper-edit-storybook).

## Deployment

<!-- _How to deploy the code/app into test/staging/production_ -->

- [ ] TODO
To push to [npm - `@bbc/digital-paper-edit-storybook`](https://www.npmjs.com/package/@bbc/digital-paper-edit-storybook)

<!-- To push to [npm - `@bbc/react-transcript-editor`](https://www.npmjs.com/package/@bbc/react-transcript-editor)
login into npm

```
npm publish:public
npm run publish-public
```

This runs `npm run build:component` and `npm publish --access public` under the hood
This runs `npm run build` and `npm publish --access public` under the hood

> Note that only `README.md` and the `dist` folders are published to npm. -->
> Note that only `README.md` and the `dist` folders are published to npm.
## Contributing

Expand Down
Loading

0 comments on commit bbccbca

Please sign in to comment.