Skip to content

React Native Web: Fix inconsistent example stories#33891

Merged
jonniebigodes merged 3 commits intostorybookjs:nextfrom
danielalanbates:fix/issue-33845
Feb 23, 2026
Merged

React Native Web: Fix inconsistent example stories#33891
jonniebigodes merged 3 commits intostorybookjs:nextfrom
danielalanbates:fix/issue-33845

Conversation

@danielalanbates
Copy link
Copy Markdown

@danielalanbates danielalanbates commented Feb 21, 2026

Closes #33845

Summary

This PR fixes: [Bug]: React Native Web - Inconsistent example stories

Changes

.../template/cli/js/Page.stories.jsx                      |  1 -
 .../template/cli/ts/Page.stories.tsx                      | 15 +++++++++------
 2 files changed, 9 insertions(+), 7 deletions(-)

Testing

Please review the changes carefully. The fix was verified against the existing test suite.


This PR was created with the assistance of Claude Sonnet 4.6 by Anthropic | effort: low. Happy to make any adjustments!

Summary by CodeRabbit

  • Tests
    • Removed outdated commented test assertions.
    • Strengthened type safety for story definitions across test files.
    • Enhanced structure and organization of story exports with improved type annotations for better maintainability.

…istent with other templates

- Use `satisfies Meta<typeof Page>` pattern and `StoryObj` type in the TS template to match Button and Header stories
- Add `type Story = StoryObj<typeof meta>` and annotate exports accordingly
- Remove leftover FIXME comment from both JS and TS Page story templates

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@dosubot
Copy link
Copy Markdown

dosubot bot commented Feb 21, 2026

Related Documentation

Checked 0 published document(s) in 1 knowledge base(s). No updates required.

How did I do? Any feedback?  Join Discord

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Feb 21, 2026

No actionable comments were generated in the recent review. 🎉


📝 Walkthrough

Walkthrough

Two Storybook story files are updated. The JavaScript version removes a commented assertion line. The TypeScript version modernizes story type declarations by introducing StoryObj typing, converting meta to a named constant with satisfies type assertion, and applying strong typing to story exports.

Changes

Cohort / File(s) Summary
Comment Cleanup
code/frameworks/react-native-web-vite/template/cli/js/Page.stories.jsx
Removed a commented-out assertion verifying the login button absence.
Storybook Typing Modernization
code/frameworks/react-native-web-vite/template/cli/ts/Page.stories.tsx
Introduced StoryObj type from Storybook, converted meta to a named constant with satisfies Meta<typeof Page>, created local Story type alias, and applied strong typing to LoggedIn and LoggedOut story exports. Removed FIXME comment.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@valentinpalkovic valentinpalkovic changed the title Fix #33845: [Bug]: React Native Web - Inconsistent example stories React Native Web: Fix inconsistent example stories Feb 23, 2026
@storybook-app-bot
Copy link
Copy Markdown

storybook-app-bot bot commented Feb 23, 2026

Package Benchmarks

Commit: 9ac3db5, ran on 23 February 2026 at 20:22:42 UTC

No significant changes detected, all good. 👏

Copy link
Copy Markdown
Contributor

@jonniebigodes jonniebigodes left a comment

Choose a reason for hiding this comment

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

@danielalanbates, thanks for taking the time to put together this pull request and help fix the examples. We appreciate it 🙏 !

I've checke,d and it looks good on my end.

Will gladly merge this once the checklist clears.

Hope you have a fantastic day.

Stay safe

@jonniebigodes jonniebigodes merged commit 5a2c607 into storybookjs:next Feb 23, 2026
113 of 115 checks passed
@danielalanbates
Copy link
Copy Markdown
Author

Thank you for the review! Glad it helps. 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: React Native Web - Inconsistent example stories

3 participants