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

Optimized MetricsBar & Fixed Mobile Layout #3258

Open
wants to merge 4 commits into
base: dev
Choose a base branch
from

Conversation

TanerKp
Copy link

@TanerKp TanerKp commented Feb 22, 2025

Hey 👋🏼

I refactored {route}MetricsBar and created a new WebsiteMetrics component to remove redundant code and improve maintainability. Most importantly, I fixed the mobile UI layout.

Before:
before

After:
after

Copy link

vercel bot commented Feb 22, 2025

@TanerKp is attempting to deploy a commit to the umami-software Team on Vercel.

A member of the Team first needs to authorize it.

Copy link

@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 consolidates metrics bar functionality and improves mobile responsiveness across the website's analytics pages through a new WebsiteMetrics wrapper component.

  • Added new /src/app/(main)/websites/[websiteId]/WebsiteMetrics.tsx component that handles shared metrics functionality like date filtering, comparison mode, and sticky positioning
  • Implemented responsive grid layout in WebsiteMetrics.module.css that switches from 2:1 ratio on desktop to single column on mobile (<1200px)
  • Simplified EventsMetricsBar and SessionsMetricsBar by removing redundant layout code and date filter functionality
  • Wrapped existing metrics bars with WebsiteMetrics component across pages for consistent mobile-friendly layout
  • Removed unused props from WebsiteMetricsBar component that were moved to WebsiteMetrics

💡 (1/5) You can manually trigger the bot by mentioning @greptileai in a comment!

10 file(s) reviewed, 3 comment(s)
Edit PR Review Bot Settings | Greptile

@TanerKp TanerKp changed the base branch from master to dev February 23, 2025 01:52
Copy link

vercel bot commented Feb 25, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
umami ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 25, 2025 4:12am

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.

2 participants