Skip to content
This repository has been archived by the owner on Aug 13, 2023. It is now read-only.

Storybook V6 upgrade #3728

Merged
merged 52 commits into from
Oct 2, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
9caa98c
Bump @storybook/theming from 5.3.19 to 6.0.20
andrewscfc Sep 2, 2020
13c3743
Bump @storybook/react from 5.3.19 to 6.0.20
andrewscfc Sep 2, 2020
0a5dc6d
Bump @storybook/addon-knobs from 5.3.19 to 6.0.20
andrewscfc Sep 2, 2020
3d3bf85
Bump @storybook/addon-a11y from 5.3.19 to 6.0.20
andrewscfc Sep 2, 2020
8abfb4c
Bump @storybook/addon-viewport from 5.3.19 to 6.0.20
andrewscfc Sep 2, 2020
ea59cdf
Bump @storybook/addon-actions from 5.3.19 to 6.0.20
andrewscfc Sep 2, 2020
8b30499
Merge branch 'latest' into dependabot-storybook
andrewscfc Sep 2, 2020
8160c87
Merge branch 'latest' of github.com:bbc/psammead into dependabot-stor…
andrewscfc Sep 3, 2020
b5c4bdf
Force @storybook/core-events to 6.0.21
andrewscfc Sep 3, 2020
143c758
Fix merge conflict in package.json
RichardPK Sep 16, 2020
c57f24e
Bumping versions to 6.0.21 prior to isolating addon-notes bug
RichardPK Sep 17, 2020
a18ccb8
Package-lock commited after npm install
RichardPK Sep 17, 2020
e5fe2c3
Package-lock commited after npm run install:packages
RichardPK Sep 17, 2020
d7b7f57
Changes to package.json to force 6.0.2, fix issue with arbitrary decr…
RichardPK Sep 21, 2020
1079cd7
Merge branch 'latest' of github.com:bbc/psammead into dependabot-stor…
RichardPK Sep 21, 2020
e67adc8
npm run install:packages after merging with latest and running npm ci
RichardPK Sep 21, 2020
ced39c0
Restore v 6.0.21 to packages and remove forced storybook core-events …
RichardPK Sep 21, 2020
6c55d78
Reinstate notes
RichardPK Sep 21, 2020
25269d4
Migrated component tree separators to v6 compatible /
RichardPK Sep 21, 2020
c97b32c
Fixed issue with undefined props being passed to stories
RichardPK Sep 22, 2020
a2348e1
Pushing 'typography' into its own 'others' folder
RichardPK Sep 22, 2020
c45995c
Reimplement services knob for media player message
RichardPK Sep 22, 2020
e5500bc
Merge branch 'latest' of github.com:bbc/psammead into dependabot-stor…
RichardPK Sep 22, 2020
b634fb4
Implemented v6.0.31 compatible docs
RichardPK Sep 23, 2020
72b9782
Merge branch 'latest' into dependabot-storybook
rhenshaw56 Sep 23, 2020
ee832eb
Remove capitalised UTILITIES
RichardPK Sep 23, 2020
41a6c09
Merge branch 'latest' into dependabot-storybook
RichardPK Sep 23, 2020
0966644
Merge branch 'dependabot-storybook' of github.com:bbc/psammead into d…
RichardPK Sep 23, 2020
feefce1
Version bump psammead
RichardPK Sep 24, 2020
c1f9631
Bump psammead-brand
RichardPK Sep 24, 2020
942341d
Bump psammead-bulleted-list
RichardPK Sep 24, 2020
13a24b2
Bump psammead-bulletin
RichardPK Sep 24, 2020
7402f1a
Bump psammead-byline
RichardPK Sep 24, 2020
2f61137
Bump consent banner and caption
RichardPK Sep 24, 2020
9983c18
Bump copyright and content-anchor
RichardPK Sep 24, 2020
1d341e5
Bump embed and figure
RichardPK Sep 24, 2020
3c62770
Bump grid heading headings image
RichardPK Sep 24, 2020
1c81a5d
Bump image inline-link live-label media-indicator media-player
RichardPK Sep 24, 2020
966c6ef
Bump most-read navigation oembed paragraph play-button radio-schedule…
RichardPK Sep 24, 2020
1dbfdb2
Bump section sitewide social-embeds story-promo story-promo-list time…
RichardPK Sep 24, 2020
a7da00d
Bump psammead utilities and containers
RichardPK Sep 24, 2020
61dad25
Fixed merge conflicts
RichardPK Sep 24, 2020
cffec24
Bump versions of psammead-locales
RichardPK Sep 24, 2020
65dea0b
Overwrite newly introduced 1rem padding on .sb-show-main class
RichardPK Sep 29, 2020
03c930d
Range of v6 changes to config.js and addons.js
RichardPK Sep 29, 2020
251253b
REmove unused stories.pattern file
RichardPK Sep 29, 2020
ca2ff41
Bump to v6.2.2
RichardPK Sep 29, 2020
de9b798
Remove use of depreciated addParameters
RichardPK Sep 30, 2020
48d193a
Remove commented code
RichardPK Sep 30, 2020
33a82e4
Update changelogs to v 6.2.2
RichardPK Oct 2, 2020
0170e68
Fix merge conflicts in package versions
RichardPK Oct 2, 2020
dd77558
Fixing final conflicts in package.jsons
RichardPK Oct 2, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions .storybook/addons.js

This file was deleted.

8 changes: 8 additions & 0 deletions .storybook/main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
module.exports = {
stories: ['../packages/*/*/*/*.stories.jsx'],
addons: [
'@storybook/addon-knobs',
'@storybook/addon-a11y',
'@storybook/addon-viewport',
],
};
1 change: 1 addition & 0 deletions .storybook/manager.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
import '@storybook/addon-docs/register';
24 changes: 15 additions & 9 deletions .storybook/config.js → .storybook/preview.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,15 @@ import React, { Fragment } from 'react';
import { configure, addDecorator, addParameters } from '@storybook/react';
import { create } from '@storybook/theming';
import { withA11y } from '@storybook/addon-a11y';
import { DocsPage, DocsContainer } from '@storybook/addon-docs/blocks';
import {
AMP_SCRIPT,
AMP_NO_SCRIPT,
} from '@bbc/psammead-assets/amp-boilerplate';
import * as fontFaces from '@bbc/psammead-styles/fonts';
import { themes } from '@bbc/psammead-storybook-helpers';
import GlobalStyles from '@bbc/psammead-styles/global-styles';
import './storybook.css';

// New locales
import '@bbc/psammead-locales/moment/am';
Expand Down Expand Up @@ -47,7 +49,8 @@ import '@bbc/psammead-locales/moment/yo';

import { Helmet } from 'react-helmet';

addParameters({
export const parameters = {
passArgsFirst: false,
options: {
panelPosition: 'right',
sidebarAnimations: true,
Expand All @@ -62,7 +65,17 @@ addParameters({
iframes: true,
},
},
});
docs: {
container: DocsContainer,
page: DocsPage,
extractComponentDescription: (component, { notes }) => {
if (notes) {
return typeof notes === 'string' ? notes : notes.markdown || notes.text;
}
return null;
},
},
};

const fontPathMap = [
{ prefix: 'F_REITH', path: 'fonts/Reith/' },
Expand Down Expand Up @@ -105,10 +118,3 @@ export const ampDecorator = story => (
{story()}
</Fragment>
);

function loadAllStories() {
require('glob-loader!./stories.pattern');
addDecorator(withA11y);
}

configure(loadAllStories, module);
1 change: 0 additions & 1 deletion .storybook/stories.pattern

This file was deleted.

4 changes: 4 additions & 0 deletions .storybook/storybook.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.sb-show-main {
margin: 0 !important;
padding: 0 !important;
}
2 changes: 1 addition & 1 deletion .yeoman/templates/components/src/index.stories.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { withServicesKnob } from '@bbc/psammead-storybook-helpers';
import notes from '../README.md';
import <%= packageName %> from './index';

storiesOf('Components|<%= packageName %>', module)
storiesOf('Components/<%= packageName %>', module)
Copy link
Contributor

@RichardPK RichardPK Sep 23, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All of these | > / changes are fixing:

  1. | is no longer a valid story hierarchy separator

And so can mostly be ignored to filter the noise. Best way to check these are OK is to run locally and 👀 the component structure

.addDecorator(withKnobs)
.addDecorator(withServicesKnob())
.add('default', () => <<%= packageName %> />, { notes });
2 changes: 1 addition & 1 deletion .yeoman/templates/containers/src/index.stories.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { storiesOf } from '@storybook/react';
import notes from '../README.md';
import <%= packageName %> from './index';

storiesOf('Containers|<%= packageName %>', module)
storiesOf('Containers/<%= packageName %>', module)
.add(
'default',
() => (<<%= packageName %> />),
Expand Down
8 changes: 5 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
<!-- prettier-ignore -->
| Version | Description |
|---------|-------------|

| 2.5.0 | [PR#3728](https://github.com/bbc/psammead/pull/3728) Update Storybook from v5.3.19 to v6.0.22, introducing docs & fix breaking changes |
| 2.4.12 | [PR#3812](https://github.com/bbc/psammead/pull/3812) Removing slack notifications for publishing of packages |
| 2.4.11 | [PR#3809](https://github.com/bbc/psammead/pull/3809) Bumping dependencies - eslint, stylelint, eslint-config-prettier, yargs-parser, browserslist |
| 2.4.10 | [PR#3811](https://github.com/bbc/psammead/pull/3811) Talos - Bump Dependencies - @bbc/psammead-storybook-helpers, @bbc/psammead-styles |
Expand Down Expand Up @@ -238,7 +240,7 @@
| 2.0.0 | [PR#2607](https://github.com/bbc/psammead/pull/2607) Bump dependencies |
| 1.9.2 | [PR#2586](https://github.com/bbc/psammead/pull/2586) Fix a hyperlink in the readme |
| 1.9.1 | [PR#2561](https://github.com/bbc/psammead/pull/2561) Talos - Bump Dependencies - @bbc/psammead-calendars |
| 1.9.0 | [PR#2566](https://github.com/bbc/psammead/pull/2566) Use latest version of NPM and Node.js |
| 1.9.0 | [PR#2566](https://github.com/bbc/psammead/pull/2566) Use latest version of NPM and Node.js |
| 1.8.49 | [PR#2491](https://github.com/bbc/psammead/pull/2491) Bump dependencies |
| 1.8.48 | [PR#2551](https://github.com/bbc/psammead/pull/2551) Talos - Bump Dependencies - @bbc/psammead-image-placeholder, @bbc/psammead-locales, @bbc/psammead-media-indicator |
| 1.8.47 | [PR#2491](https://github.com/bbc/psammead/pull/2491) Add `psammead-most-read` component |
Expand All @@ -254,7 +256,7 @@
| 1.8.37 | [PR#2487](https://github.com/bbc/psammead/pull/2487) Talos - Bump Dependencies - @bbc/psammead-image-placeholder, @bbc/psammead-media-indicator |
| 1.8.36 | [PR#2488](https://github.com/bbc/psammead/pull/2488) Talos - Bump Dependencies - @bbc/gel-foundations |
| 1.8.35 | [PR#2486](https://github.com/bbc/psammead/pull/2486) Talos - Bump Dependencies - @bbc/psammead-assets, @bbc/psammead-brand, @bbc/psammead-caption, @bbc/psammead-copyright, @bbc/psammead-image, @bbc/psammead-image-placeholder, @bbc/psammead-inline-link, @bbc/psammead-media-indicator, @bbc/psammead-paragraph, @bbc/psammead-storybook-helpers, @bbc/psammead-test-helpers, @bbc/psammead-timestamp |
| 1.8.34 | [PR#2433](https://github.com/bbc/psammead/pull/2433) Add script boilerplate for amp js |
| 1.8.34 | [PR#2433](https://github.com/bbc/psammead/pull/2433) Add script boilerplate for amp js |
| 1.8.33 | [PR#2405](https://github.com/bbc/psammead/pull/2405) Remove react-test-renderer |
| 1.8.32 | [PR#2481](https://github.com/bbc/psammead/pull/2481) Updating lerna patch version to fix 10 high vulnerabilities |
| 1.8.31 | [PR#2477](https://github.com/bbc/psammead/pull/2477) Talos - Bump Dependencies - @bbc/psammead-styles |
Expand Down Expand Up @@ -325,7 +327,7 @@
| 1.5.5 | [PR#1935](https://github.com/bbc/psammead/pull/1935) Talos - Bump Dependencies |
| 1.5.4 | [PR#1937](https://github.com/bbc/psammead/pull/1937) Talos - Bump Dependencies |
| 1.5.3 | [PR#1931](https://github.com/bbc/psammead/pull/1931) Talos - Bump Dependencies |
| 1.5.3 | [PR#1849](https://github.com/bbc/psammead/pull/1849) Bump @bbc/psammead-test-helpers `^1.1.1` to `^1.3.0` |
| 1.5.3 | [PR#1849](https://github.com/bbc/psammead/pull/1849) Bump @bbc/psammead-test-helpers `^1.1.1` to `^1.3.0` |
| 1.5.2 | [PR#1751](https://github.com/bbc/psammead/pull/1751) Bump storybook-readme to 5.0.8 from 5.0.6 to fix vulnerability |
| 1.5.1 | [PR#1687](https://github.com/bbc/psammead/pull/1686) Bump psammead package dependencies |
| 1.5.0 | [PR#1682](https://github.com/bbc/psammead/pull/1682) Move all dev dependencies to top level package.json |
Expand Down
Loading