-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Enabling plugins + destinations gating #22364
Conversation
@@ -99,8 +105,7 @@ export const pipelinePluginConfigurationLogic = kea<pipelinePluginConfigurationL | |||
defaultConfigForPlugin(values.plugin), | |||
config | |||
) | |||
// NOTE: getPluginConfigFormData already appends enabled |
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 removed the double adding of enabled, but now it wasn't possible to use the toggle - it would always be false here, because enabled is pulled out from formdata in line 96. Since enabled is used later for order I just pulled out from the configUtils function for legacy UI
馃摳 UI snapshots have been updated1 snapshot changes in total. 0 added, 1 modified, 0 deleted:
Triggered by this commit. |
Size Change: 0 B Total Size: 1.05 MB 鈩癸笍 View Unchanged
|
馃摳 UI snapshots have been updated1 snapshot changes in total. 0 added, 1 modified, 0 deleted:
Triggered by this commit. |
@@ -45,6 +45,9 @@ export const pipelineBatchExportConfigurationLogic = kea<pipelineBatchExportConf | |||
return `NEW:${service}` | |||
}), | |||
path((id) => ['scenes', 'pipeline', 'pipelineBatchExportConfigurationLogic', id]), | |||
connect(() => ({ | |||
values: [pipelineDestinationsLogic, ['canEnableNewDestinations']], |
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.
Doesn't have to be solved in this PR but connecting this logic means that it will run all the load functions in it's afterMount function which is a little unecessary perhaps.
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.
yup, agreed it's unnecessary - I'll fix this in a follow-up PR
Problem
Enabling plugins was broken because enabled was pulled out of the formData, so if was always added as false.
Destinations weren't gated by data-pipelines add-on
Changes
馃憠 Stay up-to-date with PostHog coding conventions for a smoother review.
Does this work well for both Cloud and self-hosted?
How did you test this code?
Verified that I can now enable/disable plugins. Destinations creation pages showed upgrade option and toggles as well.