Skip to content
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

Fix NavigationDrawer story #9235

Merged
merged 6 commits into from
Dec 31, 2024
Merged

Conversation

TakuyaKurimoto
Copy link
Contributor

@TakuyaKurimoto TakuyaKurimoto commented Dec 25, 2024

Closes #7492

Description

This PR will fix NavigationDrawer story.

Testing

スクリーンショット 2024-12-25 23 27 25 スクリーンショット 2024-12-26 0 28 47

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

PR Summary

Added mock data and GraphQL handlers to fix the NavigationDrawer story in Storybook, enabling proper state management and data display.

  • Added new favorite-folders.ts with mock data structure for testing
  • Added FindManyFavoriteFolders GraphQL mock handler in graphqlMocks.ts to support favorite folders functionality
  • Updated NavigationDrawer.stories.tsx with ObjectMetadataItemsDecorator and PrefetchLoadedDecorator for state management
  • Added custom Recoil state decorator to initialize mock workspace member and metadata items

💡 (1/5) You can manually trigger the bot by mentioning @greptileai in a comment!

3 file(s) reviewed, 1 comment(s)
Edit PR Review Bot Settings | Greptile

Comment on lines +6 to +7
createdAt: new Date().toISOString(),
updatedAt: new Date().toISOString(),
Copy link
Contributor

Choose a reason for hiding this comment

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

style: Using new Date() directly in mock data creates non-deterministic test data. Consider using a fixed date string instead.

@lucasbordeau lucasbordeau enabled auto-merge (squash) December 30, 2024 17:30
@lucasbordeau lucasbordeau self-requested a review December 31, 2024 13:17
Copy link
Contributor

@lucasbordeau lucasbordeau left a comment

Choose a reason for hiding this comment

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

Nice

@lucasbordeau lucasbordeau enabled auto-merge (squash) December 31, 2024 13:40
@lucasbordeau lucasbordeau merged commit 2c7f40a into twentyhq:main Dec 31, 2024
20 checks passed
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.

[Storybook Testing] Fix NavigationDrawer story
2 participants