-
-
Notifications
You must be signed in to change notification settings - Fork 113
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
feat: add quick shift buttons to timeline and autocomplete end date from start #649
base: master
Are you sure you want to change the base?
Conversation
The buttons allow the user to shift the date by a day or a week. It also adds a today button to quickly go to today.
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.
👍 Looks good to me! Reviewed everything up to a6d6bb9 in 1 minute and 51 seconds
More details
- Looked at
102
lines of code in1
files - Skipped
0
files when reviewing. - Skipped posting
9
drafted comments based on config settings.
1. src/components/InputTimeInterval.vue:48
- Draft comment:
Consider adding ARIA labels to the shift date buttons for improved accessibility. - Reason this comment was not posted:
Confidence changes required:33%
<= threshold50%
None
2. src/components/InputTimeInterval.vue:114
- Draft comment:
The watcher for 'start' sets 'end' automatically if blank. Confirm that this behavior is acceptable for users who might intentionally clear the end date. - Reason this comment was not posted:
Confidence changes required:33%
<= threshold50%
None
3. src/components/InputTimeInterval.vue:200
- Draft comment:
In the 'setToday' method, consider storing moment() in a variable to avoid any potential discrepancy between setting 'start' and 'end'. - Reason this comment was not posted:
Confidence changes required:33%
<= threshold50%
None
4. src/components/InputTimeInterval.vue:212
- Draft comment:
In 'shiftDay', the use of moment's mutating add() is acceptable here, but consider using clone() if further operations on the original moments are needed in the future. - Reason this comment was not posted:
Confidence changes required:33%
<= threshold50%
None
5. src/components/InputTimeInterval.vue:30
- Draft comment:
Nice formatting improvement for the date input fields. Splitting attributes across lines improves readability. - Reason this comment was not posted:
Confidence changes required:0%
<= threshold50%
None
6. src/components/InputTimeInterval.vue:48
- Draft comment:
New 'Shift date' row adds quick shift buttons. Consider refactoring common state resets (mode, duration, valueChanged call) in setToday and shiftDay for DRYness. - Reason this comment was not posted:
Confidence changes required:33%
<= threshold50%
None
7. src/components/InputTimeInterval.vue:153
- Draft comment:
The watch on 'start' auto-populates 'end' if it is blank, which resolves Timeline: select only one date selects this date #596. Ensure this behavior is as intended when users want to clear the end date. - Reason this comment was not posted:
Confidence changes required:33%
<= threshold50%
None
8. src/components/InputTimeInterval.vue:211
- Draft comment:
In the shiftDay method, moment(...).add() mutates the moment object. In this context it's acceptable, but consider using clone() if the original date value might be needed later. - Reason this comment was not posted:
Confidence changes required:33%
<= threshold50%
None
9. src/components/InputTimeInterval.vue:5
- Draft comment:
Consider revising the text on line 5: "The second date must be greater or equal to the first date." to "The second date must be greater than or equal to the first date." for enhanced clarity. - Reason this comment was not posted:
Comment was not on a location in the diff, so it can't be submitted as a review comment.
Workflow ID: wflow_9dja051jCsVDabEU
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #649 +/- ##
=======================================
Coverage 26.76% 26.76%
=======================================
Files 28 28
Lines 1655 1655
Branches 292 292
=======================================
Hits 443 443
Misses 1155 1155
Partials 57 57 ☔ View full report in Codecov by Sentry. |
This change has two different changes.
On the forum, someone had a suggestion to be able to shift over the date in the timeline view. I also had this problem. It is also nice to have a today button even though you can just click the 24 hour option above the date pickers. The date shift actually works on the start and end dates independently, so you are able to select a two day range in the date pickers and shift that two day range over by a day or a week.
While I was working on this change, I also added a change to resolve Timeline: select only one date selects this date #596. This will fill the end date with the start date if the end date is blank. Worst case, the person will just modify the end date to be the date that they really wanted to select. Best case, they wanted a one day range anyways.
demo.mp4
Important
Add quick shift buttons and auto-fill end date from start in
InputTimeInterval.vue
.-1w
,-1d
,Today
,+1d
,+1w
) inInputTimeInterval.vue
for date navigation.end
date withstart
date ifend
is blank inInputTimeInterval.vue
.shiftDay()
andsetToday()
methods for date manipulation inInputTimeInterval.vue
.start
to auto-fillend
date inInputTimeInterval.vue
.This description was created by
for a6d6bb9. It will automatically update as commits are pushed.