-
-
Notifications
You must be signed in to change notification settings - Fork 658
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
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
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.
This change is massive. Are there tests covering this page? If not we should definitely add them.
...nent/project/Project/ProjectFeatureToggles/FeatureToggleSwitch/LegacyFeatureToggleSwitch.tsx
Show resolved
Hide resolved
...mponent/project/Project/ProjectFeatureToggles/FeatureToggleSwitch/useFeatureToggleSwitch.tsx
Show resolved
Hide resolved
...nent/project/Project/ProjectFeatureToggles/FeatureToggleSwitch/LegacyFeatureToggleSwitch.tsx
Show resolved
Hide resolved
...nent/project/Project/ProjectFeatureToggles/FeatureToggleSwitch/LegacyFeatureToggleSwitch.tsx
Show resolved
Hide resolved
hasStrategies: { | ||
type: 'boolean', | ||
description: 'Whether the feature has any strategies defined.', | ||
}, | ||
hasEnabledStrategies: { | ||
type: 'boolean', | ||
description: | ||
'Whether the feature has any enabled strategies defined.', | ||
}, |
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.
Where are the tests verifying that these are part of the payload?
isChangeRequestEnabled: boolean, | ||
refetch: () => void, | ||
onFeatureToggleSwitch: ReturnType<UseFeatureToggleSwitchType>['onToggle'], | ||
) => |
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.
simplify component factory arguments type
hasStrategies?: boolean; | ||
hasEnabledStrategies?: boolean; | ||
isChangeRequestEnabled?: boolean; | ||
onRollback?: () => void; |
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.
onCancel
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.
Mob reviewed
About the changes
Trying to fetch all details about the feature needed for Project Overview, to remove
useFeature
fromFeatureToggleSwitch
.useFeature
- prevent fetching for every rowonToggle
- middleware pattern on action