Skip to content
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

Merged
merged 7 commits into from
Jan 26, 2024
Merged

Conversation

dpesall
Copy link
Member

@dpesall dpesall commented Jan 25, 2024

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

  1. Select a collection with a temporal window.
  2. Verify that the timeline reflects the temporal window for the focused collection.
  3. Add the collection to the project.
  4. Reproduce steps 2-3 for two other collections.
  5. Go to "My Project" and verify that the colors on the timeline match the colors on the project panel.

Checklist

  • I have added automated tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings

Copy link

codecov bot commented Jan 25, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (d4da4a8) 91.91% compared to head (25b8be5) 91.96%.

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.
📢 Have feedback on the report? Share it here.

@@ -266,6 +266,27 @@ export const Timeline = ({
data.push(dataValue)
})

Object.keys(intervals).forEach((conceptId, index) => {
Copy link
Contributor

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

Copy link
Member Author

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',
Copy link
Contributor

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.

@macrouch
Copy link
Contributor

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
Copy link
Contributor

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?

Copy link
Member Author

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?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

Copy link
Contributor

@eudoroolivares2016 eudoroolivares2016 left a 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

@rushgeo rushgeo self-requested a review January 26, 2024 20:50
@dpesall dpesall merged commit 01d2b53 into main Jan 26, 2024
11 checks passed
@dpesall dpesall deleted the EDSC-3981 branch January 26, 2024 20:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants