Michael Shilman
21e28be5f8
Merge branch 'next' into pr/14299
2021-04-15 10:26:12 +08:00
Gaëtan Maisse
acd2aa67ed
fix(docs): add missing optional peerDep when using Docs with Web Components
2021-04-13 22:14:29 +02:00
Michael Shilman
3ec358f71c
Merge pull request #14472 from eirslett/dont-shadow-window
...
Core: Don't shadow the window global variable
2021-04-10 20:30:06 +08:00
Michael Shilman
3aba070716
Merge pull request #14323 from visualfanatic/remove-lodash-range-usage
...
Refactor: Replace `lodash/range` with `Array.from`
2021-04-10 12:17:41 +08:00
Michael Shilman
316b500adb
Merge branch 'next' into dont-shadow-window
2021-04-10 12:09:28 +08:00
Gaëtan Maisse
98fa420bef
chore: move to Yarn 2 🧶
2021-04-07 18:25:38 +02:00
Eirik Sletteberg
841a55bd68
Don't shadow the window global variable
...
This snippet:
```
import { window } from 'global';
```
will let you mock window variables in Jest tests.
However, it breaks hot module reloading in Vite,
because Vite injects code snippets in top of every
file:
```
window.STUFF = 'Vite injected some HMR code here';
import { window } from 'global';
// this fails: Uncaught ReferenceError: Cannot access 'window' before initialization
```
The simple solution is to rename `window` when importing it:
```
import { window as globalWindow } from 'global';
globalWindow.alert('hello world');
```
The code works like before, but Vite will be able to
inject its code snippet without interfering with the
rest of the code.
2021-04-04 18:36:16 +02:00
Michael Shilman
d9dcd16558
Merge pull request #14422 from storybookjs/fix/storySortDocs
...
Addon-docs/ArgsTable: Use storySort parameter
2021-04-02 17:33:08 +08:00
Michael Shilman
79c1c526a2
Merge pull request #14444 from j3rem1e/issue-14443
...
Revert "Svelte - Fix async loaders and docs" Fix #14443
2021-04-02 17:30:07 +08:00
ThibaudAv
9557b4f054
fix(angular): keep inlineStories to false by default
2021-04-02 09:21:55 +02:00
j3rem1e
2decf470d2
Revert "Svelte - Fix async loaders and docs"
...
This reverts commit 5c1e2b458abda5e1740b83de1f2145b99fda86d6.
2021-04-01 21:02:17 +02:00
Clément DUNGLER
df5907a891
Docs: Use storySort parameter
2021-03-31 22:36:25 +02:00
Michael Shilman
47ccecad8f
Merge pull request #14380 from eirslett/esbuild-compatible
...
Core: Make Storybook esbuild-compatible
2021-03-30 10:17:03 +08:00
Tom Coleman
1ab18cf7c2
Add story and fix for #14377
2021-03-30 12:45:21 +11:00
Eirik Sletteberg
22f4ea4767
Fix inconsistent dummy exports
2021-03-30 01:21:22 +02:00
j3rem1e
bea2e5c38e
Fix Cannot read property '__docgen' of undefined
2021-03-29 22:26:22 +02:00
Eirik Sletteberg
f74a04a411
Make Storybook esbuild-compatible
...
This would be a good fundament for adding Snowpack/Vite
builder support. Currently, Storybook UI can be built by
Webpack or tsc, but esbuild transpiles .ts file-by-file
and therefore has some caveats:
https://esbuild.github.io/content-types/#typescript-caveats
This change adds isolatedModules: true to tsconfig.json,
and fixes a few places in the Storybook source code.
The result has been briefly tested with esbuild - with
these changes, it's possible to build Storybook UI
using Vite.
2021-03-29 22:18:41 +02:00
Michael Shilman
c9ea699125
Merge pull request #14370 from storybookjs/12071-string-unions
...
Fix issue with string unions/enums
2021-03-29 15:43:00 +08:00
Tom Coleman
c92c1d20b3
Revert unnecessary change
2021-03-29 15:38:09 +11:00
Tom Coleman
a9aae8e0c4
Update behaviour to deal with string-valued enums
2021-03-29 15:34:33 +11:00
Tom Coleman
28eac778a9
Reproduce issue from https://github.com/storybookjs/storybook/issues/12071#issuecomment-808622616
2021-03-27 13:26:16 +11:00
Michael Shilman
18c1143ea0
Merge pull request #14333 from storybookjs/fix-angular-inlinerenderer
...
Angular: Improve docs inline rendering setup
2021-03-26 13:36:12 +08:00
Michael Shilman
a24c2e3b70
Update addons/docs/src/blocks/mdx.tsx
2021-03-26 13:04:33 +08:00
Gaëtan Maisse
1e20a891fa
feat(addon-docs): improve inline rendering setup
...
Co-authored-by: Gaëtan Maisse <gaetanmaisse@gmail.com>
Co-authored-by: ThibaudAv <thibaud.avenier@gmail.com>
2021-03-25 10:23:00 +01:00
Norbert de Langen
d74daf18e5
FIX #13630
2021-03-25 10:01:17 +01:00
Damian Stasik
56a0df017d
refactor: replace lodash/range
with Array.from
2021-03-23 22:18:25 +01:00
Michael Shilman
58962400a7
Revert "Addon-docs/Angular: Fix inline rendering setup"
2021-03-23 08:42:22 +08:00
Jakob-Em
e5c0f571c7
Create actions for angular Outputs by default
2021-03-22 11:51:29 +01:00
Michael Shilman
fd5c70d30e
Addon-docs/Angular: Fix inline rendering setup
2021-03-18 21:15:07 +08:00
Michael Shilman
40a57a4589
Merge pull request #14227 from Dschungelabenteuer/next
...
Addon-docs/Vue,Vue3: Fix preset options for vue-docgen-api
2021-03-17 17:48:35 +08:00
Charles Gruenais
797c6050ce
Reused Storybook's Options core type and applied fix to vue3 framework
2021-03-16 22:02:54 +01:00
Michael Shilman
1ea6c43f21
remove console.log
2021-03-15 17:29:51 +08:00
Michael Shilman
da4f95309b
Controls: Tune up sorting
2021-03-15 17:18:33 +08:00
Charles Gruenais
193cf98488
Added type definition to option argument
2021-03-14 15:22:38 +01:00
Charles Gruenais
f478cac140
Applying preset options for vue-docgen-api (extending PR #9699 )
2021-03-13 04:28:28 +01:00
Jakub Riedl
10ad73ad03
Fix: Docs fail to render when using generated stories
...
Docs page throw an error `Cannot read property 'startBody' of undefined` when using generated stories because it cannot get its source code.
The fix is using the same simple fallback to the whole story file same as when locationsMap is not passed from caller.
2021-03-12 17:52:37 +11:00
Tom Coleman
c5b260acc3
Update addons/docs/src/lib/docgen/createPropDef.ts
...
Co-authored-by: Michael Shilman <shilman@users.noreply.github.com>
2021-03-11 22:32:14 +11:00
Tom Coleman
4e1a4a7b3d
Fix issue introduced into vue docgen w/ strings
2021-03-11 16:06:24 +11:00
j3rem1e
d50dff0822
Update sveltedoc-parser to 4.1.0
2021-03-07 18:32:31 +01:00
j3rem1e
5c1e2b458a
Svelte - Fix async loaders and docs
2021-02-28 18:30:50 +01:00
Michael Shilman
3308232986
Merge pull request #12824 from hydrosquall/cameron.yick/feature/ui-editable-json-tree-knob
...
Addon-controls: Add JSON tree editor for Object/Array Type args
2021-02-24 12:08:02 +08:00
Shota Fuji
85f2a43a71
fix(addon-docs): Do not create additional Vue tree
...
This commit changes how the decorator grab Vue.js' VNode tree.
Previously it creates a new Vue instance and traverse the tree.
But this causes a lot of problems such as unexpected mount call and
DOM-detached instance. I removed the instruction then added a decorator
that do the instruction from inside of an existing VNode tree.
2021-02-24 01:30:50 +00:00
Gert Hengeveld
9ef5b3aaca
Fix dark style
2021-02-23 15:47:54 +01:00
Michael Shilman
52479887c7
Addon-docs: Support story.mdx, stories.mdx
2021-02-22 08:40:23 +08:00
Michael Shilman
3ea21b737f
Merge pull request #13845 from somenickname/12357_fix_first_tab_named_story
...
Addon-docs: Fix ArgsTable tab renamed to `Story` when using args
2021-02-20 21:34:07 +08:00
Norbert de Langen
240429ed2e
Merge branch 'next' into tech/core-builder
...
# Conflicts:
# lib/core/src/server/config/defaults.ts
2021-02-19 12:14:50 +01:00
Tom Coleman
93fdcecd3a
Use a fixed date in react-proptype tests
2021-02-19 16:24:12 +11:00
Tom Coleman
d8d0368406
Add a test for fix for RDT
2021-02-19 15:50:56 +11:00
Tom Coleman
c038669bc2
Update handle prop tests to properly deal with strings
2021-02-19 15:33:58 +11:00
Tom Coleman
f4dc3da08f
Update snapshots on testfixtures
...
(and got tests working)
2021-02-19 15:27:05 +11:00