Skip to content

chore: make page reports ui more compact #30963

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

Merged
merged 6 commits into from
Apr 9, 2025
Merged

Conversation

lricoy
Copy link
Member

@lricoy lricoy commented Apr 8, 2025

Problem

This PR approaches a combination of UI feedbacks on the page reports here.

image

Changes

Configuring a more compact UI with less vertical space, no titles or separators and making all tiles have a minimum height.

It was not enough to use a flex layout like in the web analytics dashboard because the multiple loading states were conflicting among them and it would still shift when some tables have less data than others after they are loaded.

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

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

Yes

How did you test this code?

Manually.

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

Overall, the PR refines the Page Reports UI to be more compact by adjusting layouts and reducing vertical spacing.

  • /frontend/src/scenes/web-analytics/PageReports.tsx: Added a "compact" prop to the Tiles component and adjusted container CSS classes (using h-full and min-h-0) to stabilize the layout during loading.
  • /frontend/src/scenes/web-analytics/WebAnalyticsDashboard.tsx: Modified margins and conditional separators to better suit a compact display.
  • /frontend/src/scenes/web-analytics/pageReportsLogic.ts: Updated tile layouts with consistent minimum heights and reduced extra titles.
  • /frontend/src/scenes/web-analytics/webAnalyticsLogic.tsx: Made SectionTile titles optional to remove unnecessary UI clutter.

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

@posthog-bot
Copy link
Contributor

📸 UI snapshots have been updated

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

Triggered by this commit.

👉 Review this PR's diff of snapshots.

Copy link
Contributor

github-actions bot commented Apr 8, 2025

Size Change: -64 B (0%)

Total Size: 13.2 MB

ℹ️ View Unchanged
Filename Size Change
frontend/dist/toolbar.js 13.2 MB -64 B (0%)

compressed-size-action

Copy link
Member

@robbie-c robbie-c left a comment

Choose a reason for hiding this comment

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

It'd be good to add a snapshot of page reports so that the side-by-side comparison is automatic!

@lricoy lricoy merged commit c0b8c1c into master Apr 9, 2025
110 checks passed
@lricoy lricoy deleted the chore/page-reports-compact-ui branch April 9, 2025 16:21
@lricoy
Copy link
Member Author

lricoy commented Apr 9, 2025

It'd be good to add a snapshot of page reports so that the side-by-side comparison is automatic!

I will do that on another PR after the other UI fixes in the spirit of the current brown bag :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants