Skip to content

Conversation

@vicke4
Copy link
Contributor

@vicke4 vicke4 commented Jul 17, 2025

When filtering custom events by clicking on them, only the chart gets filtered. This PR filters the activity & properties tabs based on the custom event selected.

@vercel
Copy link

vercel bot commented Jul 17, 2025

@vicke4 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
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.

Greptile Summary

This PR enhances the event filtering functionality across the Umami analytics platform by making the filtering behavior more consistent across all views. The changes introduce a unified filtering experience where selecting an event label affects not just the chart (as before) but also the activity and properties tabs.

Key changes:

  1. EventsPage.tsx: Added label state management and propagation to child components
  2. EventsDataTable.tsx: Implemented filtering logic to show only events matching the selected label
  3. EventProperties.tsx: Added label-based filtering to maintain consistency with other views

The implementation uses a straightforward filtering approach by passing a label prop through the component hierarchy and filtering data based on eventName matches. This creates a more intuitive and cohesive user experience.

Confidence score: 5/5

  1. This PR is extremely safe to merge as it adds filtering functionality without modifying existing behavior
  2. The changes are well-structured, maintain type safety, and include defensive programming (default values for destructuring)
  3. Key files to review: All three modified files work together cohesively, but special attention should be paid to EventsPage.tsx as it manages the shared state

3 files reviewed, 2 comments
Edit PR Review Bot Settings | Greptile

Comment on lines +11 to 13
label?: string;
teamId?: string;
children?: ReactNode;
Copy link
Contributor

Choose a reason for hiding this comment

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

style: teamId and children props are unused but still in interface

import styles from './EventProperties.module.css';

export function EventProperties({ websiteId }: { websiteId: string }) {
export function EventProperties({ websiteId, label }: { websiteId: string; label: string }) {
Copy link
Contributor

Choose a reason for hiding this comment

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

style: Update interface or add JSDoc to document that label is optional since code handles null case

Suggested change
export function EventProperties({ websiteId, label }: { websiteId: string; label: string }) {
export function EventProperties({ websiteId, label }: { websiteId: string; label?: string }) {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant