-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
feat: Improve insights overall loading state #28229
base: master
Are you sure you want to change the base?
Conversation
Marked as WIP while I fix CI - it'll certainly break |
Size Change: +5 B (0%) Total Size: 1.18 MB ℹ️ View Unchanged
|
3822319
to
531668a
Compare
📸 UI snapshots have been updated33 snapshot changes in total. 0 added, 33 modified, 0 deleted:
Triggered by this commit. |
...__/scenes-app-insights-error-empty-states--estimated-query-execution-time-too-long--dark.png
Outdated
Show resolved
Hide resolved
frontend/__snapshots__/scenes-app-insights-error-empty-states--long-loading--dark.png
Outdated
Show resolved
Hide resolved
2dca437
to
822d62c
Compare
📸 UI snapshots have been updated14 snapshot changes in total. 0 added, 14 modified, 0 deleted:
Triggered by this commit. |
/* TODO: Migrate this to a CSS variable (with a `bg-` Tailwind class) once @adamleithp finishes his Tailwind work */ | ||
.insights-empty-state { | ||
background-color: rgb(129 129 129 / 20%); | ||
} |
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.
@adamleithp I'm expecting us to be able to use some kind of ´bg-gray-600/50` class once your TW4 changes are live, are we getting that?
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.
PR Summary
This PR modernizes the insight loading states across PostHog to be more visually lightweight and consistent with modern design patterns.
Key changes:
- Replaced class-based selectors with data attributes (e.g.
[data-attr="insight-empty-state"]
) across test files for better maintainability - Added rotating loading messages with fade transitions in EmptyStates.tsx
- Simplified loading state UI by removing extra wrappers and reducing vertical space
- Implemented non-linear progress bar that caps at 99% using arctangent function
- Consolidated styles using Tailwind classes instead of separate CSS files
The changes improve visual consistency while maintaining core functionality and test coverage.
13 file(s) reviewed, 6 comment(s)
Edit PR Review Bot Settings | Greptile
frontend/src/scenes/insights/EmptyStates/EmptyStates.stories.tsx
Outdated
Show resolved
Hide resolved
frontend/src/scenes/insights/EmptyStates/EmptyStates.stories.tsx
Outdated
Show resolved
Hide resolved
43d1eb0
to
593b946
Compare
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.
I'll let the more design-oriented people give their feedback about that part. It looks like greptile has a few good comments here
7f3cb5d
to
fcfd04b
Compare
📸 UI snapshots have been updated18 snapshot changes in total. 0 added, 18 modified, 0 deleted:
Triggered by this commit. |
9414066
to
22949c3
Compare
📸 UI snapshots have been updated32 snapshot changes in total. 0 added, 32 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. |
fbf2245
to
e45008d
Compare
📸 UI snapshots have been updated32 snapshot changes in total. 0 added, 32 modified, 0 deleted:
Triggered by this commit. |
0b5a030
to
1aa3e70
Compare
This isn't very modern and it occupies a lot of space. This was prompted by it not fitting the Web Vitals UI, let's tweak it all around the app and see if it looks nicer like this.
Or else the snapshot is never generated because the selector is never found
We only need the gray background while loading, let's remove it from the other ones
📸 UI snapshots have been updated3 snapshot changes in total. 0 added, 3 modified, 0 deleted:
Triggered by this commit. |
Our loading state for insights isn't very modern and it occupies a lot of space. This was prompted by it not fitting the Web Vitals UI, let's tweak it all around the app and see if it looks nicer like this.
Gravacao.de.Tela.2025-02-05.153252.mp4
Does this work well for both Cloud and self-hosted?
Oh yeah
How did you test this code?
Visually locally + snapshots
Closes #28172