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(onboarding-templates): allow someone to select pageview as variable #24899

Merged
merged 7 commits into from
Sep 12, 2024

Conversation

raquelmsmith
Copy link
Member

Problem

For #23065

A common event in dashboards/insights is a pageview. Eg signup page viewed -> clicked signup button.

Additionally, sometimes these events happen on different domains - eg posthog.com and us.posthog.com.

Changes

Adds a url navigator, constrained to URLs that have seen ingested events. Shows current iframe URL in the URL input. Lets someone use a page URL as the template variable.

Screen.Recording.2024-09-10.at.4.35.29.PM.mov

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

@raquelmsmith
Copy link
Member Author

Oh, I need to rebase this on master once #24825 goes out. It's not actually 700 lines!

Copy link
Contributor

github-actions bot commented Sep 10, 2024

Size Change: +475 B (+0.04%)

Total Size: 1.1 MB

ℹ️ View Unchanged
Filename Size Change
frontend/dist/toolbar.js 1.1 MB +475 B (+0.04%)

compressed-size-action

@raquelmsmith raquelmsmith force-pushed the feat/onboarding-templates-pageview-variabe branch from ef0bc19 to 206551a Compare September 11, 2024 15:00
@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.

Copy link
Contributor

@zlwaterfield zlwaterfield left a comment

Choose a reason for hiding this comment

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

👏

@@ -255,6 +279,9 @@ export const iframedToolbarBrowserLogic = kea<iframedToolbarBrowserLogicType>([
actions.setNewActionName(null)
actions.disableElementSelector()
return
case PostHogAppToolbarEvent.PH_TOOLBAR_NAVIGATED:
// remove leading / from path
return actions.setCurrentPath(payload.path.replace(/^\/+/, ''))
Copy link
Contributor

Choose a reason for hiding this comment

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

This function returns void so technically you should be doing something like this:

Suggested change
return actions.setCurrentPath(payload.path.replace(/^\/+/, ''))
actions.setCurrentPath(payload.path.replace(/^\/+/, ''))
return void

@raquelmsmith raquelmsmith enabled auto-merge (squash) September 12, 2024 18:11
@raquelmsmith raquelmsmith merged commit b3fdb8c into master Sep 12, 2024
93 checks passed
@raquelmsmith raquelmsmith deleted the feat/onboarding-templates-pageview-variabe branch September 12, 2024 19:26
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