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

fix(cdp): fixes broken dictonary property adding #29514

Merged
merged 5 commits into from
Mar 5, 2025

Conversation

meikelmosby
Copy link
Contributor

@meikelmosby meikelmosby commented Mar 5, 2025

Problem

saving dictionary properties was broken as in one could not add additional properties.

Changes

  • Fixed issue by adding tracking with a ref (prevFilteredEntriesRef) to make sure the component knows when changes need to be propagated to the parent component.

👉 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?

2025-03-05 10 27 39

  • locally

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

PR Summary

Fixed a bug in the DictionaryField component that prevented users from adding additional dictionary properties in the CDP pipeline configuration.

  • Added prevFilteredEntriesRef using useRef in frontend/src/scenes/pipeline/hogfunctions/HogFunctionInputs.tsx to properly track and compare previous entries
  • Improved deep comparison logic for array elements to prevent unnecessary re-renders
  • Updated useEffect dependencies to ensure proper propagation of changes to parent components

1 file(s) reviewed, 1 comment(s)
Edit PR Review Bot Settings | Greptile

@meikelmosby meikelmosby requested a review from benjackwhite March 5, 2025 09:02
Copy link
Contributor

github-actions bot commented Mar 5, 2025

Size Change: 0 B

Total Size: 9.93 MB

ℹ️ View Unchanged
Filename Size
frontend/dist/toolbar.js 9.93 MB

compressed-size-action

@meikelmosby meikelmosby requested a review from benjackwhite March 5, 2025 09:14
@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 2)
  • webkit: 0 added, 0 modified, 0 deleted

Triggered by this commit.

👉 Review this PR's diff of snapshots.

@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 2)
  • webkit: 0 added, 0 modified, 0 deleted

Triggered by this commit.

👉 Review this PR's diff of snapshots.

@meikelmosby meikelmosby force-pushed the fix/cdp/fixes-saving-of-dict-props branch from 3be556d to 9e90083 Compare March 5, 2025 10:04
@meikelmosby meikelmosby merged commit e5e2d50 into master Mar 5, 2025
97 checks passed
@meikelmosby meikelmosby deleted the fix/cdp/fixes-saving-of-dict-props branch March 5, 2025 10:31
adamleithp pushed a commit that referenced this pull request Mar 5, 2025
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.

3 participants