-
Notifications
You must be signed in to change notification settings - Fork 392
Expand Overview stories with empty, loading, and error states #3412
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
base: main
Are you sure you want to change the base?
Expand Overview stories with empty, loading, and error states #3412
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: 1012Charan The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Welcome @1012Charan! |
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.
Thanks @1012Charan . Can you adapt the commit title to be more consistent with our current format:
frontend: Expand Overview stories with empty, loading, and error states
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.
Thanks @joaquimrocha, I've updated the commit message as suggested. Please let me know if anything else is needed.
0b42c67
to
752234f
Compare
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.
Looks solid, would be nice to have screenshots in the description for the new stories
Also good to rebase against main to pull the latest changes
Thanks for the suggestion @skoeva! I've updated this branch added the screenshots, but I noticed that all three states — Empty, Loading, and Error — look almost the same in Storybook. I’m not sure if that’s okay or if I might have missed something, so please let me know if any changes are needed! |
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.
The similar states should be fine, I would just squash the commits once you're done rebasing. Make sure to update the snapshots too: run make frontend-test
locally and you can see which are failing
e16f1c7
to
9bf2886
Compare
@skoeva I've rebased the branch, squashed the commits, and updated the snapshots as requested. Since this was my first time working with things like squash and rebase, it was an exciting learning experience — so if I missed anything or made mistakes, please feel free to point them out. Also, while running the tests, I noticed a failure in the LoadingState due to it simulating an endless request. If you'd like, I can update it to use a timeout-based delay instead. |
b6143d3
to
25e32f4
Compare
sure, no need to mock an endless request. the frontend test still seems to be failing, are you seeing something different locally? |
@skoeva You're right — I rechecked and the LoadingState test is still failing on my side too. I think it's because the mocked API requests never resolve (to simulate loading), so the test waits indefinitely and throws a waiting error. Would it be okay to skip this story in the tests using: LoadingState.parameters = { Also, another issue was simple-eval causing the frontend tests to fail is now fixed — I had missed installing it initially, but after adding it, the other tests are passing fine. Let me know if this approach for the loading story makes sense or if you'd prefer a different fix! |
Adds 3 Storybook stories for the Overview component:
Screenshots for new stories :



EmptyState
LoadingState
ErrorState
Note: I noticed that the Empty, Loading, and Error states all look quite similar in Storybook — they seem to show the same fallback message or UI. I'm assuming this is expected because the Overview component handles these cases in a similar way with mock data, but please let me know if I might have missed something!