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(cdp): Persist to state instead of url #25112

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

benjackwhite
Copy link
Contributor

@benjackwhite benjackwhite commented Sep 20, 2024

Problem

The state of the configured hog function was put in the url for new functions but this had a few issues:

  1. Redirecting to an integration slack loses the url so the state is gone
  2. It only worked for new functions
  3. It made doing beforeUnload logic super hard

Changes

  • Moves to using a separate persisted reducer for the state with a timeout to ensure we don't keep it around way too long
  • Adds the beforeUnload logic

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

Copy link
Contributor

github-actions bot commented Sep 20, 2024

Size Change: 0 B

Total Size: 1.1 MB

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

compressed-size-action

@benjackwhite benjackwhite marked this pull request as ready for review September 20, 2024 13:14
Copy link
Collaborator

@mariusandra mariusandra left a comment

Choose a reason for hiding this comment

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

Cool

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.

2 participants