-
-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
Portable Stories: Improve Handling of React Updates and Errors #29044
Merged
Merged
Changes from 1 commit
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
483325a
Portable Stories: Improve Handling of React Updates and Errors
valentinpalkovic 8ea5c9e
Merge remote-tracking branch 'origin/next' into valentin/propagate-er…
valentinpalkovic da21bfe
Next.js: Update webpack configuration to support react-dom/test-utils
valentinpalkovic da2aee4
name decorators for easier debugging
JReinhold 4f1b73d
fix duplicate default annotations
JReinhold 58173b2
Merge remote-tracking branch 'origin/next' into valentin/propagate-er…
valentinpalkovic 8a7d8ee
fix decorator type
JReinhold 67f91ec
Merge branch 'valentin/propagate-error-in-testing' of github.com:stor…
JReinhold 6109294
Merge remote-tracking branch 'origin/next' into valentin/propagate-er…
valentinpalkovic e4697f9
fix composing undefined defaultProjectAnnotations
JReinhold 758aaa1
Next.js-Vite: Update vite-plugin-storybook-nextjs
valentinpalkovic b00a8ce
Merge branch 'valentin/propagate-error-in-testing' of github.com:stor…
JReinhold 714913d
Next.js: Fix react-dom/test-utils aliasing
valentinpalkovic ea1a533
Fix Webpack aliasing
valentinpalkovic c24f221
Remove console.log
valentinpalkovic fe0843b
Merge branch 'next' of github.com:storybookjs/storybook into valentin…
JReinhold e672f1f
fix lock-file changes
JReinhold ceb8387
Add comment explaining asyncWrapper
kasperpeulen 46aa6e0
Fix bug where @storybook/test is not imported but canvas is used dire…
kasperpeulen File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
code/renderers/react/src/__test__/ComponentWithError.stories.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import type { Meta, StoryObj } from '..'; | ||
import { ComponentWithError } from './ComponentWithError'; | ||
|
||
const meta = { | ||
title: 'Example/ComponentWithError', | ||
component: ComponentWithError as any, | ||
} satisfies Meta<typeof ComponentWithError>; | ||
|
||
export default meta; | ||
|
||
type Story = StoryObj<typeof meta>; | ||
|
||
export const ThrowsError: Story = {}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
export function ComponentWithError() { | ||
// eslint-disable-next-line local-rules/no-uncategorized-errors | ||
throw new Error('Error in render'); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
style: Consider removing 'as any' and properly typing the component