Skip to content

feat(embedded-analytics): WIP Add embedded analytics UI #36699

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

Draft
wants to merge 49 commits into
base: master
Choose a base branch
from

Conversation

robbie-c
Copy link
Member

@robbie-c robbie-c commented Aug 15, 2025

Problem

Let's move this into the main repo

Changes

  • Adds a React library for use with the embedded API
  • Adds storybook for development
  • Adds storybook (using the dist version of the API) for visual regression tests and publishing
  • Adds Zod schema to validate request / response

TODO

  • React hooks for managing the request state (e.g. pagination, filters)
  • UI for filters
  • Figure out how to support full CSS for people who don't use tailwind, but also support tailwind config for people who do
  • Automatic publishing of the storybook to vercel
  • CI
  • Changes to embedded API - and then make the zod schema actually match
  • General tidying up of the code
  • Code examples / docs pages

How did you test this code?

It'll have CI running visual regression tests

@robbie-c robbie-c requested review from lricoy and joshsny August 15, 2025 11:47
@robbie-c robbie-c force-pushed the add-embedded-analytics-ui branch from f9b3f59 to b9cfdd1 Compare August 15, 2025 11:48
Copy link
Contributor

github-actions bot commented Aug 15, 2025

Size Change: 0 B

Total Size: 2.68 MB

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

compressed-size-action

@posthog-bot
Copy link
Contributor

📸 UI snapshots have been updated

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

Triggered by this commit.

👉 Review this PR's diff of snapshots.

@posthog-bot
Copy link
Contributor

📸 UI snapshots have been updated

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

Triggered by this commit.

👉 Review this PR's diff of snapshots.

@robbie-c robbie-c force-pushed the add-embedded-analytics-ui branch from 9552bf9 to 319eea2 Compare August 15, 2025 12:12
@posthog-bot
Copy link
Contributor

📸 UI snapshots have been updated

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

Triggered by this commit.

👉 Review this PR's diff of snapshots.

Copy link
Contributor

@joshsny joshsny left a comment

Choose a reason for hiding this comment

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

Gave it a skim through - generally looks good, don't think you want a thorough review here of the components as it's in WIP but let me know if that's not the case.

Should this live in the products folder? I wasn't sure if everything there is being loaded into the main bundle?

@robbie-c
Copy link
Member Author

Yeah definitely not ready for an in-depth review yet, mostly tagged you as an FYI here's what I'm working on and here's my progress!

@robbie-c
Copy link
Member Author

Should this live in the products folder? I wasn't sure if everything there is being loaded into the main bundle?

Oh wasn't aware of this, I definitely don't want that

@posthog-bot
Copy link
Contributor

📸 UI snapshots have been updated

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

Triggered by this commit.

👉 Review this PR's diff of snapshots.

@posthog-bot
Copy link
Contributor

📸 UI snapshots have been updated

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

Triggered by this commit.

👉 Review this PR's diff of snapshots.

@posthog-bot
Copy link
Contributor

📸 UI snapshots have been updated

5 snapshot changes in total. 0 added, 5 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 5)
  • 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

2 snapshot changes in total. 0 added, 2 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 8)
  • 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.

@posthog-bot
Copy link
Contributor

📸 UI snapshots have been updated

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

Triggered by this commit.

👉 Review this PR's diff of snapshots.

@posthog-bot
Copy link
Contributor

📸 UI snapshots have been updated

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

Triggered by this commit.

👉 Review this PR's diff of snapshots.

@posthog-bot
Copy link
Contributor

📸 UI snapshots have been updated

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

Triggered by this commit.

👉 Review this PR's diff of snapshots.

@posthog-bot
Copy link
Contributor

📸 UI snapshots have been updated

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

Triggered by this commit.

👉 Review this PR's diff of snapshots.

@posthog-bot
Copy link
Contributor

📸 UI snapshots have been updated

2 snapshot changes in total. 0 added, 2 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 (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