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

refactor: Extract functions to parent #26584

Merged
merged 5 commits into from
Dec 3, 2024

Conversation

rafaeelaudibert
Copy link
Member

@rafaeelaudibert rafaeelaudibert commented Dec 2, 2024

These functions will be reused in stats_table.py, so it makes sense to extract them one level higher. There's some extra complication on how we handle self.query.compare because stats_table.py always wants to compare, so we need that to be a parameter

This is just refactoring work to allow us to better filter by ConversionGoal on stats_table.py. If anything, this is just better code (to some definition of better)

These functions will be reused in `stats_table.py`, so it makes sense to extract them one level higher. There's some extra complication on how we handle `self.query.compare` because `stats_table.py` always wants to compare.
@robbie-c
Copy link
Member

robbie-c commented Dec 2, 2024

WebTopClicksQuery can be deleted if doing so would make your life easier, it's not used any more

@rafaeelaudibert
Copy link
Member Author

WebTopClicksQuery can be deleted if doing so would make your life easier, it's not used any more

@robbie-c It's not complicating me right now, but I'm always happy to remove code :)

@robbie-c
Copy link
Member

robbie-c commented Dec 2, 2024

I was just looking at the mypy errors ;)

@rafaeelaudibert
Copy link
Member Author

I was just looking at the mypy errors ;)

@robbie-c Oh, duh :). Might remove it then, thx

This isnt being used anymore, and it's just complicating some of our code changes
This is complicated because `self.query` doesn't always have `self.query.compare`, so this would fail a lot of tests
Copy link
Contributor

github-actions bot commented Dec 2, 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

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

  • chromium: 0 added, 1 modified, 0 deleted (diff for shard 1)
  • webkit: 0 added, 0 modified, 0 deleted

Triggered by this commit.

👉 Review this PR's diff of snapshots.

Copy link
Member Author

Choose a reason for hiding this comment

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

Ahn, looks very wrong, hog is gone 🔥, I will make it regenerate this once Depot is back online

@rafaeelaudibert rafaeelaudibert force-pushed the display-stats-from-conversion-goals-only branch from bdcbb72 to cbcb8a9 Compare December 3, 2024 15:45
@PostHog PostHog deleted a comment from posthog-bot Dec 3, 2024
@rafaeelaudibert
Copy link
Member Author

@robbie-c tests are passing now :)

@rafaeelaudibert rafaeelaudibert merged commit e43803b into master Dec 3, 2024
96 checks passed
@rafaeelaudibert rafaeelaudibert deleted the display-stats-from-conversion-goals-only branch December 3, 2024 16:50
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