-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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: flappy insight snapshot #22781
fix: flappy insight snapshot #22781
Conversation
Size Change: 0 B Total Size: 1.06 MB ℹ️ View Unchanged
|
📸 UI snapshots have been updated1 snapshot changes in total. 0 added, 1 modified, 0 deleted:
Triggered by this commit. |
📸 UI snapshots have been updated1 snapshot changes in total. 0 added, 1 modified, 0 deleted:
Triggered by this commit. |
📸 UI snapshots have been updated1 snapshot changes in total. 0 added, 1 modified, 0 deleted:
Triggered by this commit. |
such fun #22897 |
fiddling based on storybookjs/test-runner#85 |
ohhhhhh thank you, this has been on my list to fix still |
📸 UI snapshots have been updated2 snapshot changes in total. 0 added, 2 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.
What's weird is this says it's 1015px but the viewport is set to 1280
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.
yeah, it's chopping off the navigation when taking the screenshot...
i'm hoping 1280 - theWidthOfTheNavigation == almostTheBreakpoint
So just trying 1300 as the width
If that's it then we'll see lots of snapshots change now 🙈
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.
📸 UI snapshots have been updated4 snapshot changes in total. 0 added, 4 modified, 0 deleted:
Triggered by this commit. |
📸 UI snapshots have been updated2 snapshot changes in total. 0 added, 2 modified, 0 deleted:
Triggered by this commit. |
📸 UI snapshots have been updated674 snapshot changes in total. 0 added, 674 modified, 0 deleted:
Triggered by this commit. |
📸 UI snapshots have been updated457 snapshot changes in total. 0 added, 457 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.
so despite there now being lots of changed snapshots thanks to my slightly hammer-to-crack-a-nut approach to figuring out how this works 🙈
you can see here the insight stories are now slightly wider
📸 UI snapshots have been updated3 snapshot changes in total. 0 added, 3 modified, 0 deleted:
Triggered by this commit. |
📸 UI snapshots have been updated216 snapshot changes in total. 0 added, 216 modified, 0 deleted:
Triggered by this commit. |
📸 UI snapshots have been updated1 snapshot changes in total. 0 added, 1 modified, 0 deleted:
Triggered by this commit. |
📸 UI snapshots have been updated2 snapshot changes in total. 0 added, 2 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. |
📸 UI snapshots have been updated1 snapshot changes in total. 0 added, 1 modified, 0 deleted:
Triggered by this commit. |
This is ridonkulous |
This reverts commit 1109abd.
Problem
I think the problem with the flappy insight snapshot is that it's getting taken at a width that's really close to where the layout shifts. So we see these layout shifts in the flaps.
Changes
Pins the viewport for the insight stories to 1200px. The layout shift here happens at ~1130 so I think this should be good enough to avoid the shift.
👉 Stay up-to-date with PostHog coding conventions for a smoother review.
Does this work well for both Cloud and self-hosted?
No impact
How did you test this code?
The viewport gets set when running locally. Let's see if we still get the flaps.