4408 Commits

Author SHA1 Message Date
Michael Shilman
df8c83cf0e Update yarn.lock 2023-01-24 00:18:51 +08:00
Michael Shilman
8c5fe63074 Addon-docs: Add legacy transitional support for MDX1 2023-01-24 00:14:46 +08:00
Valentin Palkovic
c096972088
Merge pull request #20736 from storybookjs/valentin/upgrade-react-popper-tooltip
Upgrade react-popper-tooltip
2023-01-23 15:05:02 +01:00
Valentin Palkovic
b003f78f8c Upgrade react-popper-tooltip 2023-01-23 13:40:29 +01:00
Tom Coleman
2cceaadef8
Merge pull request #20702 from storybookjs/mdx-in-csf-declaration
Docs: Allow "declaring" stories with `story={}`
2023-01-23 21:51:42 +11:00
Jeppe Reinhold
e763511c94 calculate layout in all cases 2023-01-23 10:55:30 +01:00
Jeppe Reinhold
6464cc2ea3 cleanup 2023-01-23 10:04:01 +01:00
Jeppe Reinhold
aac1767873 deprecate name in Primary block 2023-01-23 09:52:33 +01:00
Jeppe Reinhold
78dd7831f2 split try blocks 2023-01-23 09:38:53 +01:00
Jeppe Reinhold
171bb63a22 rename prop-based stories 2023-01-23 09:28:45 +01:00
chakir qatab
682f8c1ce1 cleanup and check the forceReRender api not firing 2023-01-23 12:27:27 +04:00
Tom Coleman
36f5c4fdff Small fix for SourceParameters title 2023-01-23 16:13:39 +11:00
Ian VanSchooten
563fa6c1f6 Handle minified code 2023-01-22 23:44:09 -05:00
Ian VanSchooten
156178506d Add a few docblocks 2023-01-22 22:23:04 -05:00
Ian VanSchooten
b78244e652 Create aliases for dev 2023-01-22 22:22:49 -05:00
Ian VanSchooten
22af7fe512 Return sourcemap 2023-01-22 20:39:46 -05:00
Ian VanSchooten
69f23e4b56 Replace all as in import specifiers with colons 2023-01-22 20:37:25 -05:00
Ian VanSchooten
61acc22f7f Remove vite-plugin-externals 2023-01-22 19:49:12 -05:00
Ian VanSchooten
b49050af0a Remove unused imports 2023-01-22 19:47:18 -05:00
Jeppe Reinhold
2b5eead2c6 fix check 2023-01-22 23:47:29 +01:00
Jeppe Reinhold
5d72968566 explain try-catch block 2023-01-22 23:40:12 +01:00
Jeppe Reinhold
d23bed8074 support deprecated API unattached 2023-01-22 23:31:50 +01:00
Jeppe Reinhold
0984503694 make useOf return types 2023-01-22 23:13:01 +01:00
Jeppe Reinhold
3a8f2d83d7 support undefined of prop in attached mode 2023-01-22 22:41:18 +01:00
chakir qatab
85e4d60e52 fix args reset from controls 2023-01-23 01:02:53 +04:00
chakir qatab
bd367b1fd7 cleanup some issue to fix testing 2023-01-22 22:56:43 +04:00
chakir qatab
806c43ee93 minor refactory 2023-01-22 20:44:05 +04:00
chakir qatab
9670e97919 refactory and cleanup 2023-01-22 20:43:05 +04:00
chakir qatab
5c296f38ec change story name to reactive test 2023-01-22 15:35:00 +04:00
chakir qatab
b761da7b4e fix play function test by awaiting for Args Update 2023-01-22 15:20:42 +04:00
chakir qatab
cbc1942f86 add click event to the button 2023-01-22 14:35:58 +04:00
chakir qatab
96fcaa53c2 fix add await to expect 2023-01-22 13:56:40 +04:00
chakir qatab
3777314fda fix import ref from vue 2023-01-22 13:21:04 +04:00
chakir qatab
e447524194 add test story to stories to test reactive args 2023-01-22 12:50:43 +04:00
chakir qatab
8b069c2cc0 remove reactive button from cli test 2023-01-22 11:34:37 +04:00
TaigaMikami
f35fdc9a80 Remove default argument from backgroundColor 2023-01-22 12:04:41 +09:00
Jeppe Reinhold
15aa210e51 cleanup 2023-01-21 23:27:32 +01:00
Jeppe Reinhold
435b88472a add props deprecations 2023-01-21 23:20:53 +01:00
Jeppe Reinhold
2c905fc963 Merge branch 'next' of github.com:storybookjs/storybook into jeppe/sb-1145-update-api-of-canvas-block 2023-01-21 22:44:16 +01:00
Jeppe Reinhold
3f3db865aa improve prop documentation 2023-01-21 22:43:53 +01:00
Jeppe Reinhold
73b9c7b1b6 use new Canvas API in autodocs 2023-01-21 22:25:11 +01:00
chakir qatab
5898ba5587 fix issue with testing args.stories 2023-01-21 21:59:32 +04:00
n028
04a76cf48f
Merge branch 'next' into fix-hmr-vite 2023-01-21 18:52:11 +01:00
chakir qatab
d4b8b9ae35 fixing test issues 2023-01-21 12:44:29 +04:00
chakir qatab
e179c14b81 Merge branch 'next' into vue3-reactivemode 2023-01-21 03:46:41 +04:00
chakir qatab
df020a7b86 vue3 add Story to cli template to demo reactive args 2023-01-21 03:45:21 +04:00
Jeppe Reinhold
6aa9acd90a add meta prop, clean up stories 2023-01-20 22:33:45 +01:00
Jeppe Reinhold
a5f14bf500 support parameters 2023-01-20 15:33:03 +01:00
Ian VanSchooten
994a26df8f
Vite: Allow specifying path to vite.config file (#20681)
Issue: #20552

## What I did

I added a new builder option for the Vite builder named `viteConfigPath`, which is a path to a custom config relative to the cwd.  If the path does not resolve, a clear error will be thrown with the absolute path being checked.

I also added a new utility, `getBuilderOptions()`, which is helpful because these options can be specified two different ways, with `core.builder.options` or `framework.options.builder`.  The utility gives an easy way to check both.  It gives preference to ~`core.builder.options`~ `framework.options.builder`, since that's the newer way to define the options.

## How to test

1. `yarn task --task sandbox --start-from auto --template react-vite/default-ts`
2. Move the `vite.config.ts` file into `.storybook`
3. Add an alias, like:
```ts
export default defineConfig({
  plugins: [react()],
  resolve: {
    alias: {
      stories: path.resolve(__dirname, '../src/stories'),
    },
  },
});
```
4. Change one of the stories to use this alias, such as the Button story:
```ts
import { Button } from 'stories/Button';
```
5. Start Storybook, it will fail
6. Add `viteConfigPath: ".storybook/vite.config.ts"` to the builder options in `.storybook/main.ts`
7. Restart storybook, and it should work.


## Checklist

<!-- Please check (put an "x" inside the "[ ]") the applicable items below to make sure your PR is ready to be reviewed. -->

- [ ] Make sure your changes are tested (stories and/or unit, integration, or end-to-end tests)
- [X] Make sure to add/update documentation regarding your changes
- [ ] If you are deprecating/removing a feature, make sure to update
      [MIGRATION.MD](https://github.com/storybookjs/storybook/blob/next/MIGRATION.md)

Is there a way to create an automated test for this?  I couldn't think of a good way to do it.

#### Maintainers

- [ ] If this PR should be tested against many or all sandboxes,
      make sure to add the `ci:merged` or `ci:daily` GH label to it.
- [X] Make sure this PR contains **one** of the labels below.

`["cleanup", "BREAKING CHANGE", "feature request", "bug", "documentation", "maintenance", "dependencies", "other"]`

<!--

Everybody: Please submit all PRs to the `next` branch unless they are specific to the current release. Storybook maintainers cherry-pick bug and documentation fixes into the `main` branch as part of the release process, so you shouldn't need to worry about this. For additional guidance: https://storybook.js.org/docs/react/contribute/how-to-contribute

-->
2023-01-20 09:17:29 -05:00
Jeppe Reinhold
5eb25d0358 add stories for layout parameters 2023-01-20 15:02:42 +01:00