-
Notifications
You must be signed in to change notification settings - Fork 6.4k
feat: Add time-of-day filtering with quick hour filters and time range picker #3978
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
base: dev
Are you sure you want to change the base?
Conversation
|
@Yashh56 is attempting to deploy a commit to the umami-software Team on Vercel. A member of the Team first needs to authorize it. |
Greptile OverviewGreptile SummaryThis PR adds hour-level time filtering to Umami's analytics, enabling more granular data analysis. The implementation introduces a new Key changes:
The implementation correctly addresses previous feedback by initializing hour states from props ( Confidence Score: 5/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant User
participant DateFilter
participant TimeRangePickerForm
participant parseDateRange
User->>DateFilter: Select "Time range" option
DateFilter->>DateFilter: Set showTimePicker(true)
DateFilter->>TimeRangePickerForm: Open modal with startDate/endDate
TimeRangePickerForm->>TimeRangePickerForm: Initialize date state
TimeRangePickerForm->>TimeRangePickerForm: Extract hours from props (getHours())
User->>TimeRangePickerForm: Select date from calendar
TimeRangePickerForm->>TimeRangePickerForm: Update date state
User->>TimeRangePickerForm: Select start hour (0-23)
TimeRangePickerForm->>TimeRangePickerForm: Update startHour state
User->>TimeRangePickerForm: Select end hour (0-23)
TimeRangePickerForm->>TimeRangePickerForm: Update endHour state
TimeRangePickerForm->>TimeRangePickerForm: Validate startHour <= endHour
User->>TimeRangePickerForm: Click Apply
TimeRangePickerForm->>TimeRangePickerForm: Create range with setHours(startHour) to setHours(endHour+1)
TimeRangePickerForm->>DateFilter: Call onChange("range:startTime:endTime")
DateFilter->>DateFilter: Set showTimePicker(false)
DateFilter->>parseDateRange: Parse range value
parseDateRange->>DateFilter: Return startDate, endDate, unit
DateFilter->>User: Display selected time range
|
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.
3 files reviewed, 3 comments
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
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.
No files reviewed, no comments
This pull request adds enhanced time-based filtering options to the
DateFiltercomponent, allowing users to select more granular time ranges, including specific hours within a day. It introduces a newTimeRangePickerFormcomponent, updates the available filter options, and adds supporting labels for improved user experience.New time range filtering features:
TimeRangePickerFormcomponent that allows users to select a specific date and start/end hours, enabling hour-level granularity for date filters. (src/components/metrics/TimeRangePickerForm.tsx)DateFiltercomponent to include new quick-select options for the last 1, 2, 4, 6, and 12 hours, and added a "Time range" option that opens the new time picker modal. (src/components/input/DateFilter.tsx) [1] [2]DateFiltercomponent, handling its open/close state and passing selected values back to the parent. (src/components/input/DateFilter.tsx) [1] [2] [3] [4]Internationalization and UI improvements:
src/components/messages.ts)TimeRangePickerFormin theDateFiltercomponent to enable the modal functionality. (src/components/input/DateFilter.tsx)Closes #3962