-
Notifications
You must be signed in to change notification settings - Fork 227
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
EDSC-3981: Fixing Timeline display for focused collection #1709
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1709 +/- ##
==========================================
+ Coverage 91.91% 91.96% +0.05%
==========================================
Files 725 725
Lines 19379 19394 +15
Branches 4569 4574 +5
==========================================
+ Hits 17812 17836 +24
+ Misses 1431 1422 -9
Partials 136 136 ☔ View full report in Codecov by Sentry. |
@@ -266,6 +266,27 @@ export const Timeline = ({ | |||
data.push(dataValue) | |||
}) | |||
|
|||
Object.keys(intervals).forEach((conceptId, index) => { |
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.
Double check this I think you need to check which path we are on pathname: '/search/granules'
is on the focused collection view and pathname: '/project' is on the project view. Right now its going to try to run both workflows. this one and the one above it
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.
Yeah that's probably a better solution. Currently it doesn't actually run on both workflows because it's checking to see if the current focused collection has already been added to to projectCollectionIds
and skipping it if it's already there, but that's probably a more clear workflow.
@@ -159,20 +159,20 @@ describe('Timeline component', () => { | |||
const { enzymeWrapper } = setup({ | |||
pathname: '/search/granules', |
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 think this was originally supposed to be /projects
.
Add comments explaining what the new code is doing. And write test(s) for the new logic you added |
title: 'Some Collection' | ||
} | ||
}, | ||
projectCollectionsIds: [], // Empty project collections |
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.
If you add a collection to your project and then go back to the focused collection timeline for a different collection isn't it going to execute both workflows?
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.
Right, I suppose you don't want to see both timelines in that view, correct?
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.
Fixed
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 tested pulling it down locally looks good; please rebase and then when you merge squash into one because we are going to look to back-port this
Overview
What is the feature?
Fixing the Timeline display to show the temporal window of the focused collection.
What is the Solution?
Updating the Timeline component to reflect the focused collection temporal window while still saving the position of collections added to the project on the timeline.
What areas of the application does this impact?
EDSC
Testing
Reproduction steps
Checklist