Skip to content

Commit

Permalink
Merge in next
Browse files Browse the repository at this point in the history
  • Loading branch information
ndelangen committed Dec 19, 2018
2 parents 8147172 + a5b4e89 commit 4d6a7c2
Show file tree
Hide file tree
Showing 178 changed files with 6,432 additions and 2,218 deletions.
10 changes: 10 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,11 @@ jobs:
command: |
cd examples/riot-kitchen-sink
yarn build-storybook
- run:
name: Build preact kitchen-sink
command: |
cd examples/preact-kitchen-sink
yarn build-storybook
- run:
name: Build official-storybook
command: |
Expand Down Expand Up @@ -166,6 +171,11 @@ jobs:
command: |
cd examples/riot-kitchen-sink
yarn storybook --smoke-test --quiet
- run:
name: Run preact kitchen-sink (smoke test)
command: |
cd examples/preact-kitchen-sink
yarn storybook --smoke-test --quiet
native-smoke-tests:
<<: *defaults
steps:
Expand Down
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ built-storybooks
lib/cli/test
*.bundle.js
*.js.map
*.ts

!.remarkrc.js
!.babelrc.js
Expand Down
3 changes: 2 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ module.exports = {
{
js: 'never',
ts: 'never',
mjs: 'never',
},
],
'import/no-extraneous-dependencies': [
Expand Down Expand Up @@ -77,7 +78,7 @@ module.exports = {
'react/jsx-filename-extension': [
warn,
{
extensions: ['.js', '.jsx'],
extensions: ['.js', '.jsx', '.tsx'],
},
],
'react/jsx-no-bind': [
Expand Down
1 change: 1 addition & 0 deletions .github/autolabeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
'addon: viewport': ["addons/viewport/**"]
'app: angular': ["app/angular/**"]
'app: polymer ': ["app/polymer/**"]
'app: preact': ["app/preact/**"]
'app: react-native': ["app/react-native/**"]
'app: react': ["app/react/**"]
'app: vue': ["app/vue/**"]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package OpenSourceProjects_Storybook.patches.buildTypes

import jetbrains.buildServer.configs.kotlin.v2017_2.*
import jetbrains.buildServer.configs.kotlin.v2017_2.ui.*

/*
This patch script was generated by TeamCity on settings change in UI.
To apply the patch, change the buildType with uuid = '9f9177e7-9ec9-4e2e-aabb-d304fd667711' (id = 'OpenSourceProjects_Storybook_Test')
accordingly, and delete the patch script.
*/
changeBuildType("9f9177e7-9ec9-4e2e-aabb-d304fd667711") {
params {
add {
param("docker.node.version", "10.13")
}
}
}
38 changes: 19 additions & 19 deletions ADDONS_SUPPORT.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
## Addon / Framework Support Table

| | [React](app/react)|[React Native](app/react-native)|[Vue](app/vue)|[Angular](app/angular)| [Polymer](app/polymer)| [Mithril](app/mithril)| [HTML](app/html)| [Marko](app/marko)| [Svelte](app/svelte)| [Riot](app/riot)| [Ember](app/ember)|
| ----------- |:-------:|:-------:|:-------:|:-------:|:-------:|:-------:|:-------:|:-------:|:-------:|:-------:|:-------:|
|[a11y](addons/a11y) |+| |+|+|+|+|+|+| | |+|
|[actions](addons/actions) |+|+|+|+|+|+|+|+|+|+|+|
|[backgrounds](addons/backgrounds) |+|*|+|+|+|+|+|+|+|+|+|
|[centered](addons/centered) |+| |+|+| |+|+| |+| |+|
|[events](addons/events) |+| |+|+|+|+|+|+| | |+|
|[graphql](addons/graphql) |+| | | | | | | | | | |
|[google-analytics](addons/google-analytics) |+|+|+|+|+|+|+|+|+|+|+|
|[info](addons/info) |+| | | | | | | | | | |
|[jest](addons/jest) |+| | |+| | |+| | | | |
|[knobs](addons/knobs) |+|+*|+|+|+|+|+|+|+|+|+|
|[links](addons/links) |+|+|+|+|+|+|+| |+|+|+|
|[notes](addons/notes) |+|+*|+|+|+|+|+| |+|+|+|
|[options](addons/options) |+|+|+|+|+|+|+| |+|+|+|
|[cssresources](addons/cssresources) |+| |+|+|+|+|+|+|+|+|+|
|[storyshots](addons/storyshots) |+|+|+|+| | |+| |+|+| |
|[storysource](addons/storysource) |+| |+|+|+|+|+|+|+|+|+|
|[viewport](addons/viewport) |+| |+|+|+|+|+|+|+|+|+|
| | [React](app/react)|[React Native](app/react-native)|[Vue](app/vue)|[Angular](app/angular)| [Polymer](app/polymer)| [Mithril](app/mithril)| [HTML](app/html)| [Marko](app/marko)| [Svelte](app/svelte)| [Riot](app/riot)| [Ember](app/ember)| [Preact](app/preact)|
| ----------- |:-------:|:-------:|:-------:|:-------:|:-------:|:-------:|:-------:|:-------:|:-------:|:-------:|:-------:|:-------:|
|[a11y](addons/a11y) |+| |+|+|+|+|+|+| | |+|+|
|[actions](addons/actions) |+|+|+|+|+|+|+|+|+|+|+|+|
|[backgrounds](addons/backgrounds) |+|*|+|+|+|+|+|+|+|+|+|+|
|[centered](addons/centered) |+| |+|+| |+|+| |+| |+|+|
|[events](addons/events) |+| |+|+|+|+|+|+| | |+|+|
|[graphql](addons/graphql) |+| | | | | | | | | | | |
|[google-analytics](addons/google-analytics) |+|+|+|+|+|+|+|+|+|+|+|+|
|[info](addons/info) |+| | | | | | | | | | | |
|[jest](addons/jest) |+| | |+| | |+| | | | | |
|[knobs](addons/knobs) |+|+*|+|+|+|+|+|+|+|+|+|+|
|[links](addons/links) |+|+|+|+|+|+|+| |+|+|+|+|
|[notes](addons/notes) |+|+*|+|+|+|+|+| |+|+|+|+|
|[options](addons/options) |+|+|+|+|+|+|+| |+|+|+|+|
|[cssresources](addons/cssresources) |+| |+|+|+|+|+|+|+|+|+|+|
|[storyshots](addons/storyshots) |+|+|+|+| | |+| |+|+| |+|
|[storysource](addons/storysource) |+| |+|+|+|+|+|+|+|+|+|+|
|[viewport](addons/viewport) |+| |+|+|+|+|+|+|+|+|+|+|

`*` - React Native on device addon (addons/onDevice-\<name>)
64 changes: 64 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,67 @@
## 4.2.0-alpha.4 (December 18, 2018)

### Bug Fixes

* React: fix alias for react(-dom) to resolve to the user's version ([#5042](https://github.com/storybooks/storybook/pull/5042))

### Dependency Upgrades

* Bump husky from 1.2.0 to 1.3.0 ([#5038](https://github.com/storybooks/storybook/pull/5038))
* Bump fork-ts-checker-webpack-plugin from 0.4.15 to 0.5.2 ([#5037](https://github.com/storybooks/storybook/pull/5037))

## 4.2.0-alpha.3 (December 18, 2018)

### Bug Fixes

* React: add alias to react & react-dom ([#5016](https://github.com/storybooks/storybook/pull/5016))
* Addon-knobs: fix color picker display ([#5010](https://github.com/storybooks/storybook/pull/5010))

## 4.2.0-alpha.2 (December 16, 2018)

### Features

* Addon-Info: add markdown support for jsdoc comments ([#4983](https://github.com/storybooks/storybook/pull/4983))
* Addon-Storysource: support Flow ([#4971](https://github.com/storybooks/storybook/pull/4971))

### Maintenance

* Make applyPresets function signature more consistent ([#4988](https://github.com/storybooks/storybook/pull/4988))

### Dependency Upgrades

* RESET lockfile ([#4991](https://github.com/storybooks/storybook/pull/4991))

## 4.1.2 (December 15, 2018)

### Bug Fixes

* Addon-Knob: Add missing key property in Panel ([#4507](https://github.com/storybooks/storybook/pull/4507))
* Fix package version dependencies ([#4960](https://github.com/storybooks/storybook/pull/4960))

## 4.2.0-alpha.1 (December 12, 2018)

Fixes 4.2.0-alpha.0

### Features

* Addon-info: add forwardRef support ([#4961](https://github.com/storybooks/storybook/pull/4961))

### Bug Fixes

* Addon-knobs: Add missing key property in Panel ([#4507](https://github.com/storybooks/storybook/pull/4507))

### Maintenance

* Addon-notes: Migrated to TypeScript ([#4758](https://github.com/storybooks/storybook/pull/4758))

### Dependency Upgrades

* Fix: Add missing peer dependencies to addon-knobs ([#4928](https://github.com/storybooks/storybook/pull/4928))

## 4.2.0-alpha.0 (December 12, 2018)

Bad release

## 4.1.1 (December 12, 2018)

### Bug Fixes
Expand Down
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 `yarn@1.3.2` or higher as package manager. See [installation guide](https://yarnpkg.com/en/docs/install).
This repo uses yarn workspaces, so you should install `yarn@1.3.2` 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
18 changes: 9 additions & 9 deletions MIGRATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ import { number } from "@storybook/addon-knobs";

Addon-knobs no longer updates the URL parameters interactively as you edit a knob. This is a UI change but it shouldn't break any code because old URLs are still supported.

In 3.x, editing knobs updated the URL parameters interactively. The implementation had performance and architectural problems. So in 4.0, we changed this to a "copy" button tp the addon which generates a URL with the updated knob values and copies it to the clipboard.
In 3.x, editing knobs updated the URL parameters interactively. The implementation had performance and architectural problems. So in 4.0, we changed this to a "copy" button in the addon which generates a URL with the updated knob values and copies it to the clipboard.

### Keyboard shortcuts moved

Expand Down 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
Loading

0 comments on commit 4d6a7c2

Please sign in to comment.