fix: allow single-date selection in timeline date range picker#767
Conversation
When selecting a date range, previously both start and end dates were required. Now only the start date is required — if the end date is omitted, the range defaults to that single day (start to start+1day). Also adds min/max constraints between the date inputs to prevent selecting an end date before the start date. Fixes ActivityWatch#596
There was a problem hiding this comment.
Important
Looks good to me! 👍
Reviewed everything up to 5e8849e in 6 seconds. Click for details.
- Reviewed
46lines of code in1files - Skipped
0files when reviewing. - Skipped posting
0draft comments. View those below. - Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
Workflow ID: wflow_1tZWJS8EMhyLBPMj
You can customize by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.
Greptile SummaryModified the timeline date range picker to allow single-date selection by making the end date optional. When only a start date is set, the component now defaults to showing that single day (start to start+1day). The validation logic ( Confidence Score: 5/5
Important Files Changed
Last reviewed commit: 5e8849e |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #767 +/- ##
==========================================
- Coverage 25.67% 25.60% -0.08%
==========================================
Files 30 30
Lines 1741 1746 +5
Branches 316 314 -2
==========================================
Hits 447 447
+ Misses 1272 1233 -39
- Partials 22 66 +44 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
The |
Summary
When selecting a date range in the timeline, previously both start and end dates were required. This made it cumbersome to view a single day — you had to set both dates to the same value.
Changes:
min/maxconstraints between date inputs to prevent invalid ranges (end before start)emptyDaterange,invalidDaterange,daterangeTooLong) updated to handle single-date caseBehavior:
Test plan
Fixes #596
Important
Allows single-date selection in
InputTimeInterval.vueby making end date optional and updating validation logic.InputTimeInterval.vue; defaults to single-day view if only start date is set.min/maxconstraints to date inputs to prevent invalid ranges.emptyDaterange,invalidDaterange,daterangeTooLong) to handle single-date case.endinput hasminconstraint matchingstartdate.endinput has placeholder "(optional)".valuecomputed property inInputTimeInterval.vueupdated to handle single-date selection.emptyDaterangenow returns false ifstartis set.invalidDaterangeanddaterangeTooLongreturn false ifendis not set.This description was created by
for 5e8849e. You can customize this summary. It will automatically update as commits are pushed.