Skip to content

Commit

Permalink
Merge branch 'master' into shilman/test-53-release-from-next
Browse files Browse the repository at this point in the history
  • Loading branch information
shilman committed Jan 11, 2020
2 parents 67609c0 + be5a558 commit b3f0886
Show file tree
Hide file tree
Showing 21 changed files with 333 additions and 47 deletions.
2 changes: 1 addition & 1 deletion addons/knobs/package.json
Expand Up @@ -51,7 +51,7 @@
"devDependencies": {
"@types/escape-html": "0.0.20",
"@types/react-lifecycles-compat": "^3.0.1",
"@types/react-select": "^3.0.4"
"@types/react-select": "^2.0.19"
},
"peerDependencies": {
"react": "*"
Expand Down
12 changes: 12 additions & 0 deletions addons/notes/README.md
Expand Up @@ -44,6 +44,18 @@ export default {
};
```

### Upgrading to CSF Format

Add `notes` to the `parameters` object:

```js
export default {
parameters: {
notes: 'My notes',
}
}
```

## Using Markdown

Using Markdown in your notes is supported, Storybook will load Markdown as raw by default.
Expand Down
Binary file added addons/storysource/theming-light-dark.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion app/react/package.json
Expand Up @@ -33,7 +33,7 @@
"prepare": "node ../../scripts/prepare.js"
},
"dependencies": {
"@babel/plugin-transform-react-constant-elements": "^7.2.0",
"@babel/plugin-transform-react-constant-elements": "^7.6.3",
"@babel/preset-flow": "^7.0.0",
"@babel/preset-react": "^7.0.0",
"@storybook/addons": "5.3.0-rc.13",
Expand Down
6 changes: 3 additions & 3 deletions app/riot/package.json
Expand Up @@ -41,10 +41,10 @@
"ts-dedent": "^1.1.0"
},
"devDependencies": {
"@babel/plugin-transform-modules-commonjs": "^7.2.0",
"@babel/preset-env": "^7.4.1",
"@babel/plugin-transform-modules-commonjs": "^7.7.0",
"@babel/preset-env": "^7.7.1",
"@babel/preset-flow": "^7.0.0",
"@babel/preset-react": "^7.0.0"
"@babel/preset-react": "^7.7.0"
},
"peerDependencies": {
"babel-loader": "^7.0.0 || ^8.0.0",
Expand Down
2 changes: 1 addition & 1 deletion docs/src/pages/basics/writing-stories/index.md
Expand Up @@ -164,7 +164,7 @@ const loaderFn = () => {
configure(loaderFn, module);
```

Storybook uses Webpack's [require.context](https://webpack.js.org/guides/dependency-management/#require-context) to load modules dynamically. Take a look at the relevant Webpack [docs](https://webpack.js.org/guides/dependency-management/#require-context) to learn more about how to use `require.context`.
Storybook uses Webpack's [require.context](https://webpack.js.org/guides/dependency-management/#requirecontext) to load modules dynamically. Take a look at the relevant Webpack [docs](https://webpack.js.org/guides/dependency-management/#requirecontext) to learn more about how to use `require.context`.

If you are using the `storiesOf` API directly, or are using `@storybook/react-native` where CSF is unavailable, you should use a loader function with **no return value**:

Expand Down
2 changes: 2 additions & 0 deletions docs/src/pages/configurations/theming/index.md
Expand Up @@ -23,6 +23,8 @@ addons.setConfig({

```

> `addParameters` needs to be called before `configure()` method or it won't have any effect.
When setting a theme, set a full theme object. The theme is replaced, not combined.

Read on for more on how to create your own theme.
Expand Down
2 changes: 1 addition & 1 deletion docs/src/pages/guides/guide-ember/index.md
Expand Up @@ -42,7 +42,7 @@ Then add the following NPM script to your `package.json` in order to start the s
```json
{
"scripts": {
"build-storybook": "ember build && build-storybook -p 9001 -s dist",
"build-storybook": "ember build && build-storybook -s dist",
"storybook": "ember serve & start-storybook -p 9001 -s dist"
}
}
Expand Down
2 changes: 1 addition & 1 deletion docs/src/pages/guides/guide-svelte/index.md
Expand Up @@ -104,7 +104,7 @@ So you can create a story "view" file, which is essentially a .svelte file to lo
<!-- MyButtonView -->
<MyButton {rounded} on:click>
{buttonText}
</Button>
</MyButton>
```

In this example, the `on:click` that is heard on the `MyButton` component is passed up to the containing component `MyButtonView` using the svelte shorthand.
Expand Down
4 changes: 4 additions & 0 deletions docs/src/pages/presets/preset-gallery/index.md
Expand Up @@ -25,6 +25,10 @@ One-line SCSS configuration for Storybook.

One-line AntDesign configuration for Storybook.

### [AntDesign](https://github.com/storybookjs/presets/tree/master/packages/preset-ant-design)

This comment has been minimized.

Copy link
@vlaja

vlaja Jan 31, 2020

Seems like an accidental duplicate of the AntDesign section above.

This comment has been minimized.

Copy link
@shilman

shilman Jan 31, 2020

Author Member

Argh. Bad merge!! Thanks for letting me know


One-line AntDesign configuration for storybook.

## Community presets

There are no community presets available yet. Check back here or edit this page to add yours.
2 changes: 1 addition & 1 deletion docs/src/versions/latest.json
@@ -1 +1 @@
{"version":"5.2.0-alpha.23","info":{"plain":"Storybook 5.1 is a juicy upgrade including:\n\n- 📱 Mobile: Standalone package architecture for React Native\n- 🎟 A11y addon: Realtime accessibility checks and visual feedback\n- 🛠 Context addon: New UI for themes, internationalization, & more\n- 🎛 Presets: One-line configuration for babel, webpack, & addons\n\n5.1 contains hundreds more fixes, features, and tweaks. Browse the changelogs matching `5.1.0-alpha.*`, `5.1.0-beta.*`, and `5.1.0-rc.*` for the full list of changes. See [MIGRATION.md](https://github.com/storybookjs/storybook/blob/next/MIGRATION.md) to upgrade from `5.0` or earlier."}}
{"version":"5.2.8","info":{"plain":"### Bug Fixes\n\n* UI: Fix layout of Preview container ([#8628](https://github.com/storybookjs/storybook/pull/8628))\n* Core: Use `stable` package to ensure story sorting is stable ([#8795](https://github.com/storybookjs/storybook/pull/8795))\n* Source-loader: Warn if applied to non-stories file ([#8773](https://github.com/storybookjs/storybook/pull/8773))"}}
2 changes: 1 addition & 1 deletion examples-native/crna-kitchen-sink/package.json
Expand Up @@ -29,7 +29,7 @@
"whatwg-fetch": "^3.0.0"
},
"devDependencies": {
"@babel/core": "^7.2.2",
"@babel/core": "^7.7.2",
"@babel/plugin-transform-react-jsx-source": "^7.2.0",
"@storybook/addon-actions": "5.3.0-rc.13",
"@storybook/addon-knobs": "5.3.0-rc.13",
Expand Down
@@ -0,0 +1,12 @@
import React from 'react';
import { DocgenButton } from '../../components/DocgenButton';

const ForwardedButton = React.forwardRef((props, ref) => <DocgenButton ref={ref} {...props} />);

export default {
title: 'Addons|Docs/ForwardRef',
component: ForwardedButton,
};

export const displaysCorrectly = () => <ForwardedButton>Hello World!</ForwardedButton>;
displaysCorrectly.story = { name: 'Displays forwarded ref components correctly' };
@@ -0,0 +1,12 @@
import React from 'react';
import { DocgenButton } from '../../components/DocgenButton';

const ButtonWithMemo = React.memo(props => <DocgenButton {...props} />);

export default {
title: 'Addons|Docs/ButtonWithMemo',
component: ButtonWithMemo,
};

export const displaysCorrectly = () => <ButtonWithMemo>Hello World!</ButtonWithMemo>;
displaysCorrectly.story = { name: 'Displays components with memo correctly' };
@@ -0,0 +1,3 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`Storyshots Core|Errors Null Error 1`] = `<!---->`;
10 changes: 10 additions & 0 deletions examples/vue-kitchen-sink/src/stories/core-errors.stories.js
@@ -0,0 +1,10 @@
export default {
title: 'Core|Errors',
};

export const throwsError = () => {
throw new Error('foo');
};
throwsError.story = { parameters: { storyshots: { disable: true } } };

export const nullError = () => null;
4 changes: 4 additions & 0 deletions lib/codemod/src/lib/utils.js
Expand Up @@ -7,5 +7,9 @@ export const sanitizeName = name => {
if (/^\d/.test(key)) {
key = `_${key}`;
}
// prepend _ if name starts with a digit
if (/^\d/.test(key)) {
key = `_${key}`;
}
return key;
};
@@ -0,0 +1,5 @@
export default {
title: 'bar',
};

export const _1 = () => <button />;
4 changes: 2 additions & 2 deletions lib/core/package.json
Expand Up @@ -27,8 +27,8 @@
"prepare": "node ../../scripts/prepare.js"
},
"dependencies": {
"@babel/plugin-proposal-class-properties": "^7.3.3",
"@babel/plugin-proposal-object-rest-spread": "^7.3.2",
"@babel/plugin-proposal-class-properties": "^7.7.0",
"@babel/plugin-proposal-object-rest-spread": "^7.6.2",
"@babel/plugin-syntax-dynamic-import": "^7.2.0",
"@babel/plugin-transform-react-constant-elements": "^7.2.0",
"@babel/preset-env": "^7.4.5",
Expand Down
4 changes: 2 additions & 2 deletions package.json
Expand Up @@ -129,8 +129,8 @@
"@babel/plugin-proposal-export-default-from": "^7.2.0",
"@babel/plugin-proposal-object-rest-spread": "^7.2.0",
"@babel/plugin-syntax-dynamic-import": "^7.2.0",
"@babel/plugin-transform-react-constant-elements": "^7.2.0",
"@babel/preset-env": "^7.4.1",
"@babel/plugin-transform-react-constant-elements": "^7.6.3",
"@babel/preset-env": "^7.7.1",
"@babel/preset-flow": "^7.0.0",
"@babel/preset-react": "^7.0.0",
"@babel/preset-typescript": "^7.3.3",
Expand Down

0 comments on commit b3f0886

Please sign in to comment.