Skip to content

Fix strict mode storybook #3837

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

Closed
wants to merge 1 commit into from
Closed

Fix strict mode storybook #3837

wants to merge 1 commit into from

Conversation

LFDanLu
Copy link
Member

@LFDanLu LFDanLu commented Dec 12, 2022

Use this branch for strict mode testing + fixes for now. Will explore fixing this via the strict mode toggle PR

✅ Pull Request Checklist:

  • Included link to corresponding React Spectrum GitHub Issue.
  • Added/updated unit tests and storybook for this change (for new code or code which already has tests).
  • Filled out test instructions.
  • Updated documentation (if it already exists for this component).
  • Looked at the Accessibility Practices for this feature - Aria Practices

📝 Test Instructions:

🧢 Your Project:

RSP

without this change we get a constant rendered more hooks than last render error
@@ -24,9 +24,9 @@ export const parameters = {
};

export const decorators = [
Story => (
story => (
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you know, we can probably get rid of this decorator, there are story options that do this now using layout: center
https://storybook.js.org/docs/react/configure/story-layout

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will investigate this option later for the decorator I'll be adding to support scrolling in all stories

@LFDanLu LFDanLu changed the title (DNM) Fix strict mode storybook Fix strict mode storybook Dec 20, 2022
<VerticalCenter style={{alignItems: 'center', minHeight: '100vh', boxSizing: 'border-box', display: 'flex', justifyContent: 'center'}}>
<Story />
{story()}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

didn't we make this change originally because it was crashing storybook as you have it now?

@LFDanLu
Copy link
Member Author

LFDanLu commented Dec 20, 2022

I confused myself and Rob haha, this PR is no longer needed, superceded by #3333 now that I've got that one working

@LFDanLu LFDanLu closed this Dec 20, 2022
@LFDanLu LFDanLu deleted the fix_strict_mode_storybook branch January 11, 2023 01:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants