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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Enabling plugins + destinations gating #22364

Merged
merged 3 commits into from
May 21, 2024
Merged

Conversation

tiina303
Copy link
Contributor

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.

@@ -99,8 +105,7 @@ export const pipelinePluginConfigurationLogic = kea<pipelinePluginConfigurationL
defaultConfigForPlugin(values.plugin),
config
)
// NOTE: getPluginConfigFormData already appends enabled
Copy link
Contributor Author

@tiina303 tiina303 May 20, 2024

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

@posthog-bot
Copy link
Contributor

馃摳 UI snapshots have been updated

1 snapshot changes in total. 0 added, 1 modified, 0 deleted:

  • chromium: 0 added, 1 modified, 0 deleted (diff for shard 1)
  • webkit: 0 added, 0 modified, 0 deleted

Triggered by this commit.

馃憠 Review this PR's diff of snapshots.

Copy link
Contributor

github-actions bot commented May 20, 2024

Size Change: 0 B

Total Size: 1.05 MB

鈩癸笍 View Unchanged
Filename Size
frontend/dist/toolbar.js 1.05 MB

compressed-size-action

@posthog-bot
Copy link
Contributor

馃摳 UI snapshots have been updated

1 snapshot changes in total. 0 added, 1 modified, 0 deleted:

  • chromium: 0 added, 1 modified, 0 deleted (diff for shard 1)
  • webkit: 0 added, 0 modified, 0 deleted

Triggered by this commit.

馃憠 Review this PR's diff of snapshots.

@@ -45,6 +45,9 @@ export const pipelineBatchExportConfigurationLogic = kea<pipelineBatchExportConf
return `NEW:${service}`
}),
path((id) => ['scenes', 'pipeline', 'pipelineBatchExportConfigurationLogic', id]),
connect(() => ({
values: [pipelineDestinationsLogic, ['canEnableNewDestinations']],
Copy link
Contributor

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.

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, agreed it's unnecessary - I'll fix this in a follow-up PR

@tiina303 tiina303 enabled auto-merge (squash) May 21, 2024 10:40
@tiina303 tiina303 merged commit 1efb4c7 into master May 21, 2024
83 checks passed
@tiina303 tiina303 deleted the gate-destinations-frontend branch May 21, 2024 10:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants