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

Replace duplicated map component #712

Closed
danielfdsilva opened this issue Oct 25, 2023 · 3 comments
Closed

Replace duplicated map component #712

danielfdsilva opened this issue Oct 25, 2023 · 3 comments
Assignees
Labels

Comments

@danielfdsilva
Copy link
Collaborator

danielfdsilva commented Oct 25, 2023

When starting to work on the new Analysis+Exploration page, the team decided to build the map component from scratch to improve the layer management process (given that now the map needed to support multiple simultaneous layers), and the overall code.

The different blocks (and other app sections) that use the old map should be refactored to use the new map and the old code should be removed from the app.

When doing this some consideration should go into the map block and consider whether its behavior should change a little, since the new map:

  • supports multiple layers rather than just one
    • should this be in the block?
    • how many layers are reasonable given the need for legends (which btw are not a feature of the new map)
    • should layer configuration (like opacity) be allowed?
  • Layer comparison is now manually defined instead of through the dataset configuration
    • Compare date was a property, but compare layer wasn't

These are just some topics to consider when doing this, but some more discussion should go into this.

@sandrahoang686
Copy link
Collaborator

Notes:

  • Maps embedded in stores use old map component
  • New map component -> app/scripts/components/common/map
  • Old map component -> app/scripts/components/common/mapbox

Plan:

  • Identify where the old map components and where in the codebase replace
  • Replace old with new and just get it works with no new functionality
  • And then be able to support multiple layers

@sandrahoang686 sandrahoang686 self-assigned this Jan 18, 2024
@hanbyul-here hanbyul-here mentioned this issue Jan 19, 2024
@sandrahoang686
Copy link
Collaborator

1/23/24 Checkin: Focus on story blocks only

hanbyul-here added a commit that referenced this issue Jan 25, 2024
- I ended up leaving the main logic as it is (CMR layer doesn't call CMR
endpoint directly - There seem to be some cases that stac collection id
doesn't match with cmr's short_name? ex.
https://cmr.earthdata.nasa.gov/search/collections.umm_json?short_name=TRMM_3B42_Daily.v7&version=07
- I get an empty response _ all in all, I thought it is better to keep
the source of truth in one place for now.)

- Make CMR layer (that shares zarr paint layer with Zarr layer)
- We currently have two map components (which we should consolidate in
the near future related issue: #712 ) This is why there are two places
for the layers.
- CMR layer won't show up for Analysis. (The timeline will fail for new
E&A. User can still explore the map.- you can check
new E&A page by putting a feature flagging variable in `.env`:
`FEATURE_NEW_EXPLORATION = 'TRUE'`. I also attached a screenshot below.)


![Screen Shot 2024-01-19 at 9 27 09
AM](https://github.com/NASA-IMPACT/veda-ui/assets/4583806/fe665936-c88b-4c1c-a422-eb7f808c04cb)
@j08lue j08lue changed the title Tech debt: Duplicated map component Replace duplicated map component Feb 8, 2024
@j08lue j08lue added the good first issue Good for newcomers label May 2, 2024
@j08lue
Copy link
Contributor

j08lue commented May 2, 2024

Status: ready to pick up from existing PR

@dzole0311 dzole0311 self-assigned this May 14, 2024
dzole0311 added a commit that referenced this issue May 16, 2024
Addressing Ticket: #712

**Changes:**
This PR replaces the old map component with the new map component
(specified in ticket) in the story pages.

**Validation:**
* Story maps should have all the controls available just like the old
map
* Story maps should compare the layer exactly the same as the old map
* None of these changes should change the behavior of the exploration
map

Local Demo Video for Comparison & Validation:
https://www.loom.com/share/d6eeacd447dd4cd086fbfe9a42332baa
@aboydnw aboydnw closed this as completed May 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants