-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Add lookahead padding to the plan time axis #3419
Conversation
… name outside the activity rectangle
Draw using SVG
add resizing for timeline view plans
Add a padding of 30 minutes (ahead of end bounds) to the time axis for the plan
src/plugins/timeline/Plan.vue
Outdated
// this.viewBounds.end = this.viewBounds.end + (30 * 60 * 1000); | ||
//Add a 30 min padding to the end bounds to look ahead | ||
let endDate = new Date(this.viewBounds.end); | ||
endDate.setMinutes(endDate.getMinutes() + 30); |
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.
I thought we were going to add a 50% margin here? I might be misremembering though. A percentage margin is a little more compatible with non-UTC time systems (which we don't need to support right now, but also don't want to close the door to them prematurely).
Also, I don't think setMinutes
works like this, it only accepts minutes values between 0-59. So, there is a potential overflow problem here.
Another approach to this might be something like:
let timespan = (this.viewBounds.end - this.viewBounds.start);
let padding = timespan * 0.5;
this.viewBounds.end = timespan + padding;
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.
Duh! of course...not sure what I was thinking here.
Hmm I thought we were going to look ahead by a specific duration. I'm fine with a percentage margin too. I'll fix it.
src/plugins/timeline/activities.json
Outdated
@@ -2,24 +2,24 @@ | |||
"ROVER": [ |
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.
This file should be deleted from our repository.
@shefalijoshi Would be good to get this merged |
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.
Reviewer Checklist
- Changes appear to address issue? Y
- Appropriate unit tests included? N/A - Change is small enough that it doesn't warrant unit tests
- Code style and in-line documentation are appropriate? Y
- Commit messages meet standards? Y
- Has associated issue been labelled
unverified
? (only applicable if this PR closes the issue) Y
Resolves #3418
Author Checklist
Changes address original issue? Yes
Unit tests included and/or updated with changes? Yes
Command line build passes? Yes
Changes have been smoke-tested? Yes
Testing instructions included? Yes