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

Frontend: Add Storybook Stories for Notifications Component #2829

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Faakhir30
Copy link
Contributor

@Faakhir30 Faakhir30 commented Feb 2, 2025

Refers #931
Added Storybook stories to showcase and test different states of the Notifications component.

  • Refactored Notifications components to seperate file and updated imports from index.ts

  • Added test utility function createTestNotification to generate sample notifications

  • Set up Redux store configuration for testing with configureStore

  • Included MemoryRouter wrapper for proper routing context

  • Added decorators to provide necessary context providers

  • Added Storybook stories to test different states of the Notifications component.

  • Verified tests passing
    image

@dosubot dosubot bot added the size:XL This PR changes 500-999 lines, ignoring generated files. label Feb 2, 2025
@Faakhir30 Faakhir30 changed the title Add Storybook Stories for Notifications Component Frontend: Add Storybook Stories for Notifications Component Feb 2, 2025
@illume
Copy link
Collaborator

illume commented Feb 3, 2025

Thanks so much for this!

We have this convention for git commits with the context at the beginning.

Something like: frontend: Notifications: Add Storybook Stories.

Oh... It seems like it's not tracking the move of the file into Notifications.tsx. Maybe that could be a separate commit first to move the file with minimal changes and then in a separate commit add the stories. Then git should hopefully be able to track the move.

@Faakhir30 Faakhir30 force-pushed the feat/notifications-stories branch from cfca83c to e973c64 Compare February 3, 2025 20:41
…attern.

Signed-off-by: Faakhir30 <zahidfaakhir@gmail.com>
@Faakhir30 Faakhir30 force-pushed the feat/notifications-stories branch from e973c64 to 0c2705f Compare February 3, 2025 20:42
Signed-off-by: Faakhir30 <zahidfaakhir@gmail.com>
@Faakhir30
Copy link
Contributor Author

Oh... It seems like it's not tracking the move of the file into Notifications.tsx. Maybe that could be a separate commit first to move the file with minimal changes and then in a separate commit add the stories. Then git should hopefully be able to track the move.

@illume I've made separate 2 commits now: frontend: Notifications: Add storybook Stories and snapshots. and frontend: Notifications: Refactor notifications.tsx to Barrel Export Pattern. hopefully solves the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size:XL This PR changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants