-
Notifications
You must be signed in to change notification settings - Fork 1.9k
fix(experiments): maybe fix flapping snapshot #36705
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
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Greptile Summary
This PR addresses flapping snapshot tests in the experiments feature by modifying the styling approach for the LemonTable component in the Exposures view. The change replaces CSS-based height and overflow handling with the LemonTable component's built-in scrollable
prop.
Specifically, the PR removes the CSS classes max-h-[160px] overflow-auto
that were applied to the LemonTable and replaces them with scrollable={{ y: 160 }}
prop. This change affects the experiments exposure data table that displays timeseries data for experiment results.
The modification aligns with PostHog's approach to handling UI consistency issues by leveraging component-native properties rather than external CSS styling. The LemonTable's built-in scrollable
prop provides more deterministic rendering behavior, ensuring the DOM structure and styling remain consistent across test runs. This change maintains the same visual functionality (a scrollable table with 160px height limit) while providing more stable rendering for snapshot tests.
Confidence score: 4/5
- This PR is safe to merge with minimal risk as it only changes the implementation approach for achieving the same visual outcome
- Score reflects a targeted fix for a specific testing issue using established component APIs with no functional changes to user experience
- Pay close attention to the LemonTable component usage to ensure the scrollable prop provides equivalent behavior to the removed CSS classes
Context used:
Context - When flapping snapshots are detected, provide a clear warning message indicating that they are productivity killers and must be fixed as soon as possible. Include suggestions for common causes, such as using ResizeObserver instead of CSS container queries. (link)
1 file reviewed, no comments
Size Change: 0 B Total Size: 2.68 MB ℹ️ View Unchanged
|
📸 UI snapshots have been updated3 snapshot changes in total. 0 added, 3 modified, 0 deleted:
Triggered by this commit. |
📸 UI snapshots have been updated6 snapshot changes in total. 0 added, 6 modified, 0 deleted:
Triggered by this commit. |
📸 UI snapshots have been updated3 snapshot changes in total. 0 added, 3 modified, 0 deleted:
Triggered by this commit. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this, looked like an overflow problem, although it's weird that it was intermittent.
58ecdfd
to
ae84e35
Compare
📸 UI snapshots have been updated4 snapshot changes in total. 0 added, 4 modified, 0 deleted:
Triggered by this commit. |
📸 UI snapshots have been updated3 snapshot changes in total. 0 added, 3 modified, 0 deleted:
Triggered by this commit. |
📸 UI snapshots have been updated3 snapshot changes in total. 0 added, 3 modified, 0 deleted:
Triggered by this commit. |
📸 UI snapshots have been updated4 snapshot changes in total. 0 added, 4 modified, 0 deleted:
Triggered by this commit. |
52188e5
to
cbad20a
Compare
cbad20a
to
03b459f
Compare
📸 UI snapshots have been updated20 snapshot changes in total. 0 added, 20 modified, 0 deleted:
Triggered by this commit. |
📸 UI snapshots have been updated4 snapshot changes in total. 0 added, 4 modified, 0 deleted:
Triggered by this commit. |
Problem
Snapshots are flapping
Changes
How did you test this code?
👉 Stay up-to-date with PostHog coding conventions for a smoother review.