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 Chooser componnent stories #2824

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Faakhir30
Copy link
Contributor

References #931

Added clusterChooser components stories.

Heres snapshots video of current state:
Screencast from 2025-02-01 04-10-54.webm

@dosubot dosubot bot added the size:XXL This PR changes 1000+ lines, ignoring generated files. label Feb 1, 2025
Copy link
Contributor

@sniok sniok left a comment

Choose a reason for hiding this comment

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

nice changes, thanks! could you take a look into LoadingClusters story and why there are clusters in the output?

@Faakhir30 Faakhir30 force-pushed the feat/new-chooser-stories branch from 78d6cc3 to 9bc15bd Compare February 3, 2025 21:46
@Faakhir30 Faakhir30 requested a review from sniok February 3, 2025 21:49
@Faakhir30 Faakhir30 force-pushed the feat/new-chooser-stories branch from 9bc15bd to 326d0d1 Compare February 4, 2025 00:02
const allClusters = _.cloneDeep(state.allClusters || {});

if (clusters === null) {
Copy link
Contributor

Choose a reason for hiding this comment

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

this changes the behavior of this function and breaks logic for statelessClusters branch. could you revert the change to this file please

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yup, i was expecting something might break due to this
@sniok I did this because this function useClustersConf would always returns object || {} and never null, therefore
loading state would never be achieved IMO, refering these 2 lines:
https://github.com/headlamp-k8s/headlamp/blob/main/frontend/src/components/cluster/Chooser.tsx#L417

Therefore, Removing loading state story for now

@Faakhir30 Faakhir30 force-pushed the feat/new-chooser-stories branch from 326d0d1 to f2a8b4a Compare February 4, 2025 14:54
@Faakhir30 Faakhir30 requested a review from sniok February 4, 2025 14:57
@Faakhir30 Faakhir30 force-pushed the feat/new-chooser-stories branch from f2a8b4a to 1756226 Compare February 4, 2025 15:59
@Faakhir30
Copy link
Contributor Author

Force pushed again, since e2e tests timed out after 13 min

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

Successfully merging this pull request may close these issues.

2 participants