Skip to content

Commit

Permalink
Remove CI Composite Storybook (#171258)
Browse files Browse the repository at this point in the history
## Summary
Closes #160803

This PR removes the `CI Composite` story because it has been broken
since at least ac23dce (and possibly
since b862a6c). The functionality is
covered by the generated `index.html` in
https://github.com/elastic/kibana/blob/dda4498fee84708143ce4671af880db785f9e652/.buildkite/scripts/steps/storybooks/build_and_upload.ts#L105-L120

To fix the composite story requires generating `stories.json` for every
storybook, which requires migrating the repo off the deprecated
`storiesOf` API. That task is quite extensive and would be better
handled alongside an upgrade to Storybook 7.x
  • Loading branch information
Ikuni17 authored Nov 21, 2023
1 parent 043f050 commit 1919c87
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 41 deletions.
7 changes: 1 addition & 6 deletions .buildkite/scripts/steps/storybooks/build_and_upload.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ const STORYBOOKS = [
'canvas',
'cases',
'cell_actions',
'ci_composite',
'cloud_chat',
'coloring',
'chart_icons',
Expand Down Expand Up @@ -93,14 +92,12 @@ const upload = () => {
console.log('--- Generating Storybooks HTML');

process.chdir(path.join('.', 'built_assets', 'storybook'));
fs.renameSync('ci_composite', 'composite');

const storybooks = execSync(`ls -1d */`)
.toString()
.trim()
.split('\n')
.map((filePath) => filePath.replace('/', ''))
.filter((filePath) => filePath !== 'composite');
.map((filePath) => filePath.replace('/', ''));

const listHtml = storybooks
.map((storybook) => `<li><a href="${STORYBOOK_BASE_URL}/${storybook}">${storybook}</a></li>`)
Expand All @@ -110,8 +107,6 @@ const upload = () => {
<html>
<body>
<h1>Storybooks</h1>
<p><a href="${STORYBOOK_BASE_URL}/composite">Composite Storybook</a></p>
<h2>All</h2>
<ul>
${listHtml}
</ul>
Expand Down
34 changes: 0 additions & 34 deletions .ci/.storybook/main.js

This file was deleted.

1 change: 0 additions & 1 deletion src/dev/storybook/aliases.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ export const storybookAliases = {
canvas: 'x-pack/plugins/canvas/storybook',
cases: 'packages/kbn-cases-components/.storybook',
cell_actions: 'packages/kbn-cell-actions/.storybook',
ci_composite: '.ci/.storybook',
cloud_chat: 'x-pack/plugins/cloud_integrations/cloud_chat/.storybook',
coloring: 'packages/kbn-coloring/.storybook',
language_documentation_popover: 'packages/kbn-language-documentation-popover/.storybook',
Expand Down

0 comments on commit 1919c87

Please sign in to comment.