-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Addon-docs: Cache DocsContext on window to prevent duplication #15428
Addon-docs: Cache DocsContext on window to prevent duplication #15428
Conversation
This is intended to solve storybookjs/builder-vite#40 and related issues.
This is pretty ugly but I suppose we can use it if there’s no proper fix in Vite-land? |
I had a little look in Vite and couldn't find a simple solution. So if it's acceptable we could put this in Storybook until we figure out a better way. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works for me... 🤷
…vite Addon-docs: Cache DocsContext on window to prevent duplication
commit 6ddfbc3 Merge: 2efd8b1 58a660a Author: jonniebigodes <joaocontadesenvolvimento@gmail.com> Date: Thu Jul 15 17:26:27 2021 +0100 Merge pull request storybookjs#15594 from doutori/feature/add-unittest-snipet-for-preact [Documentation] Add an unit test snipet for preact commit 2efd8b1 Author: Michael Shilman <michael@lab80.co> Date: Thu Jul 15 20:56:24 2021 +0800 v6.4.0-alpha.17 commit 20105ab Author: Michael Shilman <michael@lab80.co> Date: Thu Jul 15 15:13:10 2021 +0800 Update root, peer deps, version.ts/json to 6.4.0-alpha.17 [ci skip] commit df749c6 Author: Michael Shilman <michael@lab80.co> Date: Thu Jul 15 15:12:54 2021 +0800 6.4.0-alpha.17 changelog commit 22be2a4 Merge: e9d7d75 8155e2b Author: Michael Shilman <shilman@users.noreply.github.com> Date: Thu Jul 15 15:10:04 2021 +0800 Merge pull request storybookjs#15592 from storybookjs/feat/export-base-story-types Types: Export BaseStoryFn and BaseStoryObject commit 58a660a Author: Hiroaki Sasaki <sasaki-hiroaki@dmm.com> Date: Thu Jul 15 13:04:24 2021 +0900 Add an unit test snipet of preact commit 8155e2b Author: Yann Braga <yannbf@gmail.com> Date: Thu Jul 15 01:14:00 2021 +0200 types: export BaseStoryFn and BaseStoryObject These types could be needed by other libraries in order to do proper inferring or typecasting commit e9d7d75 Merge: dc390b8 d787f58 Author: jonniebigodes <joaocontadesenvolvimento@gmail.com> Date: Wed Jul 14 16:49:03 2021 +0100 Merge pull request storybookjs#15528 from storybookjs/chore_updates_build_pages_docs Chore: (Docs) Polish the Workflows-Build pages documentation commit d787f58 Author: Michael Shilman <shilman@users.noreply.github.com> Date: Wed Jul 14 12:19:44 2021 +0800 Update docs/workflows/build-pages-with-storybook.md commit dc390b8 Merge: 6846b64 f5295a2 Author: Michael Shilman <shilman@users.noreply.github.com> Date: Wed Jul 14 12:11:39 2021 +0800 Merge pull request storybookjs#14439 from bart-krakowski/colorpalette_transparency_grid Addon-docs: Add transparency support to color swatch commit f5295a2 Author: Bartłomiej Krakowski <48633090+bart-krakowski@users.noreply.github.com> Date: Tue Jul 13 22:21:24 2021 +0200 fix: added the background-clip property commit 6846b64 Merge: 29b50a7 f9b837e Author: jonniebigodes <joaocontadesenvolvimento@gmail.com> Date: Tue Jul 13 20:37:36 2021 +0100 Merge pull request storybookjs#15568 from storybookjs/fix_toolbars_docs Chore:(Docs) Fix toolbar docs with better examples and minor polish commit f9b837e Author: jonniebigodes <joaocontadesenvolvimento@gmail.com> Date: Tue Jul 13 20:14:31 2021 +0100 fix toolbar docs with better examples and minor polish commit 0f5569e Author: jonniebigodes <joaocontadesenvolvimento@gmail.com> Date: Tue Jul 13 19:20:57 2021 +0100 polish documentation based on feedback commit 29b50a7 Author: Michael Shilman <michael@lab80.co> Date: Tue Jul 13 23:42:30 2021 +0800 6.4.0-alpha.16 next.json version file commit 8a8a4e6 Author: Michael Shilman <michael@lab80.co> Date: Tue Jul 13 23:40:01 2021 +0800 Update git head to 6.4.0-alpha.16, update yarn.lock commit 3afa39c Author: Michael Shilman <michael@lab80.co> Date: Tue Jul 13 23:34:17 2021 +0800 v6.4.0-alpha.16 commit a0c8f43 Author: Michael Shilman <michael@lab80.co> Date: Tue Jul 13 23:19:25 2021 +0800 Update root, peer deps, version.ts/json to 6.4.0-alpha.16 [ci skip] commit 57c2b6b Author: Michael Shilman <michael@lab80.co> Date: Tue Jul 13 23:19:00 2021 +0800 6.4.0-alpha.16 changelog commit 8f57aa8 Merge: c399d5e ced6aba Author: Michael Shilman <shilman@users.noreply.github.com> Date: Tue Jul 13 23:13:05 2021 +0800 Merge pull request storybookjs#15563 from storybookjs/fix/angular-actions-argtype Angular: Fix actions argType auto generation commit c399d5e Merge: 783cfd3 6db035b Author: Michael Shilman <shilman@users.noreply.github.com> Date: Tue Jul 13 23:11:23 2021 +0800 Merge pull request storybookjs#13711 from storybookjs/feature/remove-animation-backgrounds-a11y Addon-backgrounds: Respect user's reduced motion settings commit 783cfd3 Merge: c88e0aa 0a65ecb Author: Michael Shilman <shilman@users.noreply.github.com> Date: Tue Jul 13 23:01:39 2021 +0800 Merge pull request storybookjs#15561 from neilbryson/fix_broken_link [Documentation : Configure Addons] fix broken link to withRoundTrip example commit ced6aba Author: Yann Braga <yannbf@gmail.com> Date: Tue Jul 13 16:18:20 2021 +0200 fix(angular): fix actions argType auto generation - The order in the sections matters because properties are overriden commit c88e0aa Merge: 085e86c 07c3053 Author: Michael Shilman <shilman@users.noreply.github.com> Date: Tue Jul 13 22:03:02 2021 +0800 Merge pull request storybookjs#15558 from storybookjs/feat/csf3-types CSF: Add CSF3 typings commit 07c3053 Author: Yann Braga <yannbf@gmail.com> Date: Tue Jul 13 11:01:18 2021 +0200 feat(types): make meta title optional commit 0b850ae Author: Yann Braga <yannbf@gmail.com> Date: Tue Jul 13 10:42:00 2021 +0200 chore: use story types in CSF3 example commit 70888b3 Author: Yann Braga <yannbf@gmail.com> Date: Tue Jul 13 10:34:27 2021 +0200 Update lib/addons/src/types.ts commit 085e86c Author: Michael Shilman <michael@lab80.co> Date: Tue Jul 13 10:33:59 2021 +0800 6.4.0-alpha.15 next.json version file commit c89b2b0 Author: Michael Shilman <michael@lab80.co> Date: Tue Jul 13 10:30:50 2021 +0800 Update git head to 6.4.0-alpha.15, update yarn.lock commit 9385c45 Author: Michael Shilman <michael@lab80.co> Date: Tue Jul 13 10:25:02 2021 +0800 v6.4.0-alpha.15 commit 5251798 Author: Michael Shilman <michael@lab80.co> Date: Tue Jul 13 10:12:23 2021 +0800 Update root, peer deps, version.ts/json to 6.4.0-alpha.15 [ci skip] commit b606f0d Author: Michael Shilman <michael@lab80.co> Date: Tue Jul 13 10:11:46 2021 +0800 6.4.0-alpha.15 changelog commit b00cb05 Merge: 49e1327 75bf6ec Author: Michael Shilman <shilman@users.noreply.github.com> Date: Tue Jul 13 10:10:04 2021 +0800 Merge pull request storybookjs#15557 from mayank99/patch-1 Update MIGRATION.md to clarify default values inference commit 75bf6ec Author: Michael Shilman <michael@lab80.co> Date: Tue Jul 13 10:09:15 2021 +0800 Fix TOC commit 42fca03 Author: Michael Shilman <shilman@users.noreply.github.com> Date: Tue Jul 13 09:57:25 2021 +0800 Update lib/addons/src/types.ts commit 49e1327 Merge: 5085073 2ac6d8a Author: Michael Shilman <shilman@users.noreply.github.com> Date: Tue Jul 13 09:54:12 2021 +0800 Merge pull request storybookjs#15549 from storybookjs/fix/controls-color-matcher Controls: Fix color matching behavior for non-string types commit 5085073 Merge: e7a0016 c3ea5c7 Author: Michael Shilman <shilman@users.noreply.github.com> Date: Tue Jul 13 09:49:03 2021 +0800 Merge pull request storybookjs#15556 from storybookjs/fix-ci Build: Fix `publish` step on CircleCI commit e7a0016 Merge: 9ab0618 8ad7c83 Author: Michael Shilman <shilman@users.noreply.github.com> Date: Tue Jul 13 09:45:04 2021 +0800 Merge pull request storybookjs#12155 from mattdarveniza/mdx-argstable-stories Add example codesnippet for using ArgsTable with stories commit 0a65ecb Author: Neil Bryson Cargamento <neilbryson@users.noreply.github.com> Date: Tue Jul 13 09:41:08 2021 +0800 fix broken link to withRoundTrip example commit 8ad7c83 Merge: 63555fc 9ab0618 Author: Matt Darveniza <matt.darveniza@biarri.com> Date: Tue Jul 13 10:49:06 2021 +1000 Merge branch 'next' of https://github.com/storybookjs/storybook into mdx-argstable-stories commit 63555fc Author: Matt Darveniza <matt.darveniza@biarri.com> Date: Tue Jul 13 10:46:57 2021 +1000 fix import in example commit 8040589 Author: Yann Braga <yannbf@gmail.com> Date: Tue Jul 13 01:02:56 2021 +0200 feat(types): add CSF3 typings - Support object notation - Render function - Play function commit c3ea5c7 Author: Yann Braga <yannbf@gmail.com> Date: Mon Jul 12 23:48:16 2021 +0200 fix(angular): update argTypes test snapshots - following the changes of ff483f6 commit ff483f6 Author: Yann Braga <yannbf@gmail.com> Date: Mon Jul 12 23:12:23 2021 +0200 fix(angular): extract type from compodoc propertiesClass - An update has been released in compodoc 1.1.12 which changed how the componentData is filled. Now the propertiesClass is filled together with inputClass so the check has to be updated commit 983ce9c Author: Gaëtan Maisse <gaetanmaisse@gmail.com> Date: Mon Jul 12 21:38:33 2021 +0200 chore: improve the way Cypress records are handled as CircleCI artefacts commit c9552b6 Author: Mayank <9084735+mayank99@users.noreply.github.com> Date: Mon Jul 12 14:56:09 2021 -0400 Update MIGRATION.md commit 17e026f Author: Gaëtan Maisse <gaetanmaisse@gmail.com> Date: Mon Jul 12 20:49:55 2021 +0200 chore: fix Verdaccio config for addon-measure commit ce37c7e Author: Bartłomiej Krakowski <bartlomiej@krakowski.dev> Date: Mon Jul 12 20:35:49 2021 +0200 revert: removed isTransparent prop commit 6db035b Author: Yann Braga <yannbf@gmail.com> Date: Fri Jan 22 18:31:20 2021 +0100 feat(addon-backgrounds): reduced motion disables transition - addon backgrounds should respect the user's configuration - so it disables transition transition animation when requested commit 9ab0618 Merge: e4e32bb b327433 Author: Michael Shilman <shilman@users.noreply.github.com> Date: Mon Jul 12 23:39:17 2021 +0800 Merge pull request storybookjs#15546 from storybookjs/examples/add-no-manager-cache Examples: Add no-manager-cache to all examples commit e4e32bb Merge: 90895b2 7dc255b Author: Michael Shilman <shilman@users.noreply.github.com> Date: Mon Jul 12 23:39:00 2021 +0800 Merge pull request storybookjs#15529 from storybookjs/docs/document-webpack-instance Document webpack instance in presets commit 90895b2 Merge: e8e4ca7 c65d1c2 Author: jonniebigodes <joaocontadesenvolvimento@gmail.com> Date: Mon Jul 12 15:23:55 2021 +0100 Merge pull request storybookjs#15550 from przmv/patch-1 Adding information on Angular app creation commit c65d1c2 Author: Petr Razumov <p@rzmv.cc> Date: Mon Jul 12 13:05:15 2021 +0300 Adding information on Angular app creation commit e8e4ca7 Merge: 01555f7 a46a056 Author: Michael Shilman <shilman@users.noreply.github.com> Date: Mon Jul 12 11:49:19 2021 +0800 Merge pull request storybookjs#15449 from Nazeeh21/my-first-storybook-contribution UI: Fix toggle button for custom theming commit a46a056 Merge: 1e5424a 01555f7 Author: Michael Shilman <michael@lab80.co> Date: Mon Jul 12 11:39:09 2021 +0800 Merge branch 'next' into pr/15449 commit 01555f7 Merge: 79950a9 64e99bc Author: Michael Shilman <shilman@users.noreply.github.com> Date: Mon Jul 12 10:08:45 2021 +0800 Merge pull request storybookjs#15540 from koba04/patch-3 docs: update the command to update the snapshot commit 79950a9 Merge: 1bd9907 a0abeb3 Author: Michael Shilman <shilman@users.noreply.github.com> Date: Mon Jul 12 10:05:57 2021 +0800 Merge pull request storybookjs#15533 from storybookjs/15510-example-mdx-embed-object-story Official-storybook: Add example of embedding story object in MDX commit 2ac6d8a Author: Yann Braga <yannbf@gmail.com> Date: Sun Jul 11 20:44:36 2021 +0200 fix(controls): use correct assertion for color type commit 1bd9907 Author: Michael Shilman <michael@lab80.co> Date: Sun Jul 11 03:18:32 2021 +0800 6.4.0-alpha.14 next.json version file commit 6daa716 Author: Michael Shilman <michael@lab80.co> Date: Sun Jul 11 03:15:36 2021 +0800 Update git head to 6.4.0-alpha.14, update yarn.lock commit d3f8b51 Author: Michael Shilman <michael@lab80.co> Date: Sun Jul 11 03:10:46 2021 +0800 v6.4.0-alpha.14 commit 4d4fe97 Author: Michael Shilman <michael@lab80.co> Date: Sun Jul 11 03:01:43 2021 +0800 Update root, peer deps, version.ts/json to 6.4.0-alpha.14 [ci skip] commit f18ac7c Author: Michael Shilman <michael@lab80.co> Date: Sun Jul 11 03:01:21 2021 +0800 6.4.0-alpha.14 changelog commit 31e3ad8 Merge: f6c296c 9a5dccd Author: Michael Shilman <shilman@users.noreply.github.com> Date: Sun Jul 11 02:59:45 2021 +0800 Merge pull request storybookjs#15337 from bennypowers/patch-1 Web-components: Dynamic source snippets commit 9a5dccd Author: Benny Powers <web@bennypowers.com> Date: Sat Jul 10 21:31:23 2021 +0300 fix(addons): webcomponents excludeDecorators commit b327433 Author: Michael Shilman <michael@lab80.co> Date: Sat Jul 10 22:04:54 2021 +0800 Examples: Add no-manager-cache to all examples commit f6c296c Merge: 1dccc27 c165b36 Author: Michael Shilman <shilman@users.noreply.github.com> Date: Sat Jul 10 20:03:23 2021 +0800 Merge pull request storybookjs#15545 from storybookjs/bring-mesure-addon-to-monorepo Essentials: Add measure addon to monorepo commit c165b36 Author: Michael Shilman <michael@lab80.co> Date: Sat Jul 10 19:26:27 2021 +0800 Add measure to package/nx/workspace.json & update snapshots commit 080f1b2 Author: winkerVSbecks <varunvachhar@gmail.com> Date: Fri Jul 9 18:13:30 2021 -0400 Add measure addon to monorepo and update version to match other addons commit 64e99bc Author: Toru Kobayashi <koba0004@gmail.com> Date: Sat Jul 10 01:12:18 2021 +0900 docs: update the command to update the snapshot commit 1e5424a Merge: 43224db 1dccc27 Author: Nazeeh Vahora <nazeehvahora.786@gmail.com> Date: Fri Jul 9 13:56:12 2021 +0530 Merge branch 'storybookjs:next' into my-first-storybook-contribution commit 43224db Author: Nazeeh2000 <nazeehvahora.786@gmail.com> Date: Fri Jul 9 13:54:31 2021 +0530 Implement suggested changes commit 1dccc27 Merge: dc78ef4 b74d49d Author: Michael Shilman <shilman@users.noreply.github.com> Date: Fri Jul 9 16:17:50 2021 +0800 Merge pull request storybookjs#15535 from evancharlton/patch-1 chore: Fix a typo commit b74d49d Author: Evan Charlton <evancharlton@microsoft.com> Date: Fri Jul 9 09:59:44 2021 +0200 chore: Fix a typo Just a small misspelling: `serverely` -> `severely` commit dc78ef4 Author: Michael Shilman <michael@lab80.co> Date: Fri Jul 9 15:41:35 2021 +0800 6.4.0-alpha.13 next.json version file commit ebb05e3 Author: Michael Shilman <michael@lab80.co> Date: Fri Jul 9 15:38:51 2021 +0800 Update git head to 6.4.0-alpha.13, update yarn.lock commit c346207 Merge: a61c50e 70d0449 Author: Nazeeh Vahora <nazeehvahora.786@gmail.com> Date: Fri Jul 9 13:01:47 2021 +0530 Merge branch 'storybookjs:next' into my-first-storybook-contribution commit 70d0449 Author: Michael Shilman <michael@lab80.co> Date: Fri Jul 9 15:31:29 2021 +0800 v6.4.0-alpha.13 commit 1581451 Author: Michael Shilman <michael@lab80.co> Date: Fri Jul 9 15:21:05 2021 +0800 Update root, peer deps, version.ts/json to 6.4.0-alpha.13 [ci skip] commit 11269f4 Author: Michael Shilman <michael@lab80.co> Date: Fri Jul 9 15:20:38 2021 +0800 6.4.0-alpha.13 changelog commit cfc23ec Merge: c884f2e ca14dcf Author: Michael Shilman <shilman@users.noreply.github.com> Date: Fri Jul 9 15:19:00 2021 +0800 Merge pull request storybookjs#15526 from storybookjs/bring-outline-addons-to-monorepo Essentials: Add outline addon to monorepo commit c884f2e Merge: a24616a 9db2e2b Author: Michael Shilman <shilman@users.noreply.github.com> Date: Fri Jul 9 14:51:47 2021 +0800 Merge pull request storybookjs#15501 from dexster/Allow_duplicate_stories Addon-docs/Angular: Add unique id to Angular stories commit a0abeb3 Author: Michael Shilman <michael@lab80.co> Date: Fri Jul 9 14:35:52 2021 +0800 Official-storybook: Add example of embedding story object in MDX commit a24616a Merge: 4ddb363 0d54d34 Author: Michael Shilman <shilman@users.noreply.github.com> Date: Fri Jul 9 14:21:05 2021 +0800 Merge pull request storybookjs#15527 from dexster/Composition_order Composition: Fix refs ordering commit 0d54d34 Author: Brett Upton <brett.upton@standardbank.co.za> Date: Fri Jul 9 08:06:31 2021 +0200 Changed composition titles commit 12a3492 Author: Brett Upton <brett.upton@standardbank.co.za> Date: Fri Jul 9 08:02:20 2021 +0200 Moved composition into an existing example project commit ca14dcf Author: Michael Shilman <michael@lab80.co> Date: Fri Jul 9 12:44:18 2021 +0800 Update snapshots commit a9e4516 Author: Michael Shilman <michael@lab80.co> Date: Fri Jul 9 11:47:54 2021 +0800 Add addon-outline to yarn/nx bureaucracy commit 7dc255b Author: Michael Shilman <michael@lab80.co> Date: Fri Jul 9 11:11:31 2021 +0800 Document webpack instance in presets commit 8c1a3e6 Author: Brett Upton <brett.upton@standardbank.co.za> Date: Fri Jul 9 00:22:20 2021 +0200 Fix Storybook composition order commit 4ddb363 Merge: f2b55b6 eb72096 Author: jonniebigodes <joaocontadesenvolvimento@gmail.com> Date: Thu Jul 8 23:22:01 2021 +0100 Merge pull request storybookjs#15478 from kwhsiung/patch-1 docs: add missing space commit da46fc4 Author: Brett Upton <brett.upton@standardbank.co.za> Date: Fri Jul 9 00:09:05 2021 +0200 Fix Storybook composition order commit 77d0ee8 Author: winkerVSbecks <varunvachhar@gmail.com> Date: Thu Jul 8 18:01:50 2021 -0400 Add outline addon to monorepo and rename package to @storybook/addon-outline commit e58e670 Author: jonniebigodes <joaocontadesenvolvimento@gmail.com> Date: Thu Jul 8 22:46:28 2021 +0100 msw addon documentation commit f2b55b6 Merge: f605419 f7d3472 Author: Gaëtan Maisse <gaetanmaisse@gmail.com> Date: Thu Jul 8 19:22:29 2021 +0200 Merge pull request storybookjs#15523 from oscard0m/bump-setup-node-version-to-v2 Build: Fix cache setup in GitHub Actions workflow commit a1d0785 Author: Bartłomiej Krakowski <bartlomiej@krakowski.dev> Date: Thu Jul 8 19:13:01 2021 +0200 fix: removed unused props commit 8f2e209 Author: Bartłomiej Krakowski <bartlomiej@krakowski.dev> Date: Thu Jul 8 19:04:05 2021 +0200 fix: moved background pattern to parent commit f7d3472 Author: Oscar Dominguez <dominguez.celada@gmail.com> Date: Thu Jul 8 18:35:14 2021 +0200 ci(workflow): moved up acions/checkout step in 'test-unit.yml' commit 2c47a6e Author: Benny Powers <web@bennypowers.com> Date: Thu Jul 8 19:34:58 2021 +0300 docs(web-components): set attributes in example story commit f37c15c Author: Oscar Dominguez <dominguez.celada@gmail.com> Date: Thu Jul 8 18:33:34 2021 +0200 ci(workflow): bump setup-node to v2 in 'tests-unit.yml' commit 5590c2c Merge: 2da73c2 726b124 Author: Bartłomiej Krakowski <bartlomiej@krakowski.dev> Date: Thu Jul 8 18:02:00 2021 +0200 Merge branch 'colorpalette_transparency_grid' of github.com:bart-krakowski/storybook into colorpalette_transparency_grid commit 2da73c2 Author: Bartłomiej Krakowski <bartlomiej@krakowski.dev> Date: Thu Jul 8 17:55:43 2021 +0200 fix: changed pattern in the background and updated examples of usage commit 726b124 Author: Bartłomiej Krakowski <bartlomiej@krakowski.dev> Date: Thu Jul 8 17:55:43 2021 +0200 fix: change pattern in the background and examples examples of usage commit f605419 Author: Michael Shilman <michael@lab80.co> Date: Thu Jul 8 23:07:49 2021 +0800 6.3.4 changelog commit 0448db2 Author: Michael Shilman <michael@lab80.co> Date: Thu Jul 8 10:46:24 2021 +0800 6.3.3 changelog commit 6873d35 Merge: 580522d 946b414 Author: jonniebigodes <joaocontadesenvolvimento@gmail.com> Date: Wed Jul 7 14:41:09 2021 +0100 Merge pull request storybookjs#15504 from eins78/patch-1 docs: fix typo in snippet storybook-preview-configure-globaltypes.js.mdx commit 580522d Author: Michael Shilman <michael@lab80.co> Date: Wed Jul 7 18:23:21 2021 +0800 6.4.0-alpha.12 next.json version file commit cd98b1c Author: Michael Shilman <michael@lab80.co> Date: Wed Jul 7 18:17:06 2021 +0800 Update git head to 6.4.0-alpha.12, update yarn.lock commit 417958f Author: Michael Shilman <michael@lab80.co> Date: Wed Jul 7 18:11:49 2021 +0800 v6.4.0-alpha.12 commit 0f8236d Author: Michael Shilman <michael@lab80.co> Date: Wed Jul 7 18:00:38 2021 +0800 Update root, peer deps, version.ts/json to 6.4.0-alpha.12 [ci skip] commit f936e8f Author: Michael Shilman <michael@lab80.co> Date: Wed Jul 7 18:00:19 2021 +0800 6.4.0-alpha.12 changelog commit d1cb169 Merge: 0589f5b 67ee40b Author: Michael Shilman <shilman@users.noreply.github.com> Date: Wed Jul 7 17:52:30 2021 +0800 Merge pull request storybookjs#15280 from storybookjs/angular/ngcc-example Angular: Make Ivy work by default in the angular-cli example commit 0589f5b Merge: d139f75 9389325 Author: Michael Shilman <shilman@users.noreply.github.com> Date: Wed Jul 7 17:46:39 2021 +0800 Merge pull request storybookjs#15483 from storybookjs/fix/15227-storybook-hangs-on-angular Webpack5: Quit process after finishing a static build commit 946b414 Author: Max Albrecht <max.albrecht@zhdk.ch> Date: Wed Jul 7 10:29:13 2021 +0200 docs: fix typo in snippet storybook-preview-configure-globaltypes.js.mdx commit 9389325 Author: Juho Vepsäläinen <bebraw@gmail.com> Date: Wed Jul 7 10:22:06 2021 +0300 fix: Remember to close webpack compiler It looks like this is the right way to go instead of `process.exit`. commit 9db2e2b Author: Brett Upton <brett.upton@standardbank.co.za> Date: Wed Jul 7 09:18:39 2021 +0200 Added unique id to stories commit d139f75 Author: Michael Shilman <michael@lab80.co> Date: Wed Jul 7 11:30:30 2021 +0800 Cleanup commit 4166959 Merge: 52064d9 fd563b4 Author: Michael Shilman <shilman@users.noreply.github.com> Date: Wed Jul 7 09:44:46 2021 +0800 Merge pull request storybookjs#15497 from storybookjs/fix/a11y-package-readme Addon-a11y: Fix package.json README link commit fd563b4 Author: Michael Shilman <michael@lab80.co> Date: Wed Jul 7 09:24:50 2021 +0800 Update master => main in package.json commit 8bd1275 Author: Michael Shilman <michael@lab80.co> Date: Wed Jul 7 09:24:28 2021 +0800 Addon-a11y: Fix package.json README link commit 52064d9 Merge: b6bf34a 0453d31 Author: jonniebigodes <joaocontadesenvolvimento@gmail.com> Date: Tue Jul 6 20:54:08 2021 +0100 Merge pull request storybookjs#15496 from storybookjs/fix_theming_docs Chore: (Docs) Minor adjustments to the theming docs commit 0453d31 Author: jonniebigodes <joaocontadesenvolvimento@gmail.com> Date: Tue Jul 6 20:41:47 2021 +0100 minor adjustments to the theming docs commit b6bf34a Merge: 52623ee 799da77 Author: Michael Shilman <shilman@users.noreply.github.com> Date: Tue Jul 6 23:55:42 2021 +0800 Merge pull request storybookjs#15489 from storybookjs/fix-official-storybook-locale-previous-shortcut fix: shortcut for navigating to previous language in official-storybook example commit 67ee40b Author: ThibaudAv <thibaud.avenier@gmail.com> Date: Thu Jun 17 13:57:44 2021 +0200 chore(angular): add ngcc postinstall for angular-cli example change all angular storyshot because is now generated with ivy 🤔 commit e2d34ea Author: Benny Powers <web@bennypowers.com> Date: Tue Jul 6 15:24:30 2021 +0300 style(addons): remove null check commit e395fff Author: Benny Powers <web@bennypowers.com> Date: Tue Jul 6 15:14:31 2021 +0300 fix(addons): webcomponents transformSource commit 52623ee Merge: 76d155e 45ddb57 Author: Michael Shilman <shilman@users.noreply.github.com> Date: Tue Jul 6 20:00:23 2021 +0800 Merge pull request storybookjs#7848 from storybookjs/tech/add-docs-to-standalone Addon-docs: Add docs to standalone example commit 45ddb57 Author: Michael Shilman <michael@lab80.co> Date: Tue Jul 6 19:15:22 2021 +0800 Update yarn.lock commit 7fc90b0 Author: Michael Shilman <michael@lab80.co> Date: Tue Jul 6 19:11:13 2021 +0800 Update DocsPage demo to latest commit 2a11c56 Merge: cdaf6f0 76d155e Author: Michael Shilman <michael@lab80.co> Date: Tue Jul 6 19:00:41 2021 +0800 Merge branch 'next' into tech/add-docs-to-standalone commit 76d155e Merge: 209cdac 5347593 Author: Michael Shilman <shilman@users.noreply.github.com> Date: Tue Jul 6 18:32:12 2021 +0800 Merge pull request storybookjs#15491 from stefan-schweiger/15490-numeric-default-value Addon-docs/Angular: Fix numeric args default value handling commit 65e7803 Author: Michael Shilman <michael@lab80.co> Date: Tue Jul 6 18:09:59 2021 +0800 Fix jest with lit-html ESM commit 3fd64f9 Merge: d1039bc 209cdac Author: Michael Shilman <michael@lab80.co> Date: Tue Jul 6 17:15:01 2021 +0800 Merge branch 'next' into pr/15337 commit 5347593 Author: stefan-schweiger <staeff@me.com> Date: Tue Jul 6 11:05:34 2021 +0200 Fixed numeric default value not working correctly commit 209cdac Merge: 606327e e673030 Author: Michael Shilman <shilman@users.noreply.github.com> Date: Tue Jul 6 09:58:56 2021 +0800 Merge pull request storybookjs#15470 from storybookjs/chore_loader_docs_updates Chore: (Docs) Updates the loader docs commit 799da77 Author: Deen Denno <darleendenno@gmail.com> Date: Mon Jul 5 18:01:56 2021 -0500 fix: shortcut for navigating to previous language in official-storybook example commit 606327e Merge: 818ea94 40c5f66 Author: Gaëtan Maisse <gaetanmaisse@gmail.com> Date: Mon Jul 5 20:26:11 2021 +0200 Merge pull request storybookjs#15480 from oscard0m/add-cache-to-node-workflows Build: Update Yarn cache setup in GitHub Actions workflow commit e673030 Author: jonniebigodes <joaocontadesenvolvimento@gmail.com> Date: Mon Jul 5 19:19:35 2021 +0100 address feedback commit 40c5f66 Author: Oscar Dominguez <dominguez.celada@gmail.com> Date: Mon Jul 5 13:29:11 2021 +0200 ci(workflow): remove previous cache step commit 4fc9204 Author: Oscar Dominguez <dominguez.celada@gmail.com> Date: Mon Jul 5 13:27:25 2021 +0200 fix(workflow): this workflow uses yarn cache commit 4e1bd0d Author: Juho Vepsäläinen <bebraw@gmail.com> Date: Mon Jul 5 14:27:02 2021 +0300 fix(angular): Quit process after finishing a static build I don't understand why `process.exit` is needed for this particular case but it seems to fix the issue. In order to be more safe, I also added a `try`/`catch` and in my own testing that caught a ngcc locking issue I would have missed otherwise. Closes storybookjs#15227. commit 818ea94 Merge: 4bd2fc9 790dd94 Author: Michael Shilman <shilman@users.noreply.github.com> Date: Mon Jul 5 18:16:57 2021 +0800 Merge pull request storybookjs#15482 from storybookjs/docs/clarify-webpack5-migration Migration: Add webpack@5 hoisting instructions commit 790dd94 Author: Michael Shilman <michael@lab80.co> Date: Mon Jul 5 18:15:49 2021 +0800 Migration: Add webpack@5 hoisting instructions commit 310f9e6 Author: Bartłomiej Krakowski <bartlomiej@krakowski.dev> Date: Mon Jul 5 11:21:03 2021 +0200 fix: added the missing property commit 16442f0 Merge: af6136c 4bd2fc9 Author: Bartłomiej Krakowski <48633090+bart-krakowski@users.noreply.github.com> Date: Mon Jul 5 11:06:30 2021 +0200 Merge branch 'next' into colorpalette_transparency_grid commit 0b3ddb6 Author: Oscar Dominguez <dominguez.celada@gmail.com> Date: Mon Jul 5 01:25:40 2021 +0200 ci(workflow): add 'npm' cache for actions/setup-node in .github/workflows commit eb72096 Author: Kai-Wen, Hsiung <kaiwenhsiung@gmail.com> Date: Sun Jul 4 20:12:47 2021 +0800 Add missing space I've found a missing space between "or" and "CSF" of the paragraph "It will look for any stories available either in MDX or CSF and based on the documentation you've added it will display it..." commit 5715718 Author: jonniebigodes <joaocontadesenvolvimento@gmail.com> Date: Fri Jul 2 21:29:08 2021 +0100 updates the loader docs commit 4bd2fc9 Author: Michael Shilman <michael@lab80.co> Date: Sat Jul 3 03:47:19 2021 +0800 6.4.0-alpha.11 next.json version file commit b2810df Author: Michael Shilman <michael@lab80.co> Date: Sat Jul 3 03:44:22 2021 +0800 Update git head to 6.4.0-alpha.11, update yarn.lock commit 52cc8f0 Author: Michael Shilman <michael@lab80.co> Date: Sat Jul 3 03:39:35 2021 +0800 v6.4.0-alpha.11 commit fed66a3 Author: Michael Shilman <michael@lab80.co> Date: Sat Jul 3 03:30:08 2021 +0800 Update root, peer deps, version.ts/json to 6.4.0-alpha.11 [ci skip] commit 165a360 Author: Michael Shilman <michael@lab80.co> Date: Sat Jul 3 03:29:53 2021 +0800 6.4.0-alpha.11 changelog commit 2cfdb17 Merge: a41d60e 90f6c79 Author: Michael Shilman <shilman@users.noreply.github.com> Date: Sat Jul 3 03:26:21 2021 +0800 Merge pull request storybookjs#15468 from storybookjs/fix/broken-links Fix misc broken links commit 90f6c79 Author: Michael Shilman <michael@lab80.co> Date: Sat Jul 3 03:25:25 2021 +0800 Fix misc broken links commit a41d60e Merge: f929ef5 a676462 Author: Michael Shilman <shilman@users.noreply.github.com> Date: Sat Jul 3 03:18:57 2021 +0800 Merge pull request storybookjs#15466 from jeshwan/feat/a11y-addon-reverse-label-description-content Addon-a11y: Reverse help and description labels in accordion commit f929ef5 Merge: 79d10cd 7c0170a Author: Michael Shilman <shilman@users.noreply.github.com> Date: Sat Jul 3 03:07:07 2021 +0800 Merge pull request storybookjs#15459 from storybookjs/fix/sidebar-toggle-fullscreen UI: Fix sidebar toggle in fullscreen mode commit 79d10cd Merge: 913ae3b 5debe71 Author: Michael Shilman <shilman@users.noreply.github.com> Date: Sat Jul 3 01:27:48 2021 +0800 Merge pull request storybookjs#15456 from PiDelport/patch-1 typo(cli): fix error message (yarn → npm) commit 913ae3b Merge: 5096004 477eec5 Author: Michael Shilman <shilman@users.noreply.github.com> Date: Sat Jul 3 01:26:49 2021 +0800 Merge pull request storybookjs#15410 from Marklb/marklb/fix-circular-ref-in-module-metadata Angular: Fix circular reference not being handled in moduleMetadata commit a676462 Merge: cad1bf7 5096004 Author: Jeshwan Khoodeeram <78091708+jeshwan@users.noreply.github.com> Date: Fri Jul 2 18:46:51 2021 +0400 Merge branch 'storybookjs:next' into feat/a11y-addon-reverse-label-description-content commit 5096004 Merge: 051a42e b7f47e9 Author: jonniebigodes <joaocontadesenvolvimento@gmail.com> Date: Fri Jul 2 15:24:30 2021 +0100 Merge pull request storybookjs#15405 from storybookjs/fix_react_snippets Chore: (Docs snippets) Updates for jsx and tsx support commit cad1bf7 Author: Jeshwan Khoodeeram <jeshwankhoodeeram@gmail.com> Date: Fri Jul 2 18:14:38 2021 +0400 a11y addon: Reverse help and description content in Accordion commit 051a42e Author: Michael Shilman <michael@lab80.co> Date: Fri Jul 2 19:49:03 2021 +0800 6.4.0-alpha.10 next.json version file commit a0943ac Author: Michael Shilman <michael@lab80.co> Date: Fri Jul 2 19:47:12 2021 +0800 Update git head to 6.4.0-alpha.10, update yarn.lock commit 1b43aa7 Author: Michael Shilman <michael@lab80.co> Date: Fri Jul 2 19:42:20 2021 +0800 v6.4.0-alpha.10 commit 028faaa Author: Michael Shilman <michael@lab80.co> Date: Fri Jul 2 19:33:28 2021 +0800 Update root, peer deps, version.ts/json to 6.4.0-alpha.10 [ci skip] commit 8b5109a Author: Michael Shilman <michael@lab80.co> Date: Fri Jul 2 19:33:14 2021 +0800 6.4.0-alpha.10 changelog commit f0dd576 Merge: 4eefcdf 9e044fc Author: Michael Shilman <shilman@users.noreply.github.com> Date: Fri Jul 2 19:32:27 2021 +0800 Merge pull request storybookjs#15372 from 7rulnik/default-aggregate-timeout Core: Fix double rebuilds by removing aggregateTimeout commit 4eefcdf Merge: a0fc009 a1d10a5 Author: Michael Shilman <shilman@users.noreply.github.com> Date: Fri Jul 2 17:19:30 2021 +0800 Merge pull request storybookjs#15428 from eirslett/fix/multiple-docs-context-in-vite Addon-docs: Cache DocsContext on window to prevent duplication commit a0fc009 Merge: c74836d 938c398 Author: Michael Shilman <shilman@users.noreply.github.com> Date: Fri Jul 2 16:42:13 2021 +0800 Merge pull request storybookjs#15461 from storybookjs/fix/npm-typo CLI: Fix NPM typo commit 938c398 Author: Michael Shilman <michael@lab80.co> Date: Fri Jul 2 16:39:25 2021 +0800 CLI: Fix NPM typo commit 7c0170a Author: Yann Braga <yannbf@gmail.com> Date: Thu Jul 1 21:40:27 2021 +0200 fix(sidebar): toggle sidebar when in fullscreen mode commit 5debe71 Author: Pi Delport <pjdelport@gmail.com> Date: Thu Jul 1 17:22:37 2021 +0200 typo(cli): fix error message (yarn → npm) commit a61c50e Merge: 93dc1e9 c74836d Author: Nazeeh Vahora <nazeehvahora.786@gmail.com> Date: Thu Jul 1 01:35:22 2021 +0530 Merge branch 'storybookjs:next' into my-first-storybook-contribution commit 93dc1e9 Author: Nazeeh2000 <nazeehvahora.786@gmail.com> Date: Thu Jul 1 01:32:14 2021 +0530 Change background to theme.background.app in Control button, Search and svg Arrows commit a1d10a5 Author: Eirik Sletteberg <eiriksletteberg@gmail.com> Date: Wed Jun 30 00:11:28 2021 +0200 Fix: cache DocsContext on window to prevent duplication This is intended to solve storybookjs/builder-vite#40 and related issues. commit 477eec5 Author: Mark Berry <markberry867@gmail.com> Date: Tue Jun 29 02:44:35 2021 -0500 Fix circular reference not being handled in moduleMetadata commit b7f47e9 Author: jonniebigodes <joaocontadesenvolvimento@gmail.com> Date: Mon Jun 28 23:00:33 2021 +0100 updates for jsx and tsx support commit 9e044fc Author: Valentin Semirulnik <v7rulnik@gmail.com> Date: Fri Jun 25 22:43:57 2021 +0300 fix: remove aggregateTimeout commit d1039bc Author: Benny Powers <web@bennypowers.com> Date: Thu Jun 24 10:25:09 2021 +0300 docs(web-components): kitchen sink dynamic source example commit b66e3b2 Author: Benny Powers <web@bennypowers.com> Date: Thu Jun 24 09:57:36 2021 +0300 docs(web-components): add web-components to Dynamic Source support table commit e584062 Author: Benny Powers <web@bennypowers.com> Date: Thu Jun 24 09:45:20 2021 +0300 fix(web-components): types commit fbacf4e Author: Benny Powers <web@bennypowers.com> Date: Thu Jun 24 09:32:20 2021 +0300 style(web-components): refactor to TS Split config functions into separate modules Add type and language to docs.source commit 64efb26 Author: Benny Powers <web@bennypowers.com> Date: Wed Jun 23 22:43:17 2021 +0300 test(web-components): dynamic stories commit 49f8c41 Author: Benny Powers <bennypowers@users.noreply.github.com> Date: Wed Jun 23 21:37:52 2021 +0300 feat(web-components): dynamic source Adds dynamic source to the web-components 'framework' package. commit af6136c Author: Bartłomiej Krakowski <bartlomiej@krakowski.dev> Date: Thu Apr 1 15:32:46 2021 +0200 feat: adding transparency support commit 8042564 Author: Matt Darveniza <matt.darveniza@biarri.com> Date: Thu Aug 20 16:43:33 2020 +1000 Add example codesnippet for using ArgsTable with stories commit cdaf6f0 Merge: f763907 9941335 Author: Norbert de Langen <ndelangen@me.com> Date: Thu Jun 4 22:17:21 2020 +0200 Merge branch 'next' into tech/add-docs-to-standalone # Conflicts: # examples/standalone-preview/package.json # examples/standalone-preview/storybook.html # examples/standalone-preview/storybook.tsx commit f763907 Merge: 8d62061 a4622c9 Author: Norbert de Langen <ndelangen@me.com> Date: Sat Dec 21 15:01:57 2019 +0100 Merge branch 'next-6.0.0' into tech/add-docs-to-standalone # Conflicts: # examples/standalone-preview/package.json commit 8d62061 Author: Michael Shilman <michael@lab80.co> Date: Fri Aug 23 21:27:05 2019 +0800 Addon-docs: Add docs to standalone example
@eirslett what do you think about wrapping your addition in |
That should work, I suppose. If |
I wrote a patch-package script to handle it (company VPN, yay.) but I basically did this: -if (_global.window.__DOCS_CONTEXT__ === undefined) {
+if (_global.window && _global.window.__DOCS_CONTEXT__ === undefined) {
_global.window.__DOCS_CONTEXT__ = /*#__PURE__*/(0, _react.createContext)({});
_global.window.__DOCS_CONTEXT__.displayName = 'DocsContext';
}
-var DocsContext = _global.window.__DOCS_CONTEXT__;
+var DocsContext = _global.window ? _global.window.__DOCS_CONTEXT__ : _react.createContext(); My storyshots aren't picking up the mdx files for now, and I'm unsure if that's because of what I did here or not - but atleast storyshots is picking up the regular stories and snapshotting them now whilst keeping functionality the same in my build/development environments. Edited to replace null with _react.createContext() |
Looks good! You could maybe just run |
This is intended to solve storybookjs/builder-vite#40
and related issues.
How to test
Look at the linked issue.
Hopefully this shouldn't break any existing functionality in addon-docs, but looking at the code I don't think it will.
It would be nice to have this backported to the 6.3 release as well!
Arguably, the actual problem here is that Vite is making untrue assumptions, so ideally it should be fixed there. I think it's