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

fix: Fixed inconsistent colors in stickiness graph #28582

Merged
merged 1 commit into from
Feb 12, 2025

Conversation

Sriram-bk
Copy link
Contributor

Problem

The stickiness graph was displaying inconsistent colors when viewing data of the same event type.

Closes #28390

Changes

Screenshot 2025-02-11 at 10 17 03 PM

👉 Stay up-to-date with PostHog coding conventions for a smoother review.

Does this work well for both Cloud and self-hosted?

Yep.

How did you test this code?

Locally. Visual checks on the app.

@Sriram-bk Sriram-bk requested a review from a team February 12, 2025 03:17
Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

PR Summary

This PR fixes inconsistent colors in the stickiness graph by improving series identification and ordering.

  • Added series_order tracking in SeriesWithExtras class to maintain consistent ordering in /posthog/hogql_queries/insights/stickiness_query_runner.py
  • Modified series object to include action metadata for color consistency with trends
  • Updated unique series identification in indexedResults selector to consider action.order and breakdown_value in frontend/src/scenes/trends/trendsDataLogic.ts
  • Enhanced compare filter logic to preserve series ordering when creating previous period comparisons

2 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings | Greptile

Copy link
Contributor

Size Change: +760 B (+0.06%)

Total Size: 1.18 MB

ℹ️ View Unchanged
Filename Size Change
frontend/dist/toolbar.js 1.18 MB +760 B (+0.06%)

compressed-size-action

Copy link
Contributor

@thmsobrmlr thmsobrmlr left a comment

Choose a reason for hiding this comment

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

Nice! 🙌

@Sriram-bk Sriram-bk merged commit 4f1bfc5 into master Feb 12, 2025
104 checks passed
@Sriram-bk Sriram-bk deleted the sri/fix/inconsistent-colors-for-stickiness branch February 12, 2025 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.

Bug: Colours and letters displayed in stickiness insights are not consistent with the insight definition
2 participants