Skip to content

frontend: add EmptyContent Storybook stories #3323

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

Draft
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

ANIRUDH-SJ
Copy link
Contributor

Added comprehensive Storybook stories for the EmptyContent component.

  • Added EmptyContent.stories.tsx with multiple variants:
    • Default message with string content
    • Custom color variations
    • Error state with error color
    • Complex ReactNode content
    • Empty children state
    • Multiple string children with line breaks
  • Added proper prop documentation and controls
  • Included theme color options in controls

Screenshot from 2025-05-22 02-22-52
Screenshot from 2025-05-22 02-22-47
Screenshot from 2025-05-22 02-22-42
Screenshot from 2025-05-22 02-22-33
Screenshot from 2025-05-22 02-22-21
Screenshot from 2025-05-22 02-22-06
Screenshot from 2025-05-22 02-21-34

@k8s-ci-robot k8s-ci-robot requested review from sniok and yolossn May 21, 2025 20:53
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: ANIRUDH-SJ
Once this PR has been reviewed and has the lgtm label, please assign sniok for approval. For more information see the Code Review Process.

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels May 21, 2025
@ANIRUDH-SJ ANIRUDH-SJ marked this pull request as draft May 21, 2025 21:28
@k8s-ci-robot k8s-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label May 21, 2025
@ANIRUDH-SJ ANIRUDH-SJ marked this pull request as ready for review May 21, 2025 21:35
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label May 21, 2025
@k8s-ci-robot k8s-ci-robot requested a review from joaquimrocha May 21, 2025 21:35
@ANIRUDH-SJ
Copy link
Contributor Author

Hey @illume can u please review this ??

@userAdityaa
Copy link
Contributor

userAdityaa commented May 22, 2025

Hey @illume can u please review this ??

Hey, your test are failing for linting as well as for storybooks can you check it and fix that.
Screenshot 2025-05-22 at 3 29 34 PM

Command Suggestions (for linting):

  • Go to frontend dir and run npm run format

  • From root dir run make frontend-lint or make frontend-fixlint

For the storybook see some old merge PRs for resolving the issue, but it's clear that you haven't uploaded the storyshots that you can generate with this command make frontend-test and after this make sure all the test passes.

@ANIRUDH-SJ
Copy link
Contributor Author

Ok i will submit a new PR correcting this. Thanks for your feedback

@userAdityaa
Copy link
Contributor

Ok i will submit a new PR correcting this. Thanks for your feedback

There is no need for a new PR, you can just correct the test and rebase the currently open PR.
If you don't know about rebasing then read this:
https://git-scm.com/book/en/v2/Git-Branching-Rebasing

@ANIRUDH-SJ
Copy link
Contributor Author

Alright will do this sir!!

@ANIRUDH-SJ ANIRUDH-SJ force-pushed the feat/empty-content-stories branch from a53c00c to 2d8bf92 Compare May 22, 2025 12:55
@k8s-ci-robot k8s-ci-robot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels May 22, 2025
Copy link
Contributor

@skoeva skoeva left a comment

Choose a reason for hiding this comment

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

Looks like the frontend test is still failing, make sure to rebase one more time in case it's related to issues on main. If that doesn't fix it, run make frontend-test locally again and update any failing snapshots in your commits

@ANIRUDH-SJ ANIRUDH-SJ force-pushed the feat/empty-content-stories branch from 68e7376 to f1e9c6a Compare May 22, 2025 21:57
@ANIRUDH-SJ ANIRUDH-SJ requested a review from skoeva May 22, 2025 21:57
Copy link
Contributor

@illume illume left a comment

Choose a reason for hiding this comment

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

It seems the tests are failing.

Can you please have a look at updating some of the commit messages?

@illume illume marked this pull request as draft May 23, 2025 09:08
@k8s-ci-robot k8s-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label May 23, 2025
@k8s-ci-robot
Copy link
Contributor

PR needs rebase.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants