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

feat: add hasStrategies and hasEnabledStrategies on feature environments #5012

Merged
merged 15 commits into from
Oct 20, 2023

Conversation

Tymek
Copy link
Member

@Tymek Tymek commented Oct 12, 2023

About the changes

Trying to fetch all details about the feature needed for Project Overview, to remove useFeature from FeatureToggleSwitch.

  • decouple feature toggle switch from useFeature - prevent fetching for every row
  • move modals from table cell level into overview, improving performance
  • rewrite logic into onToggle - middleware pattern on action

@vercel
Copy link

vercel bot commented Oct 12, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
unleash-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 19, 2023 9:52am
unleash-monorepo-frontend ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 19, 2023 9:52am

Copy link
Contributor

@FredrikOseberg FredrikOseberg left a comment

Choose a reason for hiding this comment

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

This change is massive. Are there tests covering this page? If not we should definitely add them.

Comment on lines +74 to +82
hasStrategies: {
type: 'boolean',
description: 'Whether the feature has any strategies defined.',
},
hasEnabledStrategies: {
type: 'boolean',
description:
'Whether the feature has any enabled strategies defined.',
},
Copy link
Contributor

Choose a reason for hiding this comment

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

Where are the tests verifying that these are part of the payload?

isChangeRequestEnabled: boolean,
refetch: () => void,
onFeatureToggleSwitch: ReturnType<UseFeatureToggleSwitchType>['onToggle'],
) =>
Copy link
Member Author

Choose a reason for hiding this comment

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

simplify component factory arguments type

hasStrategies?: boolean;
hasEnabledStrategies?: boolean;
isChangeRequestEnabled?: boolean;
onRollback?: () => void;
Copy link
Member Author

Choose a reason for hiding this comment

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

onCancel

@kwasniew kwasniew self-requested a review October 20, 2023 08:49
Copy link
Contributor

@kwasniew kwasniew left a comment

Choose a reason for hiding this comment

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

Mob reviewed

@Tymek Tymek merged commit 6fab663 into main Oct 20, 2023
16 checks passed
@Tymek Tymek deleted the feat/env-strategies-on-project-overview branch October 20, 2023 08:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

3 participants