Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/next' into react-native/use-core…
Browse files Browse the repository at this point in the history
…-for-server
  • Loading branch information
igor-dv committed Dec 6, 2018
2 parents 16e246c + e42c647 commit b5dbf50
Show file tree
Hide file tree
Showing 10 changed files with 136 additions and 87 deletions.
18 changes: 9 additions & 9 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Thanks for your interest in improving Storybook! We are a community-driven proje

Please review this document to help to streamline the process and save everyone's precious time.

This repo uses yarn workspaces, so you should install `[email protected]` or higher as package manager. See [installation guide](https://yarnpkg.com/en/docs/install).
This repo uses yarn workspaces, so you should install `[email protected]` or higher as a package manager. See [installation guide](https://yarnpkg.com/en/docs/install).

## Issues

Expand Down Expand Up @@ -57,15 +57,15 @@ You can also pick suites from CLI. Suites available are listed below.

`yarn test --core`

This option executes test from `<rootdir>/app/react`, `<rootdir>/app/vue`, and `<rootdir>/lib`.
Before the tests are ran, the project must be bootstrapped with core. You can accomplish this with `yarn bootstrap --core`
This option executes tests from `<rootdir>/app/react`, `<rootdir>/app/vue`, and `<rootdir>/lib`.
Before the tests are run, the project must be bootstrapped with core. You can accomplish this with `yarn bootstrap --core`

##### CRA-kitchen-sink - Image snapshots using Storyshots

`yarn test --image`

This option executes tests from `<rootdir>/examples/official-storybook`
In order for the image snapshots to be correctly generated, you must have static build of the storybook up-to-date :
In order for the image snapshots to be correctly generated, you must have a static build of the storybook up-to-date :

```javascript
cd examples/official-storybook
Expand All @@ -78,7 +78,7 @@ Puppeteer is used to launch and grab screenshots of example pages, while jest is

#### 2b. Run e2e tests for CLI

If you made any changes to `lib/cli` package, the easiest way to verify that it doesn't break anything is to run e2e tests:
If you made any changes to the `lib/cli` package, the easiest way to verify that it doesn't break anything is to run e2e tests:

yarn test --cli

Expand All @@ -92,7 +92,7 @@ In that case, please check the git diff before committing to make sure it only c

#### 2c. Link `storybook` and any other required dependencies:

If you want to test your own existing project using the github version of storybook, you need to `link` the packages you use in your project.
If you want to test your own existing project using the GitHub version of storybook, you need to `link` the packages you use in your project.

```sh
cd app/react
Expand Down Expand Up @@ -131,9 +131,9 @@ A good way to do that is using the example `cra-kitchen-sink` app embedded in th
git push -u <your-username> master
```

If you follow that process, you can then link to the github repository in the issue. See <https://github.com/storybooks/storybook/issues/708#issuecomment-290589886> for an example.
If you follow that process, you can then link to the GitHub repository in the issue. See <https://github.com/storybooks/storybook/issues/708#issuecomment-290589886> for an example.

**NOTE**: If your issue involves a webpack config, create-react-app will prevent you from modifying the _app's_ webpack config, however you can still modify storybook's to mirror your app's version of the storybook. Alternatively, use `yarn eject` in the CRA app to get a modifiable webpack config.
**NOTE**: If your issue involves a webpack config, create-react-app will prevent you from modifying the _app's_ webpack config, however, you can still modify storybook's to mirror your app's version of the storybook. Alternatively, use `yarn eject` in the CRA app to get a modifiable webpack config.

### Updating Tests

Expand All @@ -154,7 +154,7 @@ We welcome your contributions. There are many ways you can help us. This is few
- Fix typos and add more [documentation](https://github.com/storybooks/storybook/labels/needs%20docs).
- Try to fix some [bugs](https://github.com/storybooks/storybook/labels/bug).
- Work on [API](https://github.com/storybooks/storybook/labels/enhancement%3A%20api), [Addons](https://github.com/storybooks/storybook/labels/enhancement%3A%20addons), [UI](https://github.com/storybooks/storybook/labels/enhancement%3A%20ui) or [Webpack](https://github.com/storybooks/storybook/labels/enhancement%3A%20webpack) use enhancements and new [features](https://github.com/storybooks/storybook/labels/feature%20request).
- Add more [tests](https://codecov.io/gh/storybooks/storybook/tree/master/packages) (specially for the [UI](https://codecov.io/gh/storybooks/storybook/tree/master/packages/storybook-ui/src)).
- Add more [tests](https://codecov.io/gh/storybooks/storybook/tree/master/packages) (especially for the [UI](https://codecov.io/gh/storybooks/storybook/tree/master/packages/storybook-ui/src)).

Before you submit a new PR, make sure you run `yarn test`. Do not submit a PR if tests are failing. If you need any help, create an issue and ask.

Expand Down
2 changes: 1 addition & 1 deletion MAINTAINERS.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ This document will document some of the processes that members of the documentat
# PR Process

1. Triage with the correct [label](#labels)
2. If there a change related to it ensure it has been published and tested before closing
2. If there is a change related to it ensure it has been published and tested before closing

# Labels

Expand Down
16 changes: 8 additions & 8 deletions MIGRATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ If you are using `create-react-app` (aka CRA), you may need to do some manual st

- `create-react-app@1` may require manual migrations.
- If you're adding storybook for the first time, it should just work: `sb init` should add the correct dependencies.
- If you've upgrading an existing project, your `package.json` probably already uses Babel 6, making it incompatible with `@storybook/react@4` which uses Babel 7. There are two ways to make it compatible, each of which is spelled out in detail in the next section:
- If you're upgrading an existing project, your `package.json` probably already uses Babel 6, making it incompatible with `@storybook/react@4` which uses Babel 7. There are two ways to make it compatible, each of which is spelled out in detail in the next section:
- Upgrade to Babel 7 if you are not dependent on Babel 6-specific features.
- Migrate Babel 6 if you're heavily dependent on some Babel 6-specific features).
- `create-react-app@2` should be compatible as is, since it uses babel 7.
Expand All @@ -162,7 +162,7 @@ yarn add @babel/core babel-loader --dev
yarn add babel-loader@7
```

Also make sure you have a `.babelrc` in your project directory. You probably already do if you are using Babel 6 features (otherwise you should consider upgrading to Babel 7 instead). If you don't have one, here's a simple one that works:
Also, make sure you have a `.babelrc` in your project directory. You probably already do if you are using Babel 6 features (otherwise you should consider upgrading to Babel 7 instead). If you don't have one, here's a simple one that works:

```json
{
Expand Down Expand Up @@ -221,7 +221,7 @@ There are no expected breaking changes in the 3.4.x release, but 3.4 contains a

## From version 3.2.x to 3.3.x

There wasn't expected be any breaking changes in this release, but unfortunately it turned out that there are some. We're revisiting our [release strategy](https://github.com/storybooks/storybook/blob/master/RELEASES.md) to follow semver more strictly.
It wasn't expected that there would be any breaking changes in this release, but unfortunately it turned out that there are some. We're revisiting our [release strategy](https://github.com/storybooks/storybook/blob/master/RELEASES.md) to follow semver more strictly.
Also read on if you're using `addon-knobs`: we advise an update to your code for efficiency's sake.

### `babel-core` is now a peer dependency ([#2494](https://github.com/storybooks/storybook/pull/2494))
Expand All @@ -236,7 +236,7 @@ This was done to support different major versions of babel.

### Base webpack config now contains vital plugins ([#1775](https://github.com/storybooks/storybook/pull/1775))

This affects you if you use custom webpack config in [Full Control Mode](https://storybook.js.org/configurations/custom-webpack-config/#full-control-mode) while not preserving the plugins from `storybookBaseConfig`. Before `3.3`, preserving them was just a reccomendation, but now it [became](https://github.com/storybooks/storybook/pull/2578) a requirement.
This affects you if you use custom webpack config in [Full Control Mode](https://storybook.js.org/configurations/custom-webpack-config/#full-control-mode) while not preserving the plugins from `storybookBaseConfig`. Before `3.3`, preserving them was just a recommendation, but now it [became](https://github.com/storybooks/storybook/pull/2578) a requirement.

### Refactored Knobs

Expand Down Expand Up @@ -268,7 +268,7 @@ See also [TypeScript definitions in 3.1.x](#moved-typescript-definitions).

### Updated Addons API

We're in the process of upgrading our addons APIs. As a first step, we've upgraded the Info and Notes addons. The old API will still work with your existing projects, but will be deprecated soon and removed in Storybook 4.0.
We're in the process of upgrading our addons APIs. As a first step, we've upgraded the Info and Notes addons. The old API will still work with your existing projects but will be deprecated soon and removed in Storybook 4.0.

Here's an example of using Notes and Info in 3.2 with the new API.

Expand All @@ -287,7 +287,7 @@ It's not beautiful, but we'll be adding a more convenient/idiomatic way of using

## From version 3.0.x to 3.1.x

**NOTE:** technically this is a breaking change and should be a 4.0.0 release according to semver. However, we're still figuring things out, and didn't think this change necessitated a major release. Please bear with us!
**NOTE:** technically this is a breaking change and should be a 4.0.0 release according to semver. However, we're still figuring things out and didn't think this change necessitated a major release. Please bear with us!

### Moved TypeScript definitions

Expand Down Expand Up @@ -334,7 +334,7 @@ npx -p @storybook/cli sb init

If the above doesn't work, or you want to make the changes manually, the details are below:

> We have adopted the same versioning strategy as have been adopted by babel, jest and apollo.
> We have adopted the same versioning strategy that has been adopted by babel, jest and apollo.
> It's a strategy best suited for ecosystem type tools, which consist of many separately installable features / packages.
> We think this describes storybook pretty well.
Expand Down Expand Up @@ -379,7 +379,7 @@ You have to change your `package.json`, prune old and install new dependencies b

### Deprecated embedded addons

We used to ship 2 addons with every single installation of storybook: `actions` and `links`. But in practice not everyone is using them, so we decided to deprecate this and in the future they will be completely removed. If you use `@storybook/react/addons` you will get a deprecation warning.
We used to ship 2 addons with every single installation of storybook: `actions` and `links`. But in practice not everyone is using them, so we decided to deprecate this and in the future, they will be completely removed. If you use `@storybook/react/addons` you will get a deprecation warning.

If you **are** using these addons, migrating is simple:

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ See [Addon / Framework Support Table](ADDONS_SUPPORT.md)

## Badges & Presentation materials

We have a badge ! Link it to your live Storybook example.
We have a badge! Link it to your live Storybook example.

![Storybook](https://github.com/storybooks/press/blob/master/badges/storybook.svg)

Expand Down
8 changes: 4 additions & 4 deletions RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ releases. We'll try our best to restrict breaking changes to MAJOR releases.

Every bugfix should go out as soon as we've verified the fix, and based on the
current rate of contribution, we should be issuing PATCH releases weekly.
Eventually we'll automate the process so that a release will go out every time a PR is
Eventually, we'll automate the process so that a release will go out every time a PR is
merged into `master`, and we've already laid most of the groundwork for this.

## MINOR releases
Expand All @@ -61,7 +61,7 @@ hierarchy for stories) deserves more attention:

Therefore we release `alpha` versions continuously on the NPM `next` tag to allow people to test out features as soon as they are ready.

In general we should release 2-3 headline features per minor release for
In general, we should release 2-3 headline features per minor release for
marketing purposes. Each headline feature should get its own blog post on the
Storybook medium publication, and the release itself should also get a blog
post.
Expand Down Expand Up @@ -102,11 +102,11 @@ in a patch release.
- For PATCH changes, all discussion can occur in issue/PR comments (and random slack chat as needed).
- For MINOR feature changes, there are multiple stages of discussion:
- The feature may be discussed in an issue before it is implemented (ex: <https://github.com/storybooks/storybook/issues/151>)
- Once it's implemented, the discussion may be occur on the PR (ex: <https://github.com/storybooks/storybook/pull/1329>)
- Once it's implemented, the discussion may occur on the PR (ex: <https://github.com/storybooks/storybook/pull/1329>)
- If people disagree on an implementation and it can't be resolved in discussion, they may issue alternative PR's with different ideas
- Ultimately the maintainers will reach a consensus before merging the changes. There is no set process for this, but we're all adults.
- Since MINOR features are released in alpha before they are fully released, new issues may be created by end users, etc.
- For MAJOR infrastructural changes, the discussion may take place over time, in gists like this one, issues, slack discussions, etc.
- For MAJOR infrastructural changes, the discussion may take place over time, in gists, issues, slack discussions, etc.
- Once the breaking changes have been reduced to an actual implementation, it looks pretty much like a feature release (only with higher stakes and probably a longer stabilization process).

## FAQ's
Expand Down
22 changes: 11 additions & 11 deletions ROADMAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,43 +26,43 @@ Doing these will be backwards compatible.

If you're smart about it you can already view the preview on multiple devices and windows. It's just an iframe after-all.
But story selection and addon-settings are not synced.
We want to make this much much simpler and really are core feature of storybook.
We want to make this much much simpler and a core feature of storybook.

### Automatic story detection

Some tools are doing automatic file detection, jest for example.
We think such a feature is highly needed. A lot of users are already hacking this themselves using webpack specific features.

### Theme ability and override core UI components
### Themeability and override core UI components

Storybook is often used inside product companies and agencies. We want to help them have a sense of quality and immersion.
We're interested in full customizability of our UI, though addons and options.

### Add a playground addon

Many other styleguide-type projects have what's called a playground, where developers can change the code rendering the component inside the app.
Storybook has of course a very tight connection with your editor, and it has a knobs addon.
Storybook has, of course, a very tight connection with your editor, and it has a knobs addon.
But we still see value in an addon that will allow the workflow of a playground.

### See multiple (or all) stories in 1 preview.

Storybook's philosophy is about describing small bits in a variety of states.
However some components are best understood when viewed in multiple varieties in 1 view.
It's quite common to see users write a single story, with a wrapper components and multiple instances of the component the story is about.
However, some components are best understood when viewed in multiple varieties in 1 view.
It's quite common to see users write a single story, with wrapper components and multiple instances of the component the story is about.
We plan to add a second mode to storybook that will allow you to see all stories in 1 preview.
That way you can write your stories how they are best, and preview them how you like.

## Supporting other frameworks and libraries

We believe in the power of react, and think it's the right choice for a lot of projects.
But it's up to you and your team to decide your stack.
Unfortunately if you choose anything not from the list of [supported frameworks](README.md#supported-frameworks) you can not use storybook.
Unfortunately, if you choose anything not from the list of [supported frameworks](README.md#supported-frameworks) you can not use storybook.

We want you to be able to use storybook with the framework / library of your choice.

### Polymer & Webcomponents

Storybook for Polymer is currently in development, and will support custom elements and plain HTML.
Storybook for Polymer is currently in development and will support custom elements and plain HTML.

### Aurelia

Expand All @@ -76,16 +76,16 @@ Our addon api is limited and will eventually have to be improved to accommodate

### API for adding stories

Currently it's getting hard to setup a story that has data / options for multiple addons.
We want to support this, but will likely mean we will have to change the `add` method's API.
Currently, it's getting hard to set up a story that has data/options for multiple addons.
We want to support this but will likely mean we will have to change the `add` method's API.

## Documentation

### Better design

We have a new logo, so next step is a overhaul of our documentation site.
We have a new logo, so the next step is an overhaul of our documentation site.

### Record videos and write blog post on how to use, tweak & develop storybook
### Record videos and write blog posts on how to use, tweak & develop storybook

- writing addons,
- choosing the right addons.
Expand Down
4 changes: 2 additions & 2 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@ Documentation is written in Markdown and located inside the [`docs/src/pages`](h
- Indirect action (bad): `A refactor of this code is necessary`.
- Direct action (good): `This code needs to be refactored`.
4. Avoid the use of pronouns - documentation should not address the reader because not everything applies to the person reading our docs.
* Don't use `you` to refer to the user or third party.
* Don't use `you` to refer to the user or a third party.
- Pronoun (bad): `You can also...`
- Without pronoun (good): `Users can also...`
* Don't use `we` to refer to Storybook, contributors, or Storybook users.
- Pronoun (bad): `We can create this component...`
- Without pronoun (good): `The component can be created...`
* Don't use `he`, `she`, `him`, `her`, etc. to refer to third party unless referring to a specific person.
* Don't use `he`, `she`, `him`, `her`, etc. to refer to a third party unless referring to a specific person.
* Refer to contributors and the product as `Storybook`.
* Refer to users as `users`.
1 change: 1 addition & 0 deletions docs/gatsby-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ module.exports = {
'/basics/guide-vue/',
'/basics/guide-angular/',
'/basics/guide-mithril/',
'/basics/guide-ember/',
'/basics/writing-stories/',
'/basics/exporting-storybook/',
'/basics/faq/',
Expand Down
8 changes: 4 additions & 4 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
"prepare": "npm run snyk-protect"
},
"dependencies": {
"@storybook/addon-actions": "^4.0.9",
"@storybook/addon-links": "^4.0.9",
"@storybook/addons": "^4.0.9",
"@storybook/addon-actions": "^4.0.12",
"@storybook/addon-links": "^4.0.12",
"@storybook/addons": "^4.0.11",
"@storybook/react": "^3.4.11",
"babel-loader": "^6.4.1",
"bootstrap": "^4.1.3",
Expand All @@ -47,7 +47,7 @@
"react-router": "^4.3.1",
"react-stack-grid": "^0.7.1",
"sitemap": "^2.1.0",
"snyk": "^1.110.2"
"snyk": "^1.113.0"
},
"snyk": true
}
Loading

0 comments on commit b5dbf50

Please sign in to comment.