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): improve testing interface #27054

Merged
merged 11 commits into from
Dec 19, 2024
Merged

feat(cdp): improve testing interface #27054

merged 11 commits into from
Dec 19, 2024

Conversation

mariusandra
Copy link
Collaborator

Changes

  • Move "mock" and reload buttons into "..."
  • Fix modifying project name when testing invocations
  • Add a system to persist globals in localstorage

2024-12-19 14 05 15

How did you test this code?

Played around in the UI.

Persisting into localstorage isn't obvious though --> as a user I'd expect this to live in a database somewhere. Should we put this somewhere, or make the persistance class more clear in the UX?

@mariusandra mariusandra requested a review from a team December 19, 2024 13:09
Copy link
Contributor

github-actions bot commented Dec 19, 2024

Size Change: 0 B

Total Size: 1.11 MB

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

compressed-size-action

@posthog-bot
Copy link
Contributor

📸 UI snapshots have been updated

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

  • chromium: 0 added, 2 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.

@mariusandra mariusandra changed the title feat(cdp): improve testing intergace feat(cdp): improve testing interface Dec 19, 2024
Copy link
Contributor

@benjackwhite benjackwhite left a comment

Choose a reason for hiding this comment

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

I'd say this is more than good enough for an incremental change. If we add some tracking and see if anyone uses it I think thats the way to know whether to invest harder

size="small"
icon={<IconX />}
onClick={() => deleteSavedGlobals(index)}
tooltip="Delete this saved set of globals"
Copy link
Contributor

Choose a reason for hiding this comment

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

I think I'd opt for "save test data" or something as globals sounds a bit "internal"


savedGlobals: [
[] as { name: string; globals: HogFunctionInvocationGlobals }[],
{ persist: true, prefix: `${getCurrentTeamId()}__` },
Copy link
Contributor

Choose a reason for hiding this comment

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

Personally I think this is fine. I'd say, lets add some tracking to this. If we find a lot of usage then we can consider a more robust persistence?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I added a bunch of data-attr-s all over the place and called these things "test data" everywhere. I guess good enough?

@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 (wasn't pushed!)
  • webkit: 0 added, 0 modified, 0 deleted

Triggered by this commit.

👉 Review this PR's diff of snapshots.

@mariusandra mariusandra enabled auto-merge (squash) December 19, 2024 20:03
@mariusandra mariusandra merged commit c434dab into master Dec 19, 2024
98 of 99 checks passed
@mariusandra mariusandra deleted the cdp-fruit-salad branch December 19, 2024 20:11
@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 (wasn't pushed!)
  • webkit: 0 added, 0 modified, 0 deleted

Triggered by this commit.

👉 Review this PR's diff of snapshots.

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